Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #gh-4094. #4308

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Fix #gh-4094. #4308

wants to merge 2 commits into from

Conversation

bazzop
Copy link

@bazzop bazzop commented Sep 4, 2024

No description provided.

…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.
@OlgaMaciaszek
Copy link
Collaborator

Hello @bazzop, thanks for submitting the PR. This looks like a duplicate of #4301. Please pick one and close the other or -preferably- close both and open a new one against the 4.1.x branch rather than main. Please make sure to address all the comments from #4301 in the final PR as we'll not be cross-pasting them.

@OlgaMaciaszek
Copy link
Collaborator

Ok, I see this is very fresh, so probably you're addressing my comments on the go :). Please keep one active PR in this repo though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants