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


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/MeteredKeyValueStore.java:
##########
@@ -420,18 +432,26 @@ public void close() {
         }
     }
 
-    protected V outerValue(final byte[] value) {
-        return value != null ? serdes.valueFrom(value, new RecordHeaders()) : 
null;
+    protected byte[] serializeValue(final V value) {
+        return value != null ? serdes.rawValue(value, 
internalContext.headers()) : null;

Review Comment:
   > 1Q: should we check if internalContext != null?
   
   I would say no? If `internalContext` would be `null`, it would be a bug (I 
believe), so we should rather expose such an issue directly, and fail fast by 
crashing, and not "mask" the bug by not failing?



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