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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to