flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] azagrebin commented on a change in pull request #7118: [FLINK-10482] Fix double counting of checkpoint stat
Date Wed, 05 Dec 2018 15:21:01 GMT
azagrebin commented on a change in pull request #7118: [FLINK-10482] Fix double counting of
checkpoint stat
URL: https://github.com/apache/flink/pull/7118#discussion_r239108282
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
 ##########
 @@ -1195,11 +1196,16 @@ public void stopCheckpointScheduler() {
 				currentPeriodicTrigger = null;
 			}
 
-			for (PendingCheckpoint p : pendingCheckpoints.values()) {
+			// take a snapshot of pendingCheckpoints to clear them and prevent aborting them twice
+			// in case of subsequent call of stopCheckpointScheduler()
+			List<PendingCheckpoint> pendingCheckpointsSnapshot =
+				new ArrayList<>(pendingCheckpoints.values());
+			pendingCheckpoints.clear();
+
+			for (PendingCheckpoint p : pendingCheckpointsSnapshot) {
 
 Review comment:
   Agree, this fix will solve the original problem without other changes.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message