m-trieu commented on code in PR #30425:
URL: https://github.com/apache/beam/pull/30425#discussion_r1513573432
##########
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:
yea this is what was i was initially thinking but opted to use the cache and
handle the closing of the channels in `StreamingEngineClient`.
I think the channelCache encapsulates the logic well and makes it more
testable?
--
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]