-
Notifications
You must be signed in to change notification settings - Fork 65
starknet_patricia_storage,starknet_committer_cli: add optional Column Families in RocksDbStorage #10086
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main-v0.14.1-committer
Are you sure you want to change the base?
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
f1e39e9 to
cbe5330
Compare
… Families in RocksDbStorage
cbe5330 to
9727056
Compare
dorimedini-starkware
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dorimedini-starkware reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ArielElp)
crates/starknet_patricia_storage/src/rocksdb_storage.rs line 39 at r1 (raw file):
const MAX_BACKGROUND_JOBS: i32 = 8; const BYTE: usize = 8;
I don't think you need this const, you can use u8::BITS when you need it
Code quote:
const BYTE: usize = 8;crates/starknet_patricia_storage/src/rocksdb_storage.rs line 124 at r1 (raw file):
pub fn get_column_family(&self, key: &DbKey) -> &ColumnFamily { if self.column_families { let last_byte = key.0.last().unwrap();
we should allow writing to null keys without panic (i.e. a DB key of &[])
Suggestion:
let last_byte = key.0.last().unwrap_or(0u8);crates/starknet_committer_cli/src/main.rs line 105 at r1 (raw file):
/// If true, the storage will use 256 column families. Only relevant for Rocksdb. #[clap(long, action=ArgAction::SetTrue)] use_column_families: bool,
heads up: if you rebase over this it will look nicer :)
non-blocking of course
Code quote:
/// If true, the storage will use 256 column families. Only relevant for Rocksdb.
#[clap(long, action=ArgAction::SetTrue)]
use_column_families: bool,
dorimedini-starkware
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ArielElp and @rotem-starkware)
crates/starknet_patricia_storage/src/rocksdb_storage.rs line 112 at r1 (raw file):
let cfs = if column_families { (0..1 << BYTE) .map(|i| ColumnFamilyDescriptor::new(format!("{i}"), Options::default()))
columns must be strings? not bytes/integers?
Code quote:
ColumnFamilyDescriptor::new(
No description provided.