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

Refactor ES addition logic in Destination #12625

Merged
merged 1 commit into from
May 22, 2024
Merged

Refactor ES addition logic in Destination #12625

merged 1 commit into from
May 22, 2024

Conversation

alpeb
Copy link
Member

@alpeb alpeb commented May 20, 2024

This is a second take on #12427, which avoided a theoretical/correctness issue around overwritting new ES addresses with stale data.

We had to revert that in #12589 because the change introduced a bug, by returning early when the ES had no addresses and failed to properly initiallize addesses for the portPublisher.

This just removes the early return.

This is a second take on #12427, which avoided a theoretical/correctness
issue around overwritting new ES addresses with stale data.

We had to revert that in #12589 because the change introduced a bug, by
returning early when the ES had no addresses and failed to properly
initiallize `addesses` for the portPublisher.

This just removes the early return.
@alpeb alpeb requested a review from a team as a code owner May 20, 2024 13:38
@alpeb alpeb requested a review from adleong May 21, 2024 14:27
newAddressSet.Addresses[id] = addr
newAddressSet.LocalTrafficPolicy = pp.localTrafficPolicy
if _, ok := newAddressSet.Addresses[id]; !ok {
newAddressSet.Addresses[id] = addr
Copy link
Member

Choose a reason for hiding this comment

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

I notice that the assignment of newAddressSet.LocalTrafficPolicy = pp.localTrafficPolicy has been removed. According to my reading of endpointSliceToAddresses, the newAddressSet will always have the traffic policy from pp anyway, so this assignment was redundant. Is that correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's right

@alpeb alpeb merged commit df24ea6 into main May 22, 2024
39 checks passed
@alpeb alpeb deleted the alpeb/empty-addr branch May 22, 2024 14:12
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