heimdall: implement precise block change collector

This commit is contained in:
2023-02-09 03:44:43 -05:00
parent eaa3888821
commit ef822f9217
21 changed files with 326 additions and 167 deletions

View File

@ -1,6 +1,16 @@
# Whether Heimdall should be enabled for tracking events.
enabled: false
# Whether the block change events should be precise.
# Detail of the cause will be lost but all block updates
# will be captured utilizing physics recording.
blockChangePrecise: false
# Whether the precise block change collector should
# immediately insert changes to the buffer. This is not
# recommended as this may cause large insert operations.
blockChangePreciseImmediate: false
# Database connection information.
db:
# JDBC URL

View File

@ -28,6 +28,7 @@ select add_compression_policy('player_positions', interval '3 days', if_not_exis
--
create table if not exists block_changes (
time timestamp not null,
inc int not null,
player uuid null,
world uuid not null,
x double precision not null,
@ -38,10 +39,10 @@ create table if not exists block_changes (
block text not null,
data text not null,
cause text not null,
PRIMARY KEY (time, world, x, y, z)
PRIMARY KEY (time, inc)
);
--
select create_hypertable('block_changes', 'time', 'x', 4, if_not_exists => TRUE);
select create_hypertable('block_changes', 'time', 'inc', 4, if_not_exists => TRUE);
--
create table if not exists player_sessions (
id uuid not null,