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?

Copy link
Member

Choose a reason for hiding this comment

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

What are you trying to achieve with this? I don't follow what it has to do with anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In trying to figure out why in the interop test the onReady callback isn't being invoked I found that there is no visibility in any way into what would cause it to skip doing the notification even though the subchannel had gone into a READY state. This was trying to provide that visibility.

Copy link
Member

Choose a reason for hiding this comment

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

"Transport not ready" is very easy to misinterpret, change it to the stream is not ready. We will need to avoid the object array creation, so first check whether FINER logging is enabled.

xds/src/main/java/io/grpc/xds/client/XdsClientImpl.java Outdated Show resolved Hide resolved
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