aimiebell commented on a change in pull request #14754:
URL: https://github.com/apache/flink/pull/14754#discussion_r572622956



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
##########
@@ -1095,7 +1084,7 @@ public void initFailureCause(Throwable t) {
      */
     void vertexFinished() {
         assertRunningInJobMasterMainThread();
-        final int numFinished = ++verticesFinished;
+        final int numFinished = ++numFinishedVertices;

Review comment:
       I detect that this code is problematic. According to the [Correctness 
(CORRECTNESS)](https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#correctness-correctness),
 [DLS: Overwritten increment 
(DLS_OVERWRITTEN_INCREMENT)](https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#dls-overwritten-increment-dls-overwritten-increment).
   The code performs an increment operation (e.g., i++) and then immediately 
overwrites it. For example, i = i++ immediately overwrites the incremented 
value with the original value.
   




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to