[ISSUE #9680] Improve RocksDB compaction filter factory resource management#9681
Merged
ltamber merged 4 commits intoapache:developfrom Sep 11, 2025
Merged
Conversation
- Refactor ConsumeQueueCompactionFilterFactory to use LongSupplier instead of MessageStore - Add proper resource cleanup in ConsumeQueueRocksDBStorage.preShutdown() - Update RocksDBOptionsFactory to accept external compaction filter factory - Optimize write buffer size for CQ rocksdb performance This change improves resource management and reduces memory leaks by: 1. Decoupling compaction filter from MessageStore reference 2. Ensuring proper cleanup of native resources 3. Making compaction filter factory lifecycle manageable
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #9681 +/- ##
=============================================
- Coverage 48.09% 48.03% -0.07%
+ Complexity 12089 12078 -11
=============================================
Files 1313 1313
Lines 92929 92933 +4
Branches 11870 11871 +1
=============================================
- Hits 44695 44639 -56
- Misses 42721 42779 +58
- Partials 5513 5515 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
LGTM |
fujian-zfj
approved these changes
Sep 11, 2025
ltamber
approved these changes
Sep 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which Issue(s) This PR Fixes
Fixes #9680
Brief Description
This PR improves RocksDB compaction filter factory resource management to prevent memory leaks and reduce component coupling. The main changes include:
How Did You Test This Change?