rkhachatryan commented on a change in pull request #18741:
URL: https://github.com/apache/flink/pull/18741#discussion_r805588711
##########
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:
There is one more problem here - `PlaceholderStreamStateHandle`.
If there were two or more materializations, but the internal backend used a
previously uploaded SST, then `equals` will return false. The wrapper will
receive a discard call again.
I
[used](https://github.com/apache/flink/pull/18556/commits/2403a8446da47c558d1d0c3283d056ac6f7b1988#diff-9ec20ab5bc5e16e0c04167e1b546902cdb49635ac5d15f4172fb7f36a98c77bdR250)
`getStateHandleId` for comparison, and it solved the problem.
--
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]