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

Re-deploying Streams app causes rebalance and task migration

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.0, 2.6.1
    • Fix Version/s: 2.8.0, 2.7.1, 2.6.2
    • Component/s: streams
    • Labels:
      None

      Description

      Re-deploying our Streams app causes a rebalance, even when using static group membership. Worse, the rebalance creates standby tasks, even when the previous task assignment was balanced and stable.

      Our app is currently using Streams 2.6.1-SNAPSHOT (due to KAFKA-10633) but we saw the same behavior in 2.6.0. The app runs on 4 EC2 instances, each with 4 streams threads, and data stored on persistent EBS volumes.. During a redeploy, all EC2 instances are stopped, new instances are launched, and the EBS volumes are attached to the new instances. We do not use interactive queries. session.timeout.ms is set to 30 minutes, and the deployment finishes well under that. num.standby.replicas is 0.

      Expected Behavior

      Given a stable and balanced task assignment prior to deploying, we expect to see the same task assignment after deploying. Even if a rebalance is triggered, we do not expect to see new standby tasks.

      Observed Behavior

      Attached are the "Assigned tasks to clients" log lines from before and after deploying. The "before" is from over 24 hours ago, the task assignment is well balanced and "Finished stable assignment of tasks, no followup rebalances required." is logged. The "after" log lines show the same assignment of active tasks, but some additional standby tasks. There are additional log lines about adding and removing active tasks, which I don't quite understand.

      I've also included logs from the broker showing the rebalance was triggered for "Updating metadata".

        Attachments

        1. broker
          27 kB
          Bradley Peterson
        2. before
          13 kB
          Bradley Peterson
        3. after
          13 kB
          Bradley Peterson

          Issue Links

            Activity

              People

              • Assignee:
                ableegoldman A. Sophie Blee-Goldman
                Reporter:
                thebearmayor Bradley Peterson
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: