mjsax commented on code in PR #21639:
URL: https://github.com/apache/kafka/pull/21639#discussion_r2893642561
##########
streams/src/main/java/org/apache/kafka/streams/state/internals/ChangeLoggingSessionBytesStoreWithHeaders.java:
##########
@@ -43,13 +43,20 @@ public class ChangeLoggingSessionBytesStoreWithHeaders
@Override
public void remove(final Windowed<Bytes> sessionKey) {
+ final byte[] oldAggregationWithHeaders = wrapped().fetchSession(
+ sessionKey.key(),
+ sessionKey.window().start(),
+ sessionKey.window().end()
+ );
wrapped().remove(sessionKey);
internalContext.logChange(
name(),
SessionKeySchema.toBinary(sessionKey),
null,
internalContext.recordContext().timestamp(),
- internalContext.recordContext().headers(),
+ oldAggregationWithHeaders == null
+ ? internalContext.recordContext().headers()
Review Comment:
I also think we don't need to change this code -- we should rather ensure,
inside `Metered` store layer, that we set the correct `Headers` on the context,
so the call to `internalContext.recordContext().headers()` returns the right
thing.
--
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]