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

Call size method on Application to avoid copying instance info #1511

Merged
merged 1 commit into from
Aug 18, 2023

Conversation

kilink
Copy link
Member

@kilink kilink commented Aug 17, 2023

DiscoveryClient called getInstancesAsIsFromEureka in a couple locations to get the number of instances for an application, when Application already has a method for this purpose that doesn't also incur the overhead of defensively copying.

Additionally, fix a concurrency bug in Application.size, as it was accessing the underlying instances field without synchronization.

DiscoveryClient called getInstancesAsIsFromEureka in a couple locations to get
the number of instances for an application, when Application already has a method
for this purpose that doesn't also incur the overhead of defensively copying.

Additionally, fix a concurrency bug in Application.size, as it was
accessing the underlying instances field without synchronization.
@howardyuan howardyuan merged commit 0b32fa1 into Netflix:2.x Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants