scwhittle commented on code in PR #30425:
URL: https://github.com/apache/beam/pull/30425#discussion_r1510885621
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/client/grpc/GrpcDirectGetWorkStream.java:
##########
@@ -250,6 +257,22 @@ public GetWorkBudget remainingBudget() {
.apply(currentInflightBudget);
}
+ @Override
+ public synchronized void close() {
+ super.close();
+ if (!rpcChannel.isShutdown()) {
Review Comment:
it seems like this could shutdown a channel that is still in the cache?
It seems like the cache should be responsible for shutting down channels
that it is sure that are not being used anymore.
If we need to track who is using the endpoint, do we need the cache? It
seems like instead we could have the StreamingEngineClient cache the channels
internally and shut them down when the worker endpoints change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]