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

LEDS: integrating with EDS #18195

Merged
merged 11 commits into from
Oct 1, 2021
Merged

LEDS: integrating with EDS #18195

merged 11 commits into from
Oct 1, 2021

Conversation

adisuissa
Copy link
Contributor

Commit Message: LEDS: integrating with EDS
Additional Description:
Allows the usage of the LEDS protocol with EDS messages.
Most of the changes are for the integration tests.
One key question is whether we can minimize the amount of memory used when LEDS isn't used.

Risk Level: Medium - Impact EDS behavior.
Testing: Many integration tests.
Docs Changes: TBD.
Release Notes: TBD.
Platform Specific Features: N/A.

Signed-off-by: Adi Suissa-Peleg [email protected]

Signed-off-by: Adi Suissa-Peleg <[email protected]>
@htuch
Copy link
Member

htuch commented Sep 22, 2021

@adisuissa thanks. Can we go over this PR at our sync tomorrow? I think I'd benefit from a guided tour given the size.

Signed-off-by: Adi Suissa-Peleg <[email protected]>
Signed-off-by: Adi Suissa-Peleg <[email protected]>
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

Overall looks good and excited to see LEDS almost there! A few implementation comments to start with, mostly about missing coverage / refactoring.
/wait

source/common/upstream/cds_api_helper.cc Show resolved Hide resolved
source/common/upstream/eds.cc Show resolved Hide resolved
source/common/upstream/eds.cc Outdated Show resolved Hide resolved
source/common/upstream/eds.cc Outdated Show resolved Hide resolved
source/common/upstream/eds.cc Outdated Show resolved Hide resolved
// Called upon an update to the locality.
if (validateAllLedsUpdated()) {
BatchUpdateHelper helper(*this);
priority_set_.batchHostUpdate(helper);
Copy link
Member

Choose a reason for hiding this comment

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

Is the invariant that this is called only once per update and for the last LEDS subscription to update?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is called once per LEDS update, and should cover the following cases:

  1. Before all the locality endpoints of a specific EDS cluster are ready (this will fail the validateAllLedsUpdated() call, and no actual update will occur.
  2. Whenever a new update for some locality arrives.

source/common/upstream/eds.cc Outdated Show resolved Hide resolved
source/common/upstream/static_cluster.cc Show resolved Hide resolved
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

Looks good! Just some minor comments.
/wait

source/common/upstream/cds_api_helper.cc Show resolved Hide resolved
source/common/upstream/eds.h Outdated Show resolved Hide resolved
test/integration/leds_integration_test.cc Outdated Show resolved Hide resolved
test/integration/base_integration_test.h Outdated Show resolved Hide resolved
Signed-off-by: Adi Suissa-Peleg <[email protected]>
Signed-off-by: Adi Suissa-Peleg <[email protected]>
@adisuissa
Copy link
Contributor Author

@htuch thanks for the comments. Should be ready for another pass.

Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@htuch htuch merged commit b279484 into envoyproxy:main Oct 1, 2021
@htuch
Copy link
Member

htuch commented Oct 1, 2021

FWIW I chatted with Adi offline and the plan is to land docs / release notes in a followup PR.

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.

2 participants