pnowojski commented on a change in pull request #14892:
URL: https://github.com/apache/flink/pull/14892#discussion_r572280656



##########
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:
       It would be a "synchronisation" point, as that would be another place 
where one would have to start thinking about concurrency issues.
   
   > Using synchronized to prevent visibility issue seems somewhat non-obvious 
and error-prone to me. But if you prefer I'll replace volatile with 
synchronized.
   
   Yes, it's a hack, but at least you are not braking `@NonThreadSafe`tyness of 
the `OperatorChain`, and you do not spill this hack over the code base, as it's 
just limited to the `SourceStreamTask`.




----------------------------------------------------------------
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]


Reply via email to