Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"committer_config.storage_config.inner_storage_config.enable_statistics": true,
"committer_config.storage_config.inner_storage_config.max_background_jobs": 8,
"committer_config.storage_config.inner_storage_config.use_mmap_reads": false,
"committer_config.storage_config.inner_storage_config.spawn_blocking_reads": false,
"committer_config.storage_config.inner_storage_config.max_subcompactions": 8,
"committer_config.storage_config.inner_storage_config.max_write_buffers": 4,
"committer_config.storage_config.inner_storage_config.num_threads": 8,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"committer_config.storage_config.inner_storage_config.cache_size": 8589934592,
"committer_config.storage_config.inner_storage_config.enable_statistics": true,
"committer_config.storage_config.inner_storage_config.max_background_jobs": 8,
"committer_config.storage_config.inner_storage_config.spawn_blocking_reads": false,
"committer_config.storage_config.inner_storage_config.max_subcompactions": 8,
"committer_config.storage_config.inner_storage_config.max_write_buffers": 4,
"committer_config.storage_config.inner_storage_config.num_threads": 8,
Expand Down
5 changes: 5 additions & 0 deletions crates/apollo_node/resources/config_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,11 @@
"privacy": "Public",
"value": false
},
"committer_config.storage_config.inner_storage_config.spawn_blocking_reads": {
"description": "Whether to spawn blocking tasks for read operations",
"privacy": "Public",
"value": false
},
"committer_config.storage_config.inner_storage_config.write_buffer_size": {
"description": "Amount of data to build up in memory before writing to disk",
"privacy": "Public",
Expand Down
9 changes: 9 additions & 0 deletions crates/starknet_patricia_storage/src/rocksdb_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ pub struct RocksDbStorageConfig {
pub enable_statistics: bool,
/// Whether to use mmap for reading SST files.
pub use_mmap_reads: bool,
/// Whether to spawn blocking tasks for read operations.
pub spawn_blocking_reads: bool,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Config field spawn_blocking_reads is never used

Low Severity

The new spawn_blocking_reads config field is added to RocksDbStorageConfig but is never read to control any runtime behavior. The get and mget methods unconditionally call spawn_blocking regardless of this setting. Additionally, the config isn't stored in RocksDbStorage (only RocksDbOptions is stored), so the field wouldn't be accessible even if conditional logic were added. Existing TODO comments on lines 291 and 302 explicitly note that the config should control whether to spawn blocking tasks, but this implementation doesn't connect the new field to that behavior.

Fix in Cursor Fix in Web

}

impl Default for RocksDbStorageConfig {
Expand All @@ -167,6 +169,7 @@ impl Default for RocksDbStorageConfig {
bloom_filter_bits: BLOOM_FILTER_NUM_BITS,
enable_statistics: true,
use_mmap_reads: false,
spawn_blocking_reads: false,
}
}
}
Expand Down Expand Up @@ -240,6 +243,12 @@ impl SerializeConfig for RocksDbStorageConfig {
"Whether to use mmap for reading SST files",
ParamPrivacyInput::Public,
),
ser_param(
"spawn_blocking_reads",
&self.spawn_blocking_reads,
"Whether to spawn blocking tasks for read operations",
ParamPrivacyInput::Public,
),
])
}
}
Expand Down
Loading