-
Notifications
You must be signed in to change notification settings - Fork 3.9k
plumb otel subchannel metrics disconnect error #12342
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
base: master
Are you sure you want to change the base?
plumb otel subchannel metrics disconnect error #12342
Conversation
binder/src/main/java/io/grpc/binder/internal/BinderClientTransport.java
Outdated
Show resolved
Hide resolved
binder/src/main/java/io/grpc/binder/internal/BinderClientTransport.java
Outdated
Show resolved
Hide resolved
core/src/main/java/io/grpc/internal/ClientTransportWithDisconnectReason.java
Outdated
Show resolved
Hide resolved
|
||
@Override | ||
public void shutdownNow(final Status reason) { | ||
shutdownNow(reason, SimpleDisconnectError.UNKNOWN); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SUBCHANNEL_SHUTDOWN
|
||
@Override | ||
public void shutdownNow(Status reason) { | ||
shutdownNow(reason, SimpleDisconnectError.UNKNOWN); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SUBCHANNEL_SHUTDOWN
|
||
@Override | ||
public void shutdownNow(Status reason, DisconnectError disconnectError) { | ||
shutdown(reason); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
disconnectError
looks like it should be passed to be passed to shutdown.
ArgumentCaptor<Status> captor = ArgumentCaptor.forClass(Status.class); | ||
verify(listener, timeout(TIME_OUT_MS)).transportShutdown(captor.capture()); | ||
verify(listener, timeout(TIME_OUT_MS)).transportShutdown(captor.capture(), | ||
any(DisconnectError.class)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably want to consider verifying the DisconnectError as well, for this and the other three below that use captor.capture().
b6dce83
to
339ef99
Compare
4df2777
to
2c3b757
Compare
last reviewed till 44fc3f9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My comments about SUBCHANNEL_SHUTDOWN are still outstanding, and would apply to the new shutdown() methods introduced (where I see some are UNKNOWN).
goAwayStatus = reason; | ||
listener.transportShutdown(goAwayStatus, SimpleDisconnectError.SUBCHANNEL_SHUTDOWN); | ||
stopIfNecessary(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems this method should just be shutdown(reason, SimpleDisconnectError.SUBCHANNEL_SHUTDOWN)
. I don't know why it was made to have a duplicate.
Finishes the remaining work of A94