cherryMJY opened a new pull request, #10178: URL: https://github.com/apache/rocketmq/pull/10178
Brief Description This PR enhances thread safety in MQClientInstance by adding the synchronized keyword to the registerAdminExt() method. This change ensures consistency with the existing registerConsumer() and registerProducer() methods, which are already synchronized. Additionally, a concurrent test case has been added to verify the thread safety of the registration methods. Changes: Add synchronized keyword to registerAdminExt() method Add concurrent test case to verify thread safety How Did You Test This Change? Unit Test: Added a concurrent test case that simulates multiple threads calling registerAdminExt() simultaneously Verification: The test verifies that concurrent registration operations are thread-safe and do not cause race conditions Consistency Check: Confirmed that all three registration methods (registerConsumer(), registerProducer(), and registerAdminExt()) now have consistent synchronization behavior -- 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]
