You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Pengwei (JIRA)" <ji...@apache.org> on 2018/09/14 08:35:00 UTC

[jira] [Created] (KAFKA-7411) Change system to future and change back will make replication not working

Pengwei created KAFKA-7411:
------------------------------

             Summary: Change system to future and change back will make replication not working
                 Key: KAFKA-7411
                 URL: https://issues.apache.org/jira/browse/KAFKA-7411
             Project: Kafka
          Issue Type: Bug
          Components: replication
    Affects Versions: 2.0.0, 1.1.1
            Reporter: Pengwei


When we change one of the follower's system time to future for some time, then change the system time back, we will find the replication not working.

 

this is because the replication thread need to determine:

buildFetchRequest -> partitionFetchState.isReadyForFetch 

and the DelayedItem's dueMs time is future, but after change back the system time,

in the DelayedItem's 's getDelay function will have a large time:

def getDelay(unit: TimeUnit): Long = {
 unit.convert(max(dueMs - Time.SYSTEM.milliseconds, 0), TimeUnit.MILLISECONDS)
 }

due to dueMs is future time



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)