Github user tzulitai commented on a diff in the pull request:
https://github.com/apache/flink/pull/5230#discussion_r163935065
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/state/OperatorBackendSerializationProxy.java
---
@@ -77,16 +90,29 @@ public void read(DataInputView in) throws IOException {
super.read(in);
int numKvStates = in.readShort();
- stateMetaInfoSnapshots = new ArrayList<>(numKvStates);
+ operatorStateMetaInfoSnapshots = new ArrayList<>(numKvStates);
for (int i = 0; i < numKvStates; i++) {
- stateMetaInfoSnapshots.add(
-
OperatorBackendStateMetaInfoSnapshotReaderWriters
- .getReaderForVersion(getReadVersion(),
userCodeClassLoader)
- .readStateMetaInfo(in));
+ operatorStateMetaInfoSnapshots.add(
+
OperatorBackendStateMetaInfoSnapshotReaderWriters
+
.getOperatorStateReaderForVersion(getReadVersion(), userCodeClassLoader)
+
.readOperatorStateMetaInfo(in));
}
+
+ int numBroadcastStates = in.readShort();
--- End diff --
One straightforward way to fix this is, is to uptick the current `VERSION`
to 3, and here you do:
```
if (getReadVersion() >= 3) {
// read broadcast state stuff
}
```
so we only try to read broadcast state stuff if the written version in the
savepoint is larger or equal to 3.
---