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

xds: Preserve nonce when unsubscribing type #11796

Merged
merged 2 commits into from
Jan 3, 2025

Conversation

ejona86
Copy link
Member

@ejona86 ejona86 commented Jan 3, 2025

This fixes a regression introduced in 19c9b99.

b/374697875

This fixes a regression introduced in 19c9b99.

b/374697875
@ejona86 ejona86 requested a review from larry-safran January 3, 2025 19:13
// The resource type no longer has subscribing resources; clean up references to it.
// Except for nonces. If the resource type becomes used again the control plane can ignore
// requests for old/missing nonces. Old type's nonces are dropped when the ADS stream is
// restarted.
versions.remove(resourceType);
Copy link
Member

Choose a reason for hiding this comment

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

I think we should retain the version also. The version doesn't change when we change the set of resources that we're subscribed to, and unsubscribing from all resources is just a special case of changing the set of resources that we're subscribed to.

Copy link
Member Author

@ejona86 ejona86 Jan 3, 2025

Choose a reason for hiding this comment

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

We had discussed this offline and Mark prefers keeping the version but doesn't see it as mandatory. We (grpc-java) want to drop our resource data structures, and that means the version is also lost. The version serves no purpose when there are no resources saved by the client, so it can't make any difference which way it is done.

Copy link
Member

Choose a reason for hiding this comment

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

I agree that it probably won't cause any problems to drop it. But I do worry about potential edge cases we might hit in the future.

I guess let's kick the can down the road here and see if we have problems.

@ejona86 ejona86 merged commit 1cf1927 into grpc:master Jan 3, 2025
16 checks passed
@ejona86 ejona86 deleted the xds-keep-nonce branch January 3, 2025 20:34
@ejona86
Copy link
Member Author

ejona86 commented Jan 4, 2025

I'm purposefully waiting over the weekend before backporting. I want to see the tests go green first.

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.

3 participants