WJ66880 opened a new issue, #9486:
URL: https://github.com/apache/rocketmq/issues/9486

   ### Before Creating the Bug Report
   
   - [x] I found a bug, not just asking a question, which should be created in 
[GitHub Discussions](https://github.com/apache/rocketmq/discussions).
   
   - [x] I have searched the [GitHub 
Issues](https://github.com/apache/rocketmq/issues) and [GitHub 
Discussions](https://github.com/apache/rocketmq/discussions)  of this 
repository and believe that this is not a duplicate.
   
   - [x] I have confirmed that this bug belongs to the current repository, not 
other repositories of RocketMQ.
   
   
   ### Runtime platform environment
   
   It has nothing to do with the OS.
   
   ### RocketMQ version
   
   Using version: 432, bug the latest version has the same bug.
   
   ### JDK Version
   
   It has nothing to do with the JDK.
   
   ### Describe the Bug
   
   In transaction message check task, when valueOfCurrentMinusBorn == 
checkImmunityTime, the current half offset will drive the while(true) loop for 
dozens of times.
   See the debug picture below: 
   
   
![Image](https://github.com/user-attachments/assets/ac3ba811-2018-4f18-a1ab-af25f855e1e3)
   
   logs in transaction.log picture:
   
   
![Image](https://github.com/user-attachments/assets/6f31e464-373a-4daa-92f6-b3fdf7bfa143)
   
   ### Steps to Reproduce
   
   Send tx message withe a hign throughput, and return commit or rollback in 
executeLocalTranstion method use condition
   `if (counter.getAndIncrement() % 100 == 0) {
                   return LocalTransactionState.COMMIT_MESSAGE;
               }
               return LocalTransactionState.UNKNOW;`
   
   ### What Did You Expect to See?
   
   When valueOfCurrentMinusBorn == checkImmunityTime happened by chance, break 
the loop or trigger the check back, either is ok. I prefer to choose break.
   
   ### What Did You See Instead?
   
   When valueOfCurrentMinusBorn == checkImmunityTime happened by chance, the 
while(true) loop didn't break.
   
   ### Additional Context
   
   _No response_


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