m-trieu commented on code in PR #31784: URL: https://github.com/apache/beam/pull/31784#discussion_r1674835906
########## runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/client/commits/StreamingEngineWorkCommitter.java: ########## @@ -85,7 +88,7 @@ public static StreamingEngineWorkCommitter create( @Override @SuppressWarnings("FutureReturnValueIgnored") public void start() { - if (!commitSenders.isShutdown()) { + if (isRunning.compareAndSet(false, true) && !commitSenders.isShutdown()) { Review Comment: we do not was just opting for this route to not use locks and to future proof incase changes are made in the future where someone intentionally or not calls start() multiple times. In this case start() and stop() logic are only executed once, no matter how many times called. I don't think we should throw an exception since we will have to handle it in a caller or else crash, but if this is best can update thie code. -- 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: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org