influxdb/influxdb3
Praveen Kumar 936b6cf80f
feat: force snapshot under memory pressure
- 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
2025-01-02 13:14:00 +00:00
..
src feat: force snapshot under memory pressure 2025-01-02 13:14:00 +00:00
tests/server refactor: cleanup v3 write API and series key method on catalog (#25723) 2024-12-30 09:32:54 -05:00
Cargo.toml feat: force snapshot under memory pressure 2025-01-02 13:14:00 +00:00