sc-client-db: optional path override for the TRANSACTION column - #12705
Draft
x3c41a wants to merge 2 commits into
Draft
sc-client-db: optional path override for the TRANSACTION column#12705x3c41a wants to merge 2 commits into
x3c41a wants to merge 2 commits into
Conversation
Adds --transaction-storage-path (RocksDB only): places the indexed-transaction column's SST files under a separate directory so bulk transaction-storage data can live on a cheaper volume. Adapts open_kvdb_rocksdb to the per-column memory budget API of the upcoming kvdb-rocksdb release. Requires kvdb-rocksdb with ColumnConfig::path (paritytech/parity-common#979) and a rocksdb crate release containing set_cf_paths (rust-rocksdb#1092).
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
--transaction-storage-path(RocksDB only): places the indexed-transaction column (columns::TRANSACTION) under a separate directory, so the bulk, cold data of transaction-storage chains can live on a cheaper volume while state stays on the fast disk. Opt-in, off by default; existing databases are unaffected.Context: paritytech/polkadot-bulletin-chain#646 (separate Bulletin user data from the state DB so bulk storage can run on cheaper drives at metanode scale).
How it works:
DatabaseSource::RocksDbgainstransaction_column_path: Option<PathBuf>--transaction-storage-pathlives inDatabaseParams, so polkadot-parachain / omni-node inherit the flag with no extra codeColumnConfig::path(RocksDBcf_pathsunderneath); only new SST files are affected, relocating existing data needs a compaction or resyncopen_kvdb_rocksdbto the per-column memory-budget API of the upcoming kvdb-rocksdb releaseDraft, blocked on (in order):
set_cf_paths(Add set_cf_paths to allow per column family sst and blob paths rust-rocksdb/rust-rocksdb#1092 is merged; release requested in Release including set_cf_paths? rust-rocksdb/rust-rocksdb#1096)ColumnConfig::path) merged + kvdb-rocksdb 0.22 on crates.ioCI cannot compile until those releases exist. Tested locally against pinned deps (rocksdb git @ 1092 merge commit, kvdb-rocksdb from #979): sc-client-db 115/115 with
--features rocksdb, including a new end-to-end test that writes 30x256 KiB indexed payloads through block import and verifies SST placement on the override dir plus reads across reopen.