yanghua commented on a change in pull request #8322: [FLINK-12364] Introduce a 
CheckpointFailureManager to centralized manage checkpoint failure
URL: https://github.com/apache/flink/pull/8322#discussion_r293002340
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
 ##########
 @@ -439,6 +436,10 @@ public boolean triggerCheckpoint(long timestamp, boolean 
isPeriodic) {
                        triggerCheckpoint(timestamp, checkpointProperties, 
null, isPeriodic, false);
                        return true;
                } catch (CheckpointException e) {
+                       long latestGeneratedCheckpointId = 
getCheckpointIdCounter().get();
 
 Review comment:
   I think to get the latest generated checkpoint id is the simplest and most 
direct way. In this way, we do not consider any potential problems:
   
   - The concurrent problem, although at present, there is no risk to introduce 
a field to store, but based on Checkpoint IDCounter, there is no need to worry 
about this problem at all.
   - Introducing a global field will bring potential misuse risks and hidden 
dangers for subsequent use in other logic in the future.

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


With regards,
Apache Git Services

Reply via email to