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:Move creating the retry timer in handleRpcStreamClosed to as late as possible and call close() #11776

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

larry-safran
Copy link
Contributor

Call close() instead of explicitly setting closed = true and calling cleanup() since that will also terminate the underlying ClientCall.
Also add some debug logging.

…possible and call `close` so that the `call` is cancelled.

Also add some debug logging.
@larry-safran larry-safran requested a review from ejona86 December 24, 2024 00:23
@@ -371,6 +375,11 @@ private void notifyIfReady() {
boolean doNotify;
synchronized (onReadyLock) {
doNotify = isReady();
if (!doNotify) {
log.log(Level.FINE,
"Transport not ready. allocated/de:{0}/{3}, sent queued: {1}, ready thresh: {2}",
Copy link
Member

Choose a reason for hiding this comment

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

This can create an immense about of logspam. It's also not at all clear what it is talking about (if you aren't looking at the line of code logs this, it is meaningless). What is this trying to achieve?

@@ -957,6 +960,7 @@ public void handleStreamClosed(Status status, boolean shouldTryFallback) {

ControlPlaneClient cpcClosed = serverCpClientMap.get(serverInfo);
if (cpcClosed == null) {
logger.log(XdsLogLevel.DEBUG, "Couldn't find CPC for {0}", serverInfo);
Copy link
Member

Choose a reason for hiding this comment

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

This log statement is not at all clear. Any time this happens we'd expect us not to care because the CPC is shut down, but if you just read the message you would probably think this a surprise.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've made the message clearer. We might care because cleanup and metric reporting are being skipped.

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