cadonna commented on code in PR #12235:
URL: https://github.com/apache/kafka/pull/12235#discussion_r887155630


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/SinkNode.java:
##########
@@ -56,6 +61,26 @@ public void addChild(final ProcessorNode<Void, Void, ?, ?> 
child) {
 
     @Override
     public void init(final InternalProcessorContext<Void, Void> context) {
+        // It is important to first create the sensor before calling init on 
the
+        // parent object. Otherwise due to backwards compatibility an empty 
sensor
+        // without parent is created with the same name.
+        // Once the backwards compatibility is not needed anymore it might be 
possible to
+        // change this.

Review Comment:
   Nice, I just realized that you copied that comment from code that I wrote! 🙂 
   I guess the backwards compatibility was the one with the old metrics 
structure that we changed in KIP-444. We removed the old structure in 3.0, so I 
guess that this is an instance of comments that started lying.
   Moreover, from where you copied the comment (I guess it was `SourceNode`) 
the sensor `processAtSourceSensor` has indeed a parent. I think the comment 
does not make sense in this class and we need to verify if it still makes sense 
in the other class. That does not need to be verifed in this PR.  
   



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

Reply via email to