You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 14, 2026. It is now read-only.
Currently generated stubs delegate close() to BackgroundResourceAggregation#shutdown(). Which will effectively end up calling channel.shutdown() followed immediately by executor.shutdown(). This can result in RPCs hanging indefinitely.
Steps leading to a hang:
future = stub.someCallable().futureCall(); // start rpc
// prevents new RPCs from starting, but existing RPCs can continue
// executor is shutdown
stub.close();
// grpc receives a response, but doesn't have executor to notify the future
// so this will hang indefinitely
future.get()
To avoid this situation, stub.close() should call close() on background resources, which wait for the channel to terminate before shutting down the executor.
Currently generated stubs delegate close() to BackgroundResourceAggregation#shutdown(). Which will effectively end up calling channel.shutdown() followed immediately by executor.shutdown(). This can result in RPCs hanging indefinitely.
Steps leading to a hang:
future = stub.someCallable().futureCall(); // start rpc
// prevents new RPCs from starting, but existing RPCs can continue
// executor is shutdown
stub.close();
// grpc receives a response, but doesn't have executor to notify the future
// so this will hang indefinitely
future.get()
To avoid this situation, stub.close() should call close() on background resources, which wait for the channel to terminate before shutting down the executor.
See googleapis/java-bigtable#916 for more details