You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "lizhimins (via GitHub)" <gi...@apache.org> on 2026/06/10 15:26:14 UTC

[PR] [ISSUE #10462] Fix resource leaks and lifecycle issues [rocketmq]

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

   ## What is the purpose of the change
   
   Part of #10462
   
   Fix resource leaks and improve lifecycle management in tiered storage module.
   
   ## Brief changelog
   
   - FileSegment `close()` waits for in-flight commit (30s timeout)
   - PosixFileSegment: store RAF references to prevent handle leaks
   - MessageStoreExecutor `shutdown()`: add `awaitTermination(30s)`
   - Remove MessageStoreExecutor singleton pattern
   - Remove `fileRecyclingExecutor` (wrong thread name, unused)
   - Change MessageStoreExecutor fields from public to private with getters
   - FlatFileFactory: remove test constructor that leaked thread pool
   - FlatMessageFile: remove dead `inFlightRequestMap` field
   - TieredMessageStore: reorder shutdown (dispatcher->index->executor->file->next)
   - Update all tests to pass executor to FlatFileFactory and shutdown in @After
   
   ## Verifying this change
   
   - [x] `mvn compile` succeeds
   - [x] `mvn test -pl tieredstore` passes (112 tests, 0 failures)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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 #10462] Fix resource leaks and lifecycle issues [rocketmq]

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

   ## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/10476?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 `73.17073%` with `11 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 48.01%. Comparing base ([`a6fb9e2`](https://app.codecov.io/gh/apache/rocketmq/commit/a6fb9e2fa0d4e446c88b0051cd4fac233dcee9ec?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`f707726`](https://app.codecov.io/gh/apache/rocketmq/commit/f707726cf55b13d570212b2ad47a120e98c16986?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 10 commits behind head on develop.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/rocketmq/pull/10476?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...che/rocketmq/tieredstore/MessageStoreExecutor.java](https://app.codecov.io/gh/apache/rocketmq/pull/10476?src=pr&el=tree&filepath=tieredstore%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Ftieredstore%2FMessageStoreExecutor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dGllcmVkc3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3RpZXJlZHN0b3JlL01lc3NhZ2VTdG9yZUV4ZWN1dG9yLmphdmE=) | 50.00% | [5 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10476?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...pache/rocketmq/tieredstore/TieredMessageStore.java](https://app.codecov.io/gh/apache/rocketmq/pull/10476?src=pr&el=tree&filepath=tieredstore%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Ftieredstore%2FTieredMessageStore.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dGllcmVkc3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3RpZXJlZHN0b3JlL1RpZXJlZE1lc3NhZ2VTdG9yZS5qYXZh) | 60.00% | [0 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10476?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...che/rocketmq/tieredstore/provider/FileSegment.java](https://app.codecov.io/gh/apache/rocketmq/pull/10476?src=pr&el=tree&filepath=tieredstore%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Ftieredstore%2Fprovider%2FFileSegment.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dGllcmVkc3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3RpZXJlZHN0b3JlL3Byb3ZpZGVyL0ZpbGVTZWdtZW50LmphdmE=) | 66.66% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10476?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   #10476      +/-   ##
   =============================================
   - Coverage      48.03%   48.01%   -0.03%     
   - Complexity     13286    13301      +15     
   =============================================
     Files           1376     1377       +1     
     Lines         100558   100646      +88     
     Branches       12985    12999      +14     
   =============================================
   + Hits           48305    48325      +20     
   - Misses         46333    46380      +47     
   - Partials        5920     5941      +21     
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/rocketmq/pull/10476?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 #10462] Fix resource leaks and lifecycle issues [rocketmq]

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


-- 
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