spena commented on a change in pull request #10462: URL: https://github.com/apache/kafka/pull/10462#discussion_r611882455
########## File path: streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamKStreamJoin.java ########## @@ -102,14 +127,98 @@ public void process(final K key, final V1 value) { while (iter.hasNext()) { needOuterJoin = false; final KeyValue<Long, V2> otherRecord = iter.next(); + final long otherRecordTimestamp = otherRecord.key; context().forward( key, joiner.apply(key, value, otherRecord.value), - To.all().withTimestamp(Math.max(inputRecordTimestamp, otherRecord.key))); + To.all().withTimestamp(Math.max(inputRecordTimestamp, otherRecordTimestamp))); + + outerJoinWindowStore.ifPresent(store -> { + // Delete the other joined key from the outer non-joined store now to prevent + // further processing + final KeyAndJoinSide<K> otherJoinKey = KeyAndJoinSide.make(!thisJoin, key); + if (store.fetch(otherJoinKey, otherRecordTimestamp) != null) { Review comment: This needs to be supported in Window stores. I might need to write a KIP for this. -- 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