vvcephei commented on a change in pull request #8181: URL: https://github.com/apache/kafka/pull/8181#discussion_r494369894
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java ########## @@ -581,8 +580,8 @@ public void punctuate(final ProcessorNode node, final long timestamp, final Punc if (processorContext.currentNode() != null) { throw new IllegalStateException(format("%sCurrent node is not null", logPrefix)); } - - updateProcessorContext(new StampedRecord(DUMMY_RECORD, timestamp), node); + + updateProcessorContext(new StampedRecord(new ConsumerRecord<>(ProcessorContextImpl.NONEXIST_TOPIC, -1, -1L, null, null), timestamp), node); Review comment: Yes, that's more or less what I was concerned about. We are trying to achieve a specific result here (and brand-new 'Header' instance each time), but it's only achieved via a side effect. On the other hand, I just took a closer look at the code, and I see that there's a better reason to keep using `ConsumerRecord`, namely that `updateProcessorContext` is used both for regular processing (with "real" records) and for punctuation here with this dummy record. It seems like a good idea to prevent those code paths from diverging, so I'm +1 with keeping this change as-is. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org