You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/06/02 16:21:38 UTC

[GitHub] [kafka] ableegoldman commented on a change in pull request #8778: KAFKA-10083: fix failed testReassignmentWithRandomSubscriptionsAndChanges tests

ableegoldman commented on a change in pull request #8778:
URL: https://github.com/apache/kafka/pull/8778#discussion_r434008302



##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractStickyAssignor.java
##########
@@ -43,7 +43,7 @@
 
     public static final int DEFAULT_GENERATION = -1;
 
-    private PartitionMovements partitionMovements = new PartitionMovements();
+    private PartitionMovements partitionMovements;

Review comment:
       Can we still initialize it here as well? I remember that was necessary for some tests to pass since they might never get to the `generalAssign` method and `isSticky` would hit NPE
   
   On the other hand, it seems like `isSticky` is pointless to call unless we get to the `generalAssign` method. So maybe we should just remove that from the tests that only do the `constrainedAssign` and just verify the stickiness directly?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org