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".
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---