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

   ### Which Issue(s) This PR Fixes
   
   - Fixes #<10998>
   
   ### Brief Description
   
   The tiered storage dispatcher checks the accumulated batch size before
   appending the current message. When the first message size is equal to or
   larger than `tieredStoreGroupCommitSize`, the dispatch loop exits with an
   empty dispatch request list.
   
   As a result, no commit is triggered and the tiered consume queue offset
   does not advance. The dispatcher repeatedly retries the same message,
   preventing it and subsequent messages from being archived.
   
   This change ensures that at least one message is included in each dispatch
   batch. A message that reaches or exceeds the group commit size is dispatched
   as a single-message batch.
   
   A regression test has also been added to verify that the tiered consume
   queue offset advances when a message size equals the configured group
   commit size.
   
   ### How Did You Test This Change?
   
   1. Added `dispatchMessageAtGroupCommitSizeTest` to reproduce the issue.
      Before the fix, the test timed out because the consume queue offset
      remained at 100 instead of advancing to 101.
   
   2. Verified the regression test after the fix:
   
      `mvn -pl tieredstore 
-Dtest=MessageStoreDispatcherImplTest#dispatchMessageAtGroupCommitSizeTest test`
   
   3. Ran the complete tiered storage module test suite:
   
      `mvn -pl tieredstore test`
   
      Result: 128 tests run, 0 failures, 0 errors, 0 skipped.
   
   4. Checkstyle and SpotBugs validation also completed successfully.


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