[
https://issues.apache.org/jira/browse/FLINK-4731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15552325#comment-15552325
]
ASF GitHub Bot commented on FLINK-4731:
---------------------------------------
Github user StefanRRichter commented on a diff in the pull request:
https://github.com/apache/flink/pull/2584#discussion_r82222653
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/state/memory/ByteStreamStateHandle.java
---
@@ -20,62 +20,49 @@
import org.apache.flink.core.fs.FSDataInputStream;
import org.apache.flink.runtime.state.StreamStateHandle;
-import org.apache.flink.util.InstantiationUtil;
import org.apache.flink.util.Preconditions;
import java.io.IOException;
-import java.io.Serializable;
-import java.util.Arrays;
/**
* A state handle that contains stream state in a byte array.
*/
public class ByteStreamStateHandle implements StreamStateHandle {
- private static final long serialVersionUID = -5280226231200217594L;
+ private static final long serialVersionUID = -5280226231202517594L;
/**
- * the state data
+ * The state data.
*/
protected final byte[] data;
/**
+ * A unique name of by which this state handle is identified and
compared. Like a filename, all
+ * {@link ByteStreamStateHandle} with the exact same name must also
have the exact same content in data.
+ */
+ protected final String handleName;
--- End diff --
The problem before was, that two ByteStreamStateHandle were considered
equal + same hash code if their byte[] had the same content. However, like with
files, it should be possible two have two handles with the same content that
are not considered as equal (e.g. some tests created the same content for
different handles and deduplicated some handles away because of this). From
this point of view, the string mimics a "file name".
> HeapKeyedStateBackend restoring broken for scale-in
> ---------------------------------------------------
>
> Key: FLINK-4731
> URL: https://issues.apache.org/jira/browse/FLINK-4731
> Project: Flink
> Issue Type: Bug
> Components: State Backends, Checkpointing
> Reporter: Stefan Richter
> Assignee: Stefan Richter
>
> Restoring the HeapKeyedStateBackend is broken in case that parallelism is
> reduced. The restore method is overwriting previously restored state.
> We should also add scale-in testing to the RescalingITCase.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)