feat: add RocksDB Cloud bloom filter config#481
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis PR adds Bloom filter support to RocksDB Cloud databases. Two new configuration flags control whether Bloom filtering is enabled and set its bits-per-key tuning parameter. The configuration is loaded from command-line flags or INI files, applied during database initialization, and documented with examples and value format requirements. ChangesBloom Filter Configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
store_handler/eloq_data_store_service/rocksdb_config.cpp (1)
599-622:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winValidate that
bloom_filter_bits_per_keyis positive.The code reads
bloom_filter_bits_per_keyfrom configuration but doesn't validate that it's a positive value. Negative or zero values could lead to unexpected behavior when creating the bloom filter policy.🛡️ Proposed fix to add validation
double rocksdb_cloud_bloom_filter_bits_per_key = !CheckCommandLineFlagIsDefault( "rocksdb_cloud_bloom_filter_bits_per_key") ? FLAGS_rocksdb_cloud_bloom_filter_bits_per_key : config.GetReal("store", "rocksdb_cloud_bloom_filter_bits_per_key", FLAGS_rocksdb_cloud_bloom_filter_bits_per_key); + +if (rocksdb_cloud_bloom_filter_bits_per_key <= 0) +{ + LOG(ERROR) << "Invalid rocksdb_cloud_bloom_filter_bits_per_key: " + << rocksdb_cloud_bloom_filter_bits_per_key + << ". Must be positive. Using default value 10."; + rocksdb_cloud_bloom_filter_bits_per_key = 10; +} sst_file_cache_size_ =🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@store_handler/eloq_data_store_service/rocksdb_config.cpp` around lines 599 - 622, Validate that rocksdb_cloud_bloom_filter_bits_per_key is > 0 before assigning it to bloom_filter_bits_per_key_; if it is <= 0, log a warning and replace it with a safe default (e.g., FLAGS_rocksdb_cloud_bloom_filter_bits_per_key or 1) so the subsequent use of bloom_filter_bits_per_key_ cannot receive non-positive values; update the assignment that sets bloom_filter_bits_per_key_ = rocksdb_cloud_bloom_filter_bits_per_key to perform this check and fallback, using the existing config/flag variables and process logger for the warning.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@store_handler/eloq_data_store_service/rocksdb_config.cpp`:
- Around line 599-622: Validate that rocksdb_cloud_bloom_filter_bits_per_key is
> 0 before assigning it to bloom_filter_bits_per_key_; if it is <= 0, log a
warning and replace it with a safe default (e.g.,
FLAGS_rocksdb_cloud_bloom_filter_bits_per_key or 1) so the subsequent use of
bloom_filter_bits_per_key_ cannot receive non-positive values; update the
assignment that sets bloom_filter_bits_per_key_ =
rocksdb_cloud_bloom_filter_bits_per_key to perform this check and fallback,
using the existing config/flag variables and process logger for the warning.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5075678a-a1cd-4c65-b700-7101236f946f
📒 Files selected for processing (4)
store_handler/eloq_data_store_service/RocksDB_Configuration_Flags.mdstore_handler/eloq_data_store_service/rocksdb_cloud_data_store.cppstore_handler/eloq_data_store_service/rocksdb_config.cppstore_handler/eloq_data_store_service/rocksdb_config.h
Here are some reminders before you submit the pull request
fixes eloqdb/tx_service#issue_id./mtr --suite=mono_main,mono_multi,mono_basicSummary by CodeRabbit
New Features
Documentation