mjsax commented on code in PR #22165:
URL: https://github.com/apache/kafka/pull/22165#discussion_r3654675708
##########
streams/src/main/java/org/apache/kafka/streams/state/internals/InMemoryTimeOrderedKeyValueChangeBuffer.java:
##########
@@ -71,8 +75,14 @@ public final class
InMemoryTimeOrderedKeyValueChangeBuffer<K, V, T> implements T
private static final byte[] V_1_CHANGELOG_HEADER_VALUE = {(byte) 1};
private static final byte[] V_2_CHANGELOG_HEADER_VALUE = {(byte) 2};
private static final byte[] V_3_CHANGELOG_HEADER_VALUE = {(byte) 3};
+ // V4 is identical to V3 on the wire, except that the prior/old/new value
parts are each encoded
+ // as a ValueTimestampHeaders blob
([headersSize][headers][timestamp][value]) instead of a plain
+ // value. It is only written when headers-aware stores are enabled
(dsl.store.format=HEADERS).
+ private static final byte[] V_4_CHANGELOG_HEADER_VALUE = {(byte) 4};
Review Comment:
Thinking about it, introducing a V4 would break our offline downgrade path,
right? KS 4.3 and older won't be able to read V4 format.
It seems we should not add V4, but put the header into the Kafka message
header field, as we did for all other state store to keep the value-bytes
unmodified, and backwards compatible.
--
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]