yanghua commented on a change in pull request #8410: [FLINK-11159] Allow
configuration whether to fall back to savepoints for restore
URL: https://github.com/apache/flink/pull/8410#discussion_r284587150
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StandaloneCompletedCheckpointStore.java
##########
@@ -77,8 +79,32 @@ public void addCheckpoint(CompletedCheckpoint checkpoint)
throws Exception {
}
@Override
- public CompletedCheckpoint getLatestCheckpoint() {
- return checkpoints.isEmpty() ? null : checkpoints.getLast();
+ public CompletedCheckpoint getLatestCheckpoint(boolean
isPreferCheckpointForRecovery) {
+ if (checkpoints.isEmpty()) {
+ return null;
+ }
+
+ CompletedCheckpoint candidate = checkpoints.getLast();
Review comment:
Actually, it is a config option which depends on users themselves production
scene. Some scene, the cost of rolling offset back is higher than recovery
time, however, some scene is converse. To guess the scene is difficult to a
general compute engine.
----------------------------------------------------------------
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