mjsax commented on code in PR #22165:
URL: https://github.com/apache/kafka/pull/22165#discussion_r3653576654


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/InMemoryTimeOrderedKeyValueChangeBuffer.java:
##########
@@ -399,12 +438,12 @@ public void evictWhile(final Supplier<Boolean> predicate,
                             next.getKey().time() + "]"
                     );
                 }
-                final K key = 
keySerde.deserializer().deserialize(changelogTopic, context.headers(), 
next.getKey().key().get());
                 final BufferValue bufferValue = next.getValue();
-                final Change<V> value = valueSerde.deserializeParts(
-                    changelogTopic,
-                    context.headers(),
-                    new Change<>(bufferValue.newValue(), 
bufferValue.oldValue())
+                final Headers headers = bufferValue.context().headers();

Review Comment:
   > in headers mode each part is already deserialized as a 
ValueTimestampHeaders and uses its own embedded headers
   
   Yes, it would require to extract the header again.
   
   > the headers var only feeds the key deserialize
   
   Yes, but this seems to be the critical part, that must work correctly? 
Otherwise we don't pass the correct record header into this deserialization 
step.
   
   > The bufferValue.newValue().headers() won't compile I assume.
   
   There is no such method -- `newValue()` only returns `byte[]`, but we have 
existing helpers that can extract the headers from the byte[] array.



-- 
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]

Reply via email to