mjsax commented on a change in pull request #10861:
URL: https://github.com/apache/kafka/pull/10861#discussion_r652222557



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/kstream/JoinWindows.java
##########
@@ -114,7 +133,7 @@ public static JoinWindows of(final Duration timeDifference) 
throws IllegalArgume
     public JoinWindows before(final Duration timeDifference) throws 
IllegalArgumentException {
         final String msgPrefix = 
prepareMillisCheckFailMsgPrefix(timeDifference, "timeDifference");
         final long timeDifferenceMs = 
validateMillisecondDuration(timeDifference, msgPrefix);
-        return new JoinWindows(timeDifferenceMs, afterMs, 
DEFAULT_GRACE_PERIOD_MS);
+        return new JoinWindows(timeDifferenceMs, afterMs, graceMs, 
enableSpuriousResultFix);

Review comment:
       Sure. Don't see the connection to this change thought? Note, that 
`before()` and `after()` are non-static method, and thus, they should not 
change/set the grace period. Only the static `of(size)` and non-static 
`grace()` should change grace period.
   ```
   JoinWindow.of(5000).before(30); // of() will set default of 24h, so no need 
for before() to reset to 24h, it can just inherit it
   JoinWindows.of(5000).grace(40).before(30); // this should leave grace at 
`40` however, without this fix `before()` would re-set grace to the default of 
24h what is incorrect
   ```




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


Reply via email to