rkhachatryan commented on a change in pull request #18741:
URL: https://github.com/apache/flink/pull/18741#discussion_r805618324
##########
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.
Yes, but because of wrapping, `SharedStateRegistry` will call
`IncrementalRemoteKeyedStateHandle.equals`, which in turn will compare File
state handle with a placeholder. Currently, `SharedStateRegistry` has a
separate branch for placeholders.
> Actually, I did not understand in what case will we have two or more
materializations, in the case of restoring?
Yes.
> Or in other words, what test will fail if do not compare the state handle
id?
IIRC, `EventTimeWindowCheckpointingITCase` was failing with materialization
interval of `100ms`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]