From commits-return-14678-apmail-kafka-commits-archive=kafka.apache.org@kafka.apache.org Wed Jun 3 05:14:31 2020 Return-Path: X-Original-To: apmail-kafka-commits-archive@www.apache.org Delivered-To: apmail-kafka-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id 83ED919FDD for ; Wed, 3 Jun 2020 05:14:31 +0000 (UTC) Received: (qmail 78945 invoked by uid 500); 3 Jun 2020 05:14:30 -0000 Delivered-To: apmail-kafka-commits-archive@kafka.apache.org Received: (qmail 78889 invoked by uid 500); 3 Jun 2020 05:14:30 -0000 Mailing-List: contact commits-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list commits@kafka.apache.org Received: (qmail 78879 invoked by uid 99); 3 Jun 2020 05:14:30 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2020 05:14:30 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id CE00681F29; Wed, 3 Jun 2020 05:14:29 +0000 (UTC) Date: Wed, 03 Jun 2020 05:14:23 +0000 To: "commits@kafka.apache.org" Subject: [kafka] branch 2.4 updated: KAFKA-10083: fix failed testReassignmentWithRandomSubscriptionsAndChanges tests (#8786) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <159116125700.30430.10656815113240423001@gitbox.apache.org> From: guozhang@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: kafka X-Git-Refname: refs/heads/2.4 X-Git-Reftype: branch X-Git-Oldrev: 8ecfe6dffa67e027b1fd3bdac5c7a3f80c12cff6 X-Git-Newrev: c71ea4ccf4fc99ca12f48b3df01e16ec5d8ed7d6 X-Git-Rev: c71ea4ccf4fc99ca12f48b3df01e16ec5d8ed7d6 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. guozhang pushed a commit to branch 2.4 in repository https://gitbox.apache.org/repos/asf/kafka.git The following commit(s) were added to refs/heads/2.4 by this push: new c71ea4c KAFKA-10083: fix failed testReassignmentWithRandomSubscriptionsAndChanges tests (#8786) c71ea4c is described below commit c71ea4ccf4fc99ca12f48b3df01e16ec5d8ed7d6 Author: A. Sophie Blee-Goldman AuthorDate: Tue Jun 2 20:39:02 2020 -0700 KAFKA-10083: fix failed testReassignmentWithRandomSubscriptionsAndChanges tests (#8786) Minimum fix needed to stop this test failing and unblock others Co-authored-by: Luke Chen Reviewers: Guozhang Wang --- .../kafka/clients/consumer/internals/AbstractStickyAssignor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractStickyAssignor.java b/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractStickyAssignor.java index 9743688..a1af6d9 100644 --- a/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractStickyAssignor.java +++ b/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractStickyAssignor.java @@ -43,7 +43,7 @@ public abstract class AbstractStickyAssignor extends AbstractPartitionAssignor { public static final int DEFAULT_GENERATION = -1; - private PartitionMovements partitionMovements = new PartitionMovements(); + private PartitionMovements partitionMovements; // Keep track of the partitions being migrated from one consumer to another during assignment // so the cooperative assignor can adjust the assignment @@ -72,6 +72,7 @@ public abstract class AbstractStickyAssignor extends AbstractPartitionAssignor { @Override public Map> assign(Map partitionsPerTopic, Map subscriptions) { + partitionMovements = new PartitionMovements(); Map> consumerToOwnedPartitions = new HashMap<>(); if (allSubscriptionsEqual(partitionsPerTopic.keySet(), subscriptions, consumerToOwnedPartitions)) { log.debug("Detected that all consumers were subscribed to same set of topics, invoking the "