-
Notifications
You must be signed in to change notification settings - Fork 505
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
incrementalXDS does not cancel existing watch #446
Comments
@snowp I think this is actually a problem that we might have to think about with regards to the nonce handling too. SOTW will cancel if the nonces are equal: responseNonce, seen := values.nonces[typeUrl]
if !seen || responseNonce == nonce {
if cancel, seen := values.cancellations[typeUrl]; seen && cancel != nil {
cancel()
}
values.cancellations[typeUrl] = s.cache.CreateWatch(req, values.responses)
} But delta does the above and only looks for something that doesn't exist. |
Wouldn't we just cancel the watch whenever we get a response? I'm not sure how nonce handling comes into play since its essentially not used in delta atm? |
Ah yea we could do that, I was trying to rationalize around handling ACKs, etc... but that's a good point if the nonce really isn't used in delta atm then we can just cancel. I'll test this change |
@alecholmez thanks for looking into the issue, and making a patch quickly. I have been waiting for the incremental XDS and it's great to have it. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
@jparklab This is now patched in the server code. Let me know if this issue is resolved! |
@alecholmez Thanks for the patch. I'll test it with out tests and post an update. |
I'm going to close this with regards to the patch, but if the issue pops up again we can reopen |
Cancel on watch object is called when watch does not exist in the map (https://github.com/envoyproxy/go-control-plane/blob/main/pkg/server/delta/v3/server.go#L168). (It is currently no-op since when 'ok' is false, watch will have the zero value. )
Cancel should be called when 'ok' is true since we expect cancel to be called when we find watch in the map.
The text was updated successfully, but these errors were encountered: