You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ro...@apache.org on 2023/08/05 17:49:36 UTC
[flink] branch master updated: [hotfix][checkpointing] Fix outdated java doc in SharedStateRegistry after FLINK-29913
This is an automated email from the ASF dual-hosted git repository.
roman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new c7d3e360530 [hotfix][checkpointing] Fix outdated java doc in SharedStateRegistry after FLINK-29913
c7d3e360530 is described below
commit c7d3e36053091b7d7b10e89c5f9dba3df46ec0bd
Author: wangfeifan <zo...@163.com>
AuthorDate: Sat Aug 5 19:14:55 2023 +0800
[hotfix][checkpointing] Fix outdated java doc in SharedStateRegistry after FLINK-29913
Co-authored-by: Roman <kh...@gmail.com>
---
.../apache/flink/runtime/state/SharedStateRegistry.java | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/state/SharedStateRegistry.java b/flink-runtime/src/main/java/org/apache/flink/runtime/state/SharedStateRegistry.java
index 097e7f12da8..53beb00bb35 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/state/SharedStateRegistry.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/state/SharedStateRegistry.java
@@ -54,19 +54,20 @@ public interface SharedStateRegistry extends AutoCloseable {
}
/**
- * Register a reference to the given shared state in the registry. If there is already a state
- * handle registered under the given key, the "new" state handle is disposed .
+ * Register a reference to the given shared state in the registry. The registry key should be
+ * based on the physical identifier of the state. If there is already a state handle registered
+ * under the same key and the 'new' state is not equal to the old one, an exception will be
+ * thrown.
*
- * <p>IMPORTANT: caller should check the state handle returned by the result, because the
- * registry is performing de-duplication and could potentially return a handle that is supposed
- * to replace the one from the registration request.
+ * <p>IMPORTANT: the caller must use the returned state handle instead of the passed one because
+ * the registry might replace or update it.
*
* @param state the shared state for which we register a reference.
* @param checkpointID which uses the state
* @param preventDiscardingCreatedCheckpoint as long as this state is still in use. The
* "checkpoint that created the state" is recorded on the first state registration.
- * @return the result of this registration request, consisting of the state handle that is
- * registered under the key by the end of the operation and its current reference count.
+ * @return the state handle registered under the given key. It might differ from the passed
+ * state handle, e.g. if it was a placeholder.
*/
StreamStateHandle registerReference(
SharedStateRegistryKey registrationKey,