You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/02/14 08:32:52 UTC

[GitHub] [flink] Myasuka commented on a change in pull request #18741: [FLINK-26101][changelog] Avoid shared state registry to discard multi-registered identical changelog state

Myasuka commented on a change in pull request #18741:
URL: https://github.com/apache/flink/pull/18741#discussion_r805603444



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/changelog/ChangelogStateBackendHandle.java
##########
@@ -237,6 +237,23 @@ public FSDataInputStream openInputStream() throws IOException {
             public Optional<byte[]> asBytesIfInMemory() {
                 throw new UnsupportedOperationException("Should not call here.");
             }
+
+            @Override
+            public boolean equals(Object o) {
+                if (this == o) {
+                    return true;
+                }
+                if (o == null || getClass() != o.getClass()) {
+                    return false;
+                }
+                StreamStateHandleWrapper that = (StreamStateHandleWrapper) o;
+                return Objects.equals(keyedStateHandle, that.keyedStateHandle);

Review comment:
       The `PlaceholderStreamStateHandle` itself is not the materialized keyed state handle, but part of it. Actually, I did not understand in what case will we have two or more materializations, in the case of restoring?
   
   Or in other words, what test will fail if do not compare the state handle id?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org