You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, MVCC versions of items may be GC'd if there is no open snapshot and the level is deep enough.
However, if there's always some snapshot hanging around, it may completely prevent GC of old items.
It would be better to keep track of open snapshots, and store the lowest seqno that can be definitely be dropped without affecting existing snapshots, and using that number inside compaction filtering.
Example:
LowestSeqno = 0 // means nothing can be cleaned up
OpenSnapshot(1)
OpenSnapshot(2)
CloseSnapshot(2)
LowestSeqno = 0 // because Snapshot=1 is still hanging around, the counter was not changed
CloseSnapshot(1)
LowestSeqno = 2 // means we can remove any value that has seqno < 2
Note: There can be multiple snapshots with the same seqno
Possible API
SnapshotTracker::default() => starts at 0
SnapshotTracker::register(seqno)
SnapshotTracker::release(seqno)
SnapshotTracker::get_lowest() -> Option => gets the highest seqno we can safely free
The text was updated successfully, but these errors were encountered:
Currently, MVCC versions of items may be GC'd if there is no open snapshot and the level is deep enough.
However, if there's always some snapshot hanging around, it may completely prevent GC of old items.
It would be better to keep track of open snapshots, and store the lowest seqno that can be definitely be dropped without affecting existing snapshots, and using that number inside compaction filtering.
Example:
Note: There can be multiple snapshots with the same seqno
Possible API
SnapshotTracker::default() => starts at 0
SnapshotTracker::register(seqno)
SnapshotTracker::release(seqno)
SnapshotTracker::get_lowest() -> Option => gets the highest seqno we can safely free
The text was updated successfully, but these errors were encountered: