You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Lim Qing Wei (Jira)" <ji...@apache.org> on 2022/05/13 21:26:00 UTC

[jira] [Commented] (KAFKA-13817) Schedule nextTimeToEmit to system time every time instead of just once

    [ https://issues.apache.org/jira/browse/KAFKA-13817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17536895#comment-17536895 ] 

Lim Qing Wei commented on KAFKA-13817:
--------------------------------------

Hi [~lihaosky] , I am new to contributing to Kafka, I wish to understand the issue better

 

Do you mean that we might not throttle properly when clock drift happen because it relies on wall-clock?

I am not sure if I fully understand your example, are you saying that we should set `{color:#871094}sharedTimeTracker{color}.{color:#871094}nextTimeToEmit` to system time {color}on every method invocation?{color:#871094}
{color}

 

I notice we always invoke the following if we dont throttle
{code:java}
sharedTimeTracker.advanceNextTimeToEmit(){code}
 

This should mitigate the clock drift issue, right? 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}

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