Skip to content

Commit

Permalink
[enhancement](blacklist) print the detail stack that the client is sh…
Browse files Browse the repository at this point in the history
…utdown (#45850)
  • Loading branch information
yiguolei authored Dec 24, 2024
1 parent 9c7280b commit 69704df
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,12 @@ public Future<InternalService.PGetBeResourceResponse> getBeResource(InternalServ
return stub.withDeadlineAfter(timeoutSec, TimeUnit.SECONDS).getBeResource(request);
}

// Shutdown will also interrupt the coordinators that are using this client to receive data.
// And the backend will be add to blacklist and will not serve read or write.
public void shutdown() {
ConnectivityState state = channel.getState(false);
LOG.warn("shut down backend service client: {}, channel state: {}", address, state);
// Print the detail exception stack, so that we could find the reason why it is treat as bad.
LOG.warn("shut down backend service client: {}, channel state: {}", address, state, new Exception());
if (!channel.isShutdown()) {
channel.shutdown();
try {
Expand Down

0 comments on commit 69704df

Please sign in to comment.