Skip to content

Commit

Permalink
[FLINK-28863][state]Add comments about why snapshot result of RocksDB…
Browse files Browse the repository at this point in the history
… native savepoint doesn't have empty shared-state
  • Loading branch information
ljz2051 authored and Myasuka committed Dec 22, 2022
1 parent a56a4d3 commit 287929c
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,15 @@ public SnapshotResult<KeyedStateHandle> get(CloseableRegistry snapshotCloseableR
checkpointedSize += getUploadedStateSize(sstFiles.values());
checkpointedSize += getUploadedStateSize(miscFiles.values());

// We make the 'sstFiles' as the 'sharedState' in IncrementalRemoteKeyedStateHandle,
// whether they belong to the sharded CheckpointedStateScope or exclusive
// CheckpointedStateScope.
// In this way, the first checkpoint after job recovery can be an incremental
// checkpoint in CLAIM mode, either restoring from checkpoint or restoring from
// native savepoint.
// And this has no effect on the registration of shareState currently, because the
// snapshot result of native savepoint would not be registered into
// 'SharedStateRegistry'.
final IncrementalRemoteKeyedStateHandle jmIncrementalKeyedStateHandle =
new IncrementalRemoteKeyedStateHandle(
backendUID,
Expand Down

0 comments on commit 287929c

Please sign in to comment.