-
Notifications
You must be signed in to change notification settings - Fork 589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
storage: utilities to implement sliding window compaction #14368
Commits on Oct 25, 2023
-
storage: add for_each for compaction reader
With coroutines, it can be more convenient to just pass in some procedural method to the iteration function, rather than implementing a reducer. I intend on using this to build a map using multiple readers. Puts into this map will be async, given the possibility of stalls during probing.
Configuration menu - View commit details
-
Copy full SHA for a811691 - Browse repository at this point
Copy the full SHA a811691View commit details -
Configuration menu - View commit details
-
Copy full SHA for 97a52d0 - Browse repository at this point
Copy the full SHA 97a52d0View commit details -
storage: allow controlling the number of keys indexed in compaction
This will be useful in testing the sliding window approach.
Configuration menu - View commit details
-
Copy full SHA for 25a887c - Browse repository at this point
Copy the full SHA 25a887cView commit details -
storage: pass lambda to compaction reducer
This replaces the inlined should_keep() method in the copy_data_segment_reducer with a function, so that a subsequent commit can base deduplication on a key_offset_map.
Configuration menu - View commit details
-
Copy full SHA for b838f50 - Browse repository at this point
Copy the full SHA b838f50View commit details -
storage: make compaction segment reducer filter async
Upcoming changes to use a key_offset_map will require async calls to put/get. Inherently our implementation won't do async work, but there will be potential for long-running tasks with some form of linear probing of a map that should be broken up by yielding. So, this commit changes the filter interface with an async version.
Configuration menu - View commit details
-
Copy full SHA for 4f28cbf - Browse repository at this point
Copy the full SHA 4f28cbfView commit details -
storage: add bitflag for windowed compaction
Subsequent commits will introduced sliding window compaction by which segments will be deduplicated with keys from multiple segments. To distinguish such compacted segments (e.g. to tell if there are new uncompacted segments that need deduplicating), this adds a new segment bitflag.
Configuration menu - View commit details
-
Copy full SHA for feb9d05 - Browse repository at this point
Copy the full SHA feb9d05View commit details -
storage: allow keeping the last offset when compacting
In sliding window compaction, it will be possible that the entire segment's data will be removed. To maintain that we still have data in each segment, this allows passing the last segment offset to the segment reducer, allowing it to tell whether it's empty by the end of its reduce and force keeping a record accordingly.
Configuration menu - View commit details
-
Copy full SHA for 6b8b1d3 - Browse repository at this point
Copy the full SHA 6b8b1d3View commit details -
storage: allow passing compacted index writer to segment reducer
In sliding window compaction, rather than reusing a segment's existing compacted index, we will need to rewrite an index as the segment is rewritten with deduplication context from other segments. A compacted index writer is now passed to the segment reducer.
Configuration menu - View commit details
-
Copy full SHA for 5940d6d - Browse repository at this point
Copy the full SHA 5940d6dView commit details -
storage: add utils for segment deduplication
There's some functional overlap with compaction_reducers, but the utilities include methods to build a key_offset_map and to rewrite a segment and compacted index removing duplicates.
Configuration menu - View commit details
-
Copy full SHA for 4f79b9c - Browse repository at this point
Copy the full SHA 4f79b9cView commit details -
storage: add method to collect sliding window compaction range
Adds a method to collect the set of segments over which to slide during a sliding window compaction.
Configuration menu - View commit details
-
Copy full SHA for 2f2229d - Browse repository at this point
Copy the full SHA 2f2229dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9059677 - Browse repository at this point
Copy the full SHA 9059677View commit details -
Configuration menu - View commit details
-
Copy full SHA for e1d9ff3 - Browse repository at this point
Copy the full SHA e1d9ff3View commit details