showuon commented on a change in pull request #10917:
URL: https://github.com/apache/kafka/pull/10917#discussion_r659521269



##########
File path: 
streams/src/test/java/org/apache/kafka/streams/kstream/internals/KStreamKStreamOuterJoinTest.java
##########
@@ -460,23 +463,25 @@ public void testOrdering() {
             // push two items to the primary stream; the other window is 
empty; this should not produce any item yet
             // w1 = {}
             // w2 = {}
-            // --> w1 = { 0:A0 (ts: 0), 1:A1 (ts: 0) }
+            // --> w1 = { 0:A0 (ts: 0), 1:A1 (ts: 101), 1:A2 (ts: 200) }
             // --> w2 = {}
             inputTopic1.pipeInput(0, "A0", 0L);
-            inputTopic1.pipeInput(1, "A1", 100L);
+            inputTopic1.pipeInput(1, "A1", 101L);
+            inputTopic1.pipeInput(1, "A2", 200L);
             processor.checkAndClearProcessResult();
 
             // push one item to the other window that has a join; this should 
produce non-joined records with a closed window first, then
             // the joined records
             // by the time they were produced before
-            // w1 = { 0:A0 (ts: 0), 1:A1 (ts: 0) }
+            // w1 = { 0:A0 (ts: 0), 1:A1 (ts: 101), 1:A2 (ts: (200: }

Review comment:
       typo: `1:A2 (ts: 200)`

##########
File path: 
streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamKStreamJoin.java
##########
@@ -186,12 +190,17 @@ public void process(final K key, final V1 value) {
 
         @SuppressWarnings("unchecked")
         private void emitNonJoinedOuterRecords(final 
WindowStore<KeyAndJoinSide<K>, LeftOrRightValue> store) {
+            if (minTime.minTime >= maxObservedStreamTime.get() - joinAfterMs - 
joinBeforeMs - joinGraceMs) {
+                return;
+            }
+
             try (final KeyValueIterator<Windowed<KeyAndJoinSide<K>>, 
LeftOrRightValue> it = store.all()) {
                 while (it.hasNext()) {
                     final KeyValue<Windowed<KeyAndJoinSide<K>>, 
LeftOrRightValue> record = it.next();
 
                     final Windowed<KeyAndJoinSide<K>> windowedKey = record.key;
                     final LeftOrRightValue value = record.value;
+                    minTime.minTime = windowedKey.window().start();

Review comment:
       Nice explanation! rest to `Long.MAX_VALUE` + 1




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