Github user StephanEwen commented on a diff in the pull request:
https://github.com/apache/flink/pull/5885#discussion_r183214737
--- Diff:
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBKeyedStateBackend.java
---
@@ -1177,7 +1177,7 @@ private void
restoreKeyGroupsShardWithTemporaryHelperInstance(
throw new StateMigrationException("State
migration isn't supported, yet.");
} else {
stateInfo.f1 = newMetaInfo;
- return stateInfo.f0;
+ return Tuple2.of(stateInfo.f0,
newMetaInfo.getStateSerializer());
--- End diff --
Mirroring a the result from an offline discussion here:
This is a bit fragile - the fact that the `newMetaInfo` is mutable and the
serializer is altered in there and then obtained from there again. Makes it
harder for future maintainers and easy to accidentally break in the future.
The meta info should be immutable, and the re-configured serializer (or the
original, if no reconfiguration is needed) would probably best be part of the
compatiblity result.
---