rkhachatryan commented on code in PR #26831:
URL: https://github.com/apache/flink/pull/26831#discussion_r2232836074
##########
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/state/rocksdb/AbstractRocksDBState.java:
##########
@@ -176,7 +176,10 @@ <T> byte[] serializeValueNullSensitive(T value,
TypeSerializer<T> serializer)
throws IOException {
dataOutputView.clear();
dataOutputView.writeBoolean(value == null);
- return serializeValueInternal(value, serializer);
+ if (value != null) {
+ serializer.serialize(value, dataOutputView);
+ }
+ return dataOutputView.getCopyOfBuffer();
Review Comment:
Hey @1996fanrui , I see the following options w.r.t ChangelogStateBackend:
1. Add a new version of `StateMetaInfoReader` and explicitly encode whether
the state is null-tolerant
2. Add a new null-tolerant operation along with `ADD_OR_UPDATE_ELEMENT`
3. Ignore the problem (leave Changelog State Backend inconsistent with other
backends) and maybe keep a ticket to unify it
I didn't think through the 1st option though. One disadvantage (or
advantage?) is that it'd be relevant to all state backends.
I personally don't have any preference.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]