pnowojski commented on a change in pull request #14892:
URL: https://github.com/apache/flink/pull/14892#discussion_r571985243
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OperatorChain.java
##########
@@ -120,7 +120,7 @@
private final OperatorEventDispatcherImpl operatorEventDispatcher;
- private boolean isStoppingBySyncSavepoint;
+ private volatile boolean isStoppingBySyncSavepoint;
Review comment:
This would introduce new "synchronisation" point and complicating
threading model of a class, that is supposed to be "non thread safe". Why can
not we keep this as non thread safe?
For example instead of setting this directly from the source thread, you
could enqueue a mailbox action to unset it. Or even keeping the previous
arrangement with acquiring manually `synchronized (lock)` in the source thread
would be much better, as it wouldn't spill to the `OperatorChain`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]