QiuYucheng2003 opened a new pull request, #15915: URL: https://github.com/apache/dubbo/pull/15915
## What is the purpose of the change Fixes #15886 This PR fixes a thread leak issue in `NacosRegistry.java`. The method `scheduleServiceNamesLookup` had a race condition where multiple threads could pass the `if (scheduledExecutorService == null)` check simultaneously, leading to the creation of multiple `ScheduledExecutorService` instances that were never shut down. ## Brief changelog * Applied **Double-Checked Locking** in `scheduleServiceNamesLookup` to ensure the executor service is instantiated safely and only once. ## Verifying this change * Verified via code logic analysis (fixing the race condition). * Existing unit tests should pass. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
