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 duplicate endpoint handling in HealthCheckedEndpointGroup #6190

Merged
merged 2 commits into from
Apr 8, 2025

Conversation

minwoox
Copy link
Contributor

@minwoox minwoox commented Apr 2, 2025

Motivation:
HealthCheckedEndpointGroup uses a list instead of a set to gather all endpoints, allowing for potential duplicates. However, when checking endpoints before adding them from the old group, it iterates over all elements, leading to issues. A separate set is needed to handle this properly.

Modifications:

  • Introduced an additional set to track endpoints when updating from the old group.

Result:

  • Ensures efficient endpoint updates in HealthCheckedEndpointGroup.

Motivation:
`HealthCheckedEndpointGroup` uses a list instead of a set to gather all endpoints, allowing for potential duplicates.
However, when checking endpoints before adding them from the old group, it iterates over all elements, leading to issues.
A separate set is needed to handle this properly.

Modifications:
- Introduced an additional set to track endpoints when updating from the old group.

Result:
- Ensures efficient endpoint updates in `HealthCheckedEndpointGroup`.
@minwoox minwoox added the defect label Apr 2, 2025
@minwoox minwoox added this to the 1.32.4 milestone Apr 2, 2025
@minwoox minwoox mentioned this pull request Apr 7, 2025
Copy link
Member

@trustin trustin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ikhoon ikhoon merged commit 924e977 into line:main Apr 8, 2025
14 checks passed
ikhoon pushed a commit to ikhoon/armeria that referenced this pull request Apr 8, 2025
…#6190)

Motivation:
`HealthCheckedEndpointGroup` uses a list instead of a set to gather all
endpoints, allowing for potential duplicates. However, when checking
endpoints before adding them from the old group, it iterates over all
elements, leading to issues. A separate set is needed to handle this
properly.

Modifications:
- Introduced an additional set to track endpoints when updating from the
old group.

Result:
- Ensures efficient endpoint updates in `HealthCheckedEndpointGroup`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants