RongtongJin opened a new issue, #9680: URL: https://github.com/apache/rocketmq/issues/9680
### Before Creating the Enhancement Request - [x] I have confirmed that this should be classified as an enhancement rather than a bug/feature. ### Summary Improve resource management in RocksDB compaction filter factory to prevent memory leaks ### Motivation The current implementation of ConsumeQueueCompactionFilterFactory, which: 1. Creates tight coupling between components 2. Increases the risk of memory leaks due to improper resource cleanup ### Describe the Solution You'd Like **Primary Solution:** 1. Refactor ConsumeQueueCompactionFilterFactory to use `LongSupplier` instead of MessageStore 2. Add proper resource cleanup in ConsumeQueueRocksDBStorage.preShutdown() 3. Update RocksDBOptionsFactory to accept external compaction filter factory instances 4. Optimize write buffer size configuration for better performance **Implementation Details:** - Replace `MessageStore messageStore` field with `LongSupplier minPhyOffsetSupplier` - Update constructor to accept functional interface - Add null-safe resource cleanup in shutdown methods - Pass compaction filter factory as parameter to avoid internal instantiation ### Describe Alternatives You've Considered No ### Additional Context No -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@rocketmq.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org