goutamadwant opened a new pull request, #22410:
URL: https://github.com/apache/kafka/pull/22410

   KStream-KStream left joins currently emit an out-of-order left record as 
`left+null` as soon as the join window end is behind stream time, even if the 
configured grace period has not elapsed. That can produce an unmatched result 
and a later matched result for the same left record.
   
   This changes the immediate emission check to wait until `windowEnd + grace` 
is behind stream time. Records that are still within grace stay in the outer 
join store, so a matching right-side record can still produce the join result.
   
   I added a regression test that advances stream time past the window end but 
still inside grace, verifies the left record is not emitted as unmatched, then 
sends a matching right record.
   
   No documentation update is included because this fixes the implementation to 
match the existing `JoinWindows` grace-period behavior and does not add or 
change any public API, configuration, or protocol.
   
   Tests:
   - `./gradlew :streams:test --tests 
org.apache.kafka.streams.kstream.internals.KStreamKStreamLeftJoinTest.testOutOfOrderRecordWithinGracePeriod
 --no-build-cache --rerun-tasks`
   - `./gradlew :streams:test --tests 
org.apache.kafka.streams.kstream.internals.KStreamKStreamLeftJoinTest --tests 
org.apache.kafka.streams.kstream.internals.KStreamKStreamOuterJoinTest --tests 
org.apache.kafka.streams.kstream.internals.KStreamKStreamJoinTest 
--no-build-cache --rerun-tasks`
   - `./gradlew :streams:check --no-build-cache --rerun-tasks`
   
   This contribution is my original work, and I license the work to the project 
under the project's open source license.


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