ai-yang opened a new pull request, #10757:
URL: https://github.com/apache/rocketmq/pull/10757

   ### Which Issue(s) This PR Fixes
   
   Fixes #10754
   
   ### Brief Description
   
   LMQ empty-bucket cleanup previously checked `ManyPullRequest.isEmpty()` and 
then removed the map entry in separate operations. A concurrent suspend or 
notification replay could append a request to the selected bucket after the 
empty check, while cleanup still removed that bucket from `pullRequestTable`. 
The request then remained in a detached object and could no longer be reached 
by message arrival or timeout scans.
   
   This change keeps bucket selection, append, and empty cleanup atomic per key:
   
   - suspended requests and notification replays use one map-aware `compute()` 
helper;
   - LMQ cleanup uses `computeIfPresent()` and performs the authoritative 
synchronized `isEmpty()` check inside the remapping boundary;
   - ordinary non-LMQ hold-request behavior remains unchanged.
   
   ### How Did You Test This Change?
   
   - Unmodified `develop`: the deterministic cleanup-vs-suspend regression 
failed in 5/5 isolated JDK 8 Maven processes.
   - Fixed targeted test class: 3/3 once, then 20 isolated Maven/JVM processes 
at 3/3 each (60/60 total).
   - Full `broker -am test`: all 10 reactor modules passed; 2,369 tests, 9 
skips, 0 failures, and 0 errors. Broker ran 755 tests, including the new class 
at 3/3.
   - Checkstyle: 0 violations across all 10 modules.
   - SpotBugs: 0 bugs/errors across all code modules.
   - `git diff --check`: passed.
   
   


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