Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-16092 Queues for Kafka
  3. KAFKA-17796

Persist higher leaderEpoch in read state calls to the share coordinator.

    XMLWordPrintableJSON

Details

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

    Description

      It is possible that a ReadShareStateRequest includes a higher leader epoch for a specific share partition than previously seen by the share coordinator.

      However, currently we are only persisting the leaderEpoch in the write state calls. We need to implement the logic to write a record to the __share_group_state internal topic when a higher leaderEpoch is seen in read state calls.

      One way to accomplish this is to make a an additional write state call with every read call if the read state request contains a higher leaderEpoch for a share partition. We are already maintaining highest leaderEpoch in share coordinator soft state of the topic.

      This will increase load on the share coordinator due to the occasional extra write but the read calls are relatively rare (compared to write). Read calls are made when a new share partition is initialized for the first time.

       

      Classes affected:

      ShareCoordinatorService.java

      ShareCoordinatorShard.java

      Attachments

        Activity

          People

            sushmahajn Sushant Mahajan
            sushmahajn Sushant Mahajan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: