- The main change is to detach wal and snapshot, in a way all 3 of the following things can happen - flush the wal buffer only (already handled, before this commit) - flush wal buffer and snapshot (already handled, before this commit) - snapshot without flushing wal buffer (introduced in this commit) This is achieved by introducing another method `snapshot` in `WalFileNotifier` trait. The main dependency between wal and snapshot is the `wal_file_number`, since this is tracked in `SnapshotTracker` separately we can switch to using `SnapshotTracker`'s `last_wal_sequence_number` instead of the one that comes through the `WalContents`. - A higher level background loop is introduced that checks the overall table buffer size every `N` seconds and if it is greater than a threshold (`X`) then it calls `snapshot` method. Both `N` and `X` are configurable through cli. `N` defaults to 10s and `X` defaults to 70% - Some refactoring of code so that existing methods can be reused when only snapshotting closes: https://github.com/influxdata/influxdb/issues/25685 |
||
---|---|---|
.. | ||
src | ||
tests/server | ||
Cargo.toml |