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:16:16 UTC
[flink] branch release-1.15 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.15
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.15 by this push:
new beaa0f698b0 [FLINK-28863][state]Add comments about why snapshot result of RocksDB native savepoint doesn't have empty shared-state
beaa0f698b0 is described below
commit beaa0f698b0551a04cc751292cddeb4ba39c01e2
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 8532e567549..2de0972c22c 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
@@ -408,6 +408,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,