Loyal-Young opened a new pull request, #6467:
URL: https://github.com/apache/rocketmq-dashboard/pull/6467

   ### Which Issue(s) This PR Fixes
   
   Fixes #6463
   
   ### Brief Description
   
   Restore the caller's interrupt flag when a pooled RocketMQ action throws 
`InterruptedException`. Both `MqClientPool` and `MqAdminExtFactory` translate 
checked failures into `BusinessException`; blocking calls clear the flag when 
throwing, so cancellation was lost at these boundaries.
   
   The existing error translation and lease release remain in place. Ordinary 
failures do not set the interrupt flag.
   
   ### How Did You Test This Change?
   
   - Added interrupted producer, pull-consumer and admin action tests using an 
interrupted `Thread.sleep`, which clears the flag before the wrapper receives 
the exception. All three failed against the original implementation.
   - Added ordinary-failure controls and verified that retiring each pool shuts 
down the client after the failed action, exercising lease release.
   - `mvn -B -ntp -Dtest=MqClientPoolTest,MqAdminExtFactoryTest test`: **23 
passed**.
   - Maven Checkstyle and `git diff --check`: passed.
   
   RocketMQ clients are mocked; no live broker or full backend suite was run.
   
   ### Checklist
   
   - [x] One coherent fix with regression tests
   - [x] No dependencies, configuration or API changes
   
   ### AI Assistance
   
   AI assistance was used to trace pooled exception handling, draft the 
interrupt restoration and deterministic tests, inspect the diff, and execute 
the listed verification.
   


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