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


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java:
##########
@@ -1104,11 +1104,12 @@ private void initializeTopology() {
         // initialize the task by initializing all its processor nodes in the 
topology
         log.trace("Initializing processor nodes of the topology");
         for (final ProcessorNode<?, ?, ?, ?> node : topology.processors()) {
-            processorContext.setCurrentNode(node);
+            final InitProcessorRecordContext initContext = new 
InitProcessorRecordContext(time);
+            updateProcessorContext(node, time.milliseconds(), initContext);

Review Comment:
   > Also, ProcessorRecordContext lifecycle might be significantly shorter than 
an InitProcessorRecordContext as the init method can run for a longer period of 
time.
   
   Well, we don't really know this. `ProcessorRecordContext` is also used in 
potentially (long running) Punctuations (which might scan the store), and we 
also don't know how long a `process()` tall really takes (even if I agree, that 
we can reasonable expect it to be short _most_ of the time).
   
   It's a fair point though, that `init()` itself is called less often, 
compared to `process()` or any punctuation.



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