Github user StephanEwen commented on a diff in the pull request: https://github.com/apache/flink/pull/5427#discussion_r184477785 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java --- @@ -1009,6 +1013,11 @@ public boolean restoreLatestCheckpointedState( LOG.debug("Status of the shared state registry after restore: {}.", sharedStateRegistry); + // Instruct the master hooks to initialize their state (unconditionally) + LOG.debug("Initializing the master hooks."); --- End diff -- Can you elaborate a bit why this initialization is happening in all cases? An alternative would be to have a `reset()` method or so on the master hook that is called further below, in the `if (latest == null)` code block. Initializing the state seems a tad bit unituitive to me here - I somehow assume that an init function is called once, while this one here is called on every restore.
---