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:24:37 UTC
[PR] [ISSUE #10462] Fix concurrency bugs in tiered storage [rocketmq]
lizhimins opened a new pull request, #10471:
URL: https://github.com/apache/rocketmq/pull/10471
## What is the purpose of the change
Part of #10462
Fix concurrency bugs including FileChannel race condition, hash overflow, off-by-one, and TOCTOU issues.
## Brief changelog
- PosixFileSegment: use `read(ByteBuffer, long)` for atomic reads
- IndexStoreFile: hash `& 0x7FFFFFFF` to prevent MIN_VALUE overflow
- IndexStoreFile: `held` flag fixes unmatched `mappedFile.release()`
- IndexStoreFile: `>= maxCount` fixes off-by-one in query results
- IndexStoreFile: `timeDiff` clamped to `[0, Integer.MAX_VALUE]`
- IndexStoreFile: `slotBuffer` moved outside loop with position reset
- FlatCommitLogFile: local variable snapshot for firstOffset TOCTOU
- FlatMessageFile: add `volatile` to `topicMetadata`/`queueMetadata`
- CommitLogInputStream: fix buffer assignment order
## 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 concurrency bugs in tiered storage [rocketmq]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins merged PR #10471:
URL: https://github.com/apache/rocketmq/pull/10471
--
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 concurrency bugs in tiered storage [rocketmq]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #10471:
URL: https://github.com/apache/rocketmq/pull/10471#issuecomment-4672006364
## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/10471?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 `93.33333%` with `1 line` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 47.96%. 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 ([`c06042b`](https://app.codecov.io/gh/apache/rocketmq/commit/c06042bb2f1544cb7bfa9f174616cf0fd3f3fbd9?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/10471?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/index/IndexStoreFile.java](https://app.codecov.io/gh/apache/rocketmq/pull/10471?src=pr&el=tree&filepath=tieredstore%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Ftieredstore%2Findex%2FIndexStoreFile.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dGllcmVkc3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3RpZXJlZHN0b3JlL2luZGV4L0luZGV4U3RvcmVGaWxlLmphdmE=) | 88.88% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10471?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 #10471 +/- ##
=============================================
- Coverage 48.03% 47.96% -0.08%
+ Complexity 13286 13280 -6
=============================================
Files 1376 1377 +1
Lines 100558 100635 +77
Branches 12985 12996 +11
=============================================
- Hits 48305 48265 -40
- Misses 46333 46421 +88
- Partials 5920 5949 +29
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/rocketmq/pull/10471?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