Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-16399 Add JBOD support in tiered storage
  3. KAFKA-16711

highestOffsetInRemoteStorage is not updated after logDir altering within broker

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.7.0
    • None
    • None
    • None

    Description

      We use topicIdPartition as the key for each RLM task. It will cause highestOffsetInRemoteStorage in log not updated after logDir alter completion. The reproducing flow is like this:

       

      1. tp-0 locating in dirA is the leader of the partition
      2. tp-0 is altering logDir to dirB
      3. tp-0 is copying segments to remote storage (note: the log in dirA)
      4. The logDir altering for tp-0 is completed
      5. remoteLogManager#onLeadershipChange is invoked, copiedOffsetOption is reset to Optional.empty()
      6. The copying segments to remote storage in step 3 for tp-0 is completed, updating copiedOffsetOption to new offset, as well as the log#highestOffsetInRemoteStorage. (note: the log in dirA)
      7. In the next run of RLMTask, the log will be the one in target dir (dirB), and the log#highestOffsetInRemoteStorage (dirB) will be the default value (-1), which will block the log cleanup operation.

       

      Attachments

        Issue Links

          Activity

            People

              showuon Luke Chen
              showuon Luke Chen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: