[
https://issues.apache.org/jira/browse/FLINK-19596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17216563#comment-17216563
]
Till Rohrmann commented on FLINK-19596:
---------------------------------------
Thanks for creating this issue [~wind_ljy]. I think you are right that we
should only recover the checkpoints once during a single leader session.
Ideally, this should happen when the {{JobMaster}} is started. In order to do
it properly, we would have to move the {{CompletedCheckpointStore}} from the
{{ExecutionGraph}} to the {{JobMaster}} level. If this is too involved, then
using a lazy loading strategy sounds good to me. [~roman_khachatryan] proposed
in a private thread to check whether the set of registered checkpoint ids has
changed and only if this is true to load the checkpoints again.
> Do not recover CompletedCheckpointStore on each failover
> --------------------------------------------------------
>
> Key: FLINK-19596
> URL: https://issues.apache.org/jira/browse/FLINK-19596
> Project: Flink
> Issue Type: Improvement
> Components: Runtime / Checkpointing
> Affects Versions: 1.11.2
> Reporter: Jiayi Liao
> Priority: Major
>
> {{completedCheckpointStore.recover()}} in
> {{restoreLatestCheckpointedStateInternal}} could be a bottleneck on failover
> because the {{CompletedCheckpointStore}} needs to load HDFS files to
> instantialize the {{CompleteCheckpoint}} instances.
> The impact is significant in our case below:
> * Jobs with high parallelism (no shuffle) which transfer data from Kafka to
> other filesystems.
> * If a machine goes down, several containers and tens of tasks are affected,
> which means the {{completedCheckpointStore.recover()}} would be called tens
> of times since the tasks are not in a failover region.
> And I notice there is a "TODO" in the source codes:
> {code:java}
> // Recover the checkpoints, TODO this could be done only when there is a new
> leader, not on each recovery
> completedCheckpointStore.recover();
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)