Skip to content

sc-client-db: optional path override for the TRANSACTION column - #12705

Draft
x3c41a wants to merge 2 commits into
masterfrom
ndk/transaction-storage-path
Draft

sc-client-db: optional path override for the TRANSACTION column#12705
x3c41a wants to merge 2 commits into
masterfrom
ndk/transaction-storage-path

Conversation

@x3c41a

@x3c41a x3c41a commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

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::RocksDb gains transaction_column_path: Option<PathBuf>
  • --transaction-storage-path lives in DatabaseParams, so polkadot-parachain / omni-node inherit the flag with no extra code
  • sc-client-db pins the column via kvdb-rocksdb ColumnConfig::path (RocksDB cf_paths underneath); only new SST files are affected, relocating existing data needs a compaction or resync
  • reopening with a missing/changed override fails loudly (RocksDB refuses to open; the error message points at the flag)
  • also adapts open_kvdb_rocksdb to the per-column memory-budget API of the upcoming kvdb-rocksdb release

Draft, blocked on (in order):

CI 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.

x3c41a added 2 commits July 21, 2026 12:29
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant