kvdb-rocksdb: optional per-column storage path#979
Draft
x3c41a wants to merge 2 commits into
Draft
Conversation
Add `ColumnConfig.path` so a column family's SST files can be placed on a separate directory - a large cold column can then live on a cheaper volume while the rest of the database stays on the main disk. When set, `column_config` gives that column a single `cf_paths` entry with a max target size, which pins it to that directory (RocksDB never spills elsewhere). `column_config` now returns `io::Result` to surface a bad path. Empty by default, so existing databases are unaffected. Depends on rust-rocksdb exposing `Options::set_cf_paths` (rust-rocksdb/rust-rocksdb#1094).
Author
|
Heads up on CI: the compile failure ( |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
ColumnConfig.pathso a single column family's SST files can be placed on a separate directory, letting a large cold column live on a cheaper volume while the rest of the DB stays on the main disk.When
pathis set,column_configgives that column a singlecf_pathsentry with a max target size, which pins the column to that directory (RocksDB does not spill elsewhere, andcf_pathsoverridesdb_pathsfor that column). Empty by default, so existing databases and single-volume setups are unaffected.column_confignow returnsio::Resultto surface an invalid path.Motivation: Polkadot Bulletin Chain wants to keep its bulk indexed-transaction column on cheap SSD/HDD while consensus state stays on NVMe.
Note:
cf_pathsaffects only where new SST files are written; relocating an already-populated column needs a compaction or resync.Depends on rust-rocksdb exposing
Options::set_cf_paths(rust-rocksdb/rust-rocksdb#1094); compiles and runs against that change locally.Draft for discussion.