VictorvandenHoven commented on code in PR #14426: URL: https://github.com/apache/kafka/pull/14426#discussion_r1518866473
########## streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamKStreamJoin.java: ########## @@ -230,8 +234,19 @@ private void emitNonJoinedOuterRecords( sharedTimeTracker.minTime = timestamp; // Skip next records if window has not closed - if (timestamp + joinAfterMs + joinGraceMs >= sharedTimeTracker.streamTime) { - break; + final long outerJoinLookBackTimeMs = getOuterJoinLookBackTimeMs(timestampedKeyAndJoinSide); + if (sharedTimeTracker.minTime + outerJoinLookBackTimeMs + joinGraceMs >= sharedTimeTracker.streamTime) { + if (timestampedKeyAndJoinSide.isLeftSide()) { + outerJoinLeftBreak = true; // there are no more candidates to emit on left-outerJoin-side + } else { + outerJoinRightBreak = true; // there are no more candidates to emit on right-outerJoin-side + } + if (outerJoinLeftBreak && outerJoinRightBreak) { Review Comment: Probably these two lines need to be outside the while loop: ``` boolean outerJoinLeftBreak = false; boolean outerJoinRightBreak = false; ``` -- 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