guozhangwang commented on a change in pull request #11581: URL: https://github.com/apache/kafka/pull/11581#discussion_r767034399
########## File path: streams/src/main/java/org/apache/kafka/streams/state/internals/CachingKeyValueStore.java ########## @@ -107,10 +107,10 @@ private void putAndMaybeForward(final ThreadCache.DirtyEntry entry, // we can skip flushing to downstream as well as writing to underlying store if (rawNewValue != null || rawOldValue != null) { // we need to get the old values if needed, and then put to store, and then flush - wrapped().put(entry.key(), entry.newValue()); - final ProcessorRecordContext current = context.recordContext(); context.setRecordContext(entry.entry().context()); + wrapped().put(entry.key(), entry.newValue()); Review comment: You are right! This is a good fix. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org