ifndef-SleePy opened a new pull request #10332: [FLINK-13905][checkpointing] Separate checkpoint triggering into several asynchronous stages URL: https://github.com/apache/flink/pull/10332 ## What is the purpose of the change * This PR aims to separating checkpoint triggering into several asynchronous stages. * This is the heart part of threading model refactoring. ## Brief change log * Unify all error handling of checkpoint failure. * Change the semantic from queued to suspended if there are too many in-flight checkpoints. * Separate the triggering from synchronous to asynchronous. * The last commit is a bit large although I have done some preparations in the prior and this PR :( * Introduces an `isTriggering` variable to avoid competition between in-flight checkpoint trigger and the later one. Because we have to keep the order of triggering and avoid concurrent competition. * Introduces a `triggerRequestQueue` which is used to queue the trigger request which can't be triggered at that moment. * There are only two exits of triggering, `onTriggerSuccess` and `OnTriggerFailure`. Either of them must be called at the end of triggering lifecycle. In there, we maintain the status of `isTriggering`. * Do not invoke `CheckpointFailureManager#handleJobLevelCheckpointException` when trigger failure. It's useless for now. And it's also a blocking operation to get the current checkpoint id. * There are lots of test cases need to change because `triggerCheckpoint` becomes an asynchronous operation. We need to manually trigger the asynchronous trigger stages. * `triggerCheckpoint` will not throw exception directly even it fails at the very beginning. All error handling outside checkpoint coordinator should be through return value of `triggerCheckpoint`. In this way, we don't need "try catch" everywhere. ## Verifying this change * There are a lot of existing test cases and this change also added tests ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): no - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no - The serializers: no - The runtime per-record code paths (performance sensitive): no - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: it should be no - The S3 file system connector: no ## Documentation - Does this pull request introduce a new feature? no - If yes, how is the feature documented? not applicable
---------------------------------------------------------------- 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] With regards, Apache Git Services
