Github user StefanRRichter commented on a diff in the pull request:
https://github.com/apache/flink/pull/5934#discussion_r185465407
--- Diff:
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBKeyedStateBackend.java
---
@@ -1987,6 +1987,8 @@ private void writeKVStateMetaData() throws
IOException {
KeyedBackendSerializationProxy<K> serializationProxy =
new KeyedBackendSerializationProxy<>(
+ // we use the statBackend's
keySerializer directly here, because it just be written here.
+ // NOTE: There's a loophole when the
serializer is stateful, but that rarely occur in reality use case.
--- End diff --
I wonder if this note does not sound a bit to scary, maybe we could just
add a todo that this code assumes that writing a serializer is threadsafe and
that we could get a serialized form already at state registration time in the
future?
---