-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] db: add support for user-defined sstable partitioning
Add `Options.TablePartitioner` hook which allows the user to specify a required partition between 2 user-keys. `TablePartitioner` is called during flush and compaction before outputting a new key to an sstable which already contains at least 1 key. TODO One complication from table partitioning is that it can create L0 tables which overlap in seqnum space. In order to support partitioned L0, we'd have to relax the invariant checks in `manifest.CheckOrdering`. Doing so will make Pebble incompatible with RocksDB. In order for partitioning to not naively increase read amplification, we'll want provide some sort of partitioned view of the sstables in `Version.Files[0]`. `mergingIter` will then need to be made aware of the partitioning. We may want to adjust the compaction picking heuristics to not expand compaction inputs across the partition boundary. See #517
- Loading branch information
1 parent
ec5762e
commit 3331106
Showing
4 changed files
with
57 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters