m-trieu commented on code in PR #31317:
URL: https://github.com/apache/beam/pull/31317#discussion_r1619302421
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/client/grpc/StreamingEngineClient.java:
##########
@@ -227,10 +270,8 @@ private void startWorkerMetadataConsumer() {
}
@VisibleForTesting
- void finish() {
- if (!started.compareAndSet(true, false)) {
- return;
- }
+ public synchronized void finish() {
Review Comment:
they currently do not require extra synchronization
getWorkerMetadataStream.get().close(); // thread safe as Suppliers.memoize
has its own synchronization
The following have their own local synchronization but not exposed to
StreamingEngineClient
getWorkBudgetRefresher.stop();
newWorkerMetadataPublisher.shutdownNow();
newWorkerMetadataConsumer.shutdownNow();
channelCachingStubFactory.shutdown();
--
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]