fix(l1): apply RocksDB max_bytes_for_level_base on state CFs #7113
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.43) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 181 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.311
Real PR Conversation Timeline
1 comments
"Review active on #7113"
general
weight: 0.35
ElFantasma
Closes #7096
Summary
open_cf_descriptorsonly applies DBOptions from the top-levelOptions. CF setters on that object never reach any column family, somax_bytes_for_level_base(2GB)was a no-op and every CF kept RocksDB’s 256 MiB default. State CFs (large memtables / L0) were especially exposed to excess compaction write amp.This change:
max_bytes_for_level_base(2GB)on the four state CFs (account_trie_nodes,storage_trie_nodes,account_flatkeyvalue,storage_flatkeyvalue)optsBenchmarking
A/B tooling is on
perf/rocksdb-level-base-bench(stacked on this fix): tunable--rocksdb.max-bytes-for-level-base, compaction settle afterimport-bench, and state-CFrocksdb.cfstatsdump. Primary metric is Sum W-Amp / Write(GB).Compare 256 MiB vs 2 GiB vs 4 GiB on a frozen DB with a long
chain.rlp(≥5k–10k blocks), fresh copy per run.I could not run that A/B locally (no frozen bench DB; machine too small to sync one). I smoke-tested the tooling on a 30-block
perf-ciimport: flag, settle, and cfstats dump all worked. RocksDB unit tests pass.Test plan
cargo test -p ethrex-storage --features rocksdb -- backend::rocksdb::testsperf/rocksdb-level-base-bench