-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement semaphore synchronization to prevent concurrent modificatio…
…ns of InstanceStatus Implement semaphore synchronization to prevent concurrent modifications of InstanceStatus - Added a Semaphore to control concurrent access to InstanceStatus modifications. - Modified EurekaClientConfigurationRefresher to acquire the semaphore before performing deregister and register operations. - Modified DiscoveryClientConfiguration to acquire the semaphore before performing refreshInstanceInfo operations. - Ensured the semaphore is released in a finally block to handle exceptions properly. This change addresses the issue of concurrent modifications of InstanceStatus, ensuring that only one thread can modify the status at a time.
- Loading branch information
Showing
1 changed file
with
97 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters