lihaosky commented on code in PR #12166:
URL: https://github.com/apache/kafka/pull/12166#discussion_r927167240
##########
streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamKStreamJoin.java:
##########
@@ -226,9 +226,10 @@ private void emitNonJoinedOuterRecords(
if (internalProcessorContext.currentSystemTimeMs() <
sharedTimeTracker.nextTimeToEmit) {
return;
}
- if (sharedTimeTracker.nextTimeToEmit == 0) {
- sharedTimeTracker.nextTimeToEmit =
internalProcessorContext.currentSystemTimeMs();
- }
+
+ // Ensure `nextTimeToEmit` is synced with `currentSystemTimeMs`,
if we dont set it everytime,
+ // they can get out of sync during a clock drift
+ sharedTimeTracker.nextTimeToEmit =
internalProcessorContext.currentSystemTimeMs();
Review Comment:
I'm ok with the comment
--
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]