[ https://issues.apache.org/jira/browse/KAFKA-13817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17536926#comment-17536926 ]
Matthias J. Sax commented on KAFKA-13817: ----------------------------------------- > as it will eventually self-correct and continue to throttle, I believe how > fast it self-correct depends on the magnitude of clock-drift and the > {color:#871094}emitIntervalMs value.{color} That's exactly the point. We want to avoid that we only throttle eventually for this case, but keep throttling right away. Thus, instead of just computing "next = next + X" we want to compute "next = now + X" to quickly fast forward in case we missed an interval. We do similar thing in the windowed aggregation: [https://github.com/apache/kafka/blob/trunk/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamWindowAggregate.java#L260-L269] > Schedule nextTimeToEmit to system time every time instead of just once > ---------------------------------------------------------------------- > > Key: KAFKA-13817 > URL: https://issues.apache.org/jira/browse/KAFKA-13817 > Project: Kafka > Issue Type: Improvement > Components: streams > Reporter: Hao Li > Assignee: Lim Qing Wei > Priority: Minor > Labels: beginner, newbie > > [https://github.com/apache/kafka/blob/trunk/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamKStreamJoin.java#L229-L231.] > > If this is just scheduled once, this can trigger emit every time if system > time jumps a lot suddenly. > > For example, > # nextTimeToEmit set to 1 and step is 1 > # If next system time jumps to 100, we will always emit for next 100 records -- This message was sent by Atlassian Jira (v8.20.7#820007)