Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-7411

Change system to future and change back will make replication not working

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1.1, 2.0.0
    • Fix Version/s: None
    • Component/s: replication
    • Labels:
      None

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pengwei Pengwei
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: