Kafka
  1. Kafka
  2. KAFKA-1213

Adding fetcher needs to be avoided upon make-follower when replica manager is shutting down

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: 0.8.2.0
    • Component/s: None
    • Labels:
      None

      Description

      Today in ReplicaManager.makeFollowers, we check if isShuttingDown.get() is false before adding fetchers. However this check cannot avoid adding fetcher while at the same time shutting down replica manager since the isShuttingDown can be set to false after the check.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        71d 17h 20m 1 Guozhang Wang 03/Apr/14 16:25
        Resolved Resolved Closed Closed
        4s 1 Guozhang Wang 03/Apr/14 16:25
        Tony Stevenson made changes -
        Workflow Apache Kafka Workflow [ 13052383 ] no-reopen-closed, patch-avail [ 13055112 ]
        Tony Stevenson made changes -
        Workflow no-reopen-closed, patch-avail [ 12837239 ] Apache Kafka Workflow [ 13052383 ]
        Guozhang Wang made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Guozhang Wang made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Not a Problem [ 8 ]
        Hide
        Guozhang Wang added a comment -

        Jun, you are right. What I once observed is that the following time sequence can happen:

        1. Broker received normal LeaderAndIsr request from controller (not due to controlled shutdown)
        2. isShuttingDown.get returns false, so move on to adding fetchers.
        3. Broker decide to shutdown itself right after the check, set isShuttingDown to true.
        4. Hence broker can be adding fetchers while it is shutting down.

        But now I think this is actually fine. Will close the ticket.

        Show
        Guozhang Wang added a comment - Jun, you are right. What I once observed is that the following time sequence can happen: 1. Broker received normal LeaderAndIsr request from controller (not due to controlled shutdown) 2. isShuttingDown.get returns false, so move on to adding fetchers. 3. Broker decide to shutdown itself right after the check, set isShuttingDown to true. 4. Hence broker can be adding fetchers while it is shutting down. But now I think this is actually fine. Will close the ticket.
        Hide
        Jun Rao added a comment -

        Is this really an issue? During the controlled shutdown, we first set isShuttingDown to false before sending the shutdown request to the controller. We won't add new fetchers for the LeaderAndIsr requests received during the controlled shutdown.

        Show
        Jun Rao added a comment - Is this really an issue? During the controlled shutdown, we first set isShuttingDown to false before sending the shutdown request to the controller. We won't add new fetchers for the LeaderAndIsr requests received during the controlled shutdown.
        Neha Narkhede made changes -
        Field Original Value New Value
        Fix Version/s 0.8.2 [ 12326167 ]
        Fix Version/s 0.8.1 [ 12322960 ]
        Guozhang Wang created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Guozhang Wang
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development