[ https://issues.apache.org/jira/browse/FLINK-10074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16605726#comment-16605726 ]
ASF GitHub Bot commented on FLINK-10074: ---------------------------------------- azagrebin commented on a change in pull request #6567: [FLINK-10074] Allowable number of checkpoint failures URL: https://github.com/apache/flink/pull/6567#discussion_r215586486 ########## File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/CheckpointExceptionHandlerFactory.java ########## @@ -48,12 +51,35 @@ public CheckpointExceptionHandler createCheckpointExceptionHandler( */ static final class FailingCheckpointExceptionHandler implements CheckpointExceptionHandler { + private final int tolerableNumber; + private AtomicInteger cpFailureCounter; + + FailingCheckpointExceptionHandler(int tolerableNumber) { + this.cpFailureCounter = new AtomicInteger(0); + this.tolerableNumber = tolerableNumber; + } + @Override public void tryHandleCheckpointException( CheckpointMetaData checkpointMetaData, Exception exception) throws Exception { - throw exception; + if (needThrowCheckpointException()) { Review comment: I think at this point the function `tryHandleCheckpointException` is too simple to break it down and add `needThrowCheckpointException`. The logic could be all in here. ---------------------------------------------------------------- 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: us...@infra.apache.org > Allowable number of checkpoint failures > ---------------------------------------- > > Key: FLINK-10074 > URL: https://issues.apache.org/jira/browse/FLINK-10074 > Project: Flink > Issue Type: Improvement > Components: State Backends, Checkpointing > Reporter: Thomas Weise > Assignee: vinoyang > Priority: Major > Labels: pull-request-available > > For intermittent checkpoint failures it is desirable to have a mechanism to > avoid restarts. If, for example, a transient S3 error prevents checkpoint > completion, the next checkpoint may very well succeed. The user may wish to > not incur the expense of restart under such scenario and this could be > expressed with a failure threshold (number of subsequent checkpoint > failures), possibly combined with a list of exceptions to tolerate. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)