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


##########
streams/src/test/java/org/apache/kafka/streams/kstream/internals/foreignkeyjoin/SubscriptionSendProcessorSupplierTest.java:
##########
@@ -316,6 +367,21 @@ public void innerJoinShouldPropagateDeletionOfPrimaryKey() 
{
         );
     }
 
+    @Test
+    public void 
innerJoinShouldNotPropagateDeletionOfPrimaryKeyWhenPreviousFKIsNull() {
+        final MockInternalProcessorContext<String, 
SubscriptionWrapper<String>> context = new MockInternalProcessorContext<>();
+        innerJoinProcessor.init(context);
+        context.setRecordMetadata("topic", 0, 0);
+
+        innerJoinProcessor.process(new Record<>(pk, new Change<>(null, new 
LeftValue(null)), 0));
+
+        assertThat(context.forwarded(), empty());
+
+        // test dropped-records sensors
+        assertEquals(1.0, getDroppedRecordsTotalMetric(context));

Review Comment:
   > no change of behavior introduced in this PR.
   
   Yeah, I was wondering about this too. If we do record the metric right now, 
it seems incorrect. 
   
   > It seems we have this same behavior in different classes of Foreign key 
join. Can we open a separate follow-up ticket for it ?
   
   Sounds like a good idea to follow a new Jira and fix as follow up (as a 
matter of fact, I do have a working branch to actually simplify this part of 
the code already that I wanted to do as follow up anyway, so I can include a 
fix -- even if I would hope that my simplification would fix this already -- I 
actually added this test to my working branch and this test failed...)
   
   > (I can also remove the test for now to not make it an "expected" behavior)
   
   Might be good to remove. We should not test for something that is not 
expected behavior.
   
   > I am still wondering if a metric on those records (i.e. records with no 
effect) would be useful for users. Maybe we could discuss that in the follow-up 
ticket
   
   Interesting idea. We can also always file a ticket for it, and see if 
anybody is interested.



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