You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ta...@apache.org on 2022/12/26 02:14:25 UTC
[flink] branch release-1.16 updated: [FLINK-28863][state]Add comments about why snapshot result of RocksDB native savepoint doesn't have empty shared-state
This is an automated email from the ASF dual-hosted git repository.
tangyun pushed a commit to branch release-1.16
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.16 by this push:
new bb17c3baab7 [FLINK-28863][state]Add comments about why snapshot result of RocksDB native savepoint doesn't have empty shared-state
bb17c3baab7 is described below
commit bb17c3baab727c23059db978ca48adadbbd0e897
Author: Jinzhong Li <li...@gmail.com>
AuthorDate: Fri Dec 16 11:38:14 2022 +0800
[FLINK-28863][state]Add comments about why snapshot result of RocksDB native savepoint doesn't have empty shared-state
---
.../state/snapshot/RocksIncrementalSnapshotStrategy.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/snapshot/RocksIncrementalSnapshotStrategy.java b/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/snapshot/RocksIncrementalSnapshotStrategy.java
index bd464b05677..67c6a9659e4 100644
--- a/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/snapshot/RocksIncrementalSnapshotStrategy.java
+++ b/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/snapshot/RocksIncrementalSnapshotStrategy.java
@@ -294,6 +294,15 @@ public class RocksIncrementalSnapshotStrategy<K>
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,