kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From HenryCaiHaiying <...@git.apache.org>
Subject [GitHub] kafka pull request #1538: KAFKA-3890 Kafka Streams: task assignment is not m...
Date Wed, 22 Jun 2016 23:12:18 GMT
GitHub user HenryCaiHaiying reopened a pull request:


    KAFKA-3890 Kafka Streams: task assignment is not maintained on cluster restart or rolling

    Current task assignment in TaskAssignor is not deterministic.
    During cluster restart or rolling restart, we have the same set of participating worker
nodes.  But the current TaskAssignor is not able to maintain a deterministic mapping, so about
20% partitions will be reassigned which would cause state repopulation.
    When the topology of work nodes (# of worker nodes, the TaskIds they are carrying with)
is not changed, we really just want to keep the old task assignment.
    Add the code to check whether the node topology is changing or not:
    - when the prevAssignedTasks from the old clientStates is the same as the new task list
    - when there is no new node joining (its prevAssignTasks would be either empty or conflict
with some other nodes)
    - when there is no node dropping out (the total of prevAssignedTasks from other nodes
would not be equal to the new task list)
    When the topology is not changing, we would just use the old mapping.
    I also added the code to check whether the previous assignment is balanced (whether each
node's task list is within [1/2 average -- 2 * average]), if it's not balanced, we will still
start the a new task assignment.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/HenryCaiHaiying/kafka upstream

Alternatively you can review and apply these changes as the patch at:


To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1538


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message