You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "RongtongJin (via GitHub)" <gi...@apache.org> on 2025/09/09 08:56:57 UTC

[PR] [ISSUE #9680] Improve RocksDB compaction filter factory resource management [rocketmq]

RongtongJin opened a new pull request, #9681:
URL: https://github.com/apache/rocketmq/pull/9681

   <!-- Please make sure the target branch is right. In most case, the target branch should be `develop`. -->
   
   ### Which Issue(s) This PR Fixes
   
   <!-- Please ensure that the related issue has already been created, and [link this pull request to that issue using keywords](<https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword>) to ensure automatic closure. -->
   
   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:
   
   1. **Refactor ConsumeQueueCompactionFilterFactory**: Replace MessageStore dependency with LongSupplier functional interface to reduce coupling and improve testability
   2. **Enhanced Resource Management**: Add proper cleanup logic in ConsumeQueueRocksDBStorage.preShutdown() with null-safety checks
   3. **Parameter Injection**: Update RocksDBOptionsFactory to accept external compaction filter factory instances instead of creating them internally
   4. **Performance Optimization**: Optimize write buffer size configuration for faster CQ RocksDB startup
   
   <!-- Write a brief description for your pull request to help the maintainer understand the reasons behind your changes. -->
   
   ### How Did You Test This Change?
   
   <!-- In order to ensure the code quality of Apache RocketMQ, we expect every pull request to have undergone thorough testing. -->
   


-- 
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-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #9680] Improve RocksDB compaction filter factory resource management [rocketmq]

Posted by "fujian-zfj (via GitHub)" <gi...@apache.org>.
fujian-zfj commented on PR #9681:
URL: https://github.com/apache/rocketmq/pull/9681#issuecomment-3278225142

   LGTM


-- 
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-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #9680] Improve RocksDB compaction filter factory resource management [rocketmq]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #9681:
URL: https://github.com/apache/rocketmq/pull/9681#issuecomment-3269739850

   ## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/9681?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `80.00000%` with `2 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 48.03%. Comparing base ([`bb45b8f`](https://app.codecov.io/gh/apache/rocketmq/commit/bb45b8f5f70c07e0c4640e98c281058c1a6ad8cd?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`cf5b3c7`](https://app.codecov.io/gh/apache/rocketmq/commit/cf5b3c7894617edc5577ec33741454d1f3bd90c6?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/rocketmq/pull/9681?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...etmq/store/rocksdb/ConsumeQueueRocksDBStorage.java](https://app.codecov.io/gh/apache/rocketmq/pull/9681?src=pr&el=tree&filepath=store%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fstore%2Frocksdb%2FConsumeQueueRocksDBStorage.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL3JvY2tzZGIvQ29uc3VtZVF1ZXVlUm9ja3NEQlN0b3JhZ2UuamF2YQ==) | 66.66% | [0 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/9681?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              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     
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/rocketmq/pull/9681?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   </details>


-- 
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-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #9680] Improve RocksDB compaction filter factory resource management [rocketmq]

Posted by "ltamber (via GitHub)" <gi...@apache.org>.
ltamber merged PR #9681:
URL: https://github.com/apache/rocketmq/pull/9681


-- 
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-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org