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



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsPartitionAssignor.java
##########
@@ -712,31 +712,32 @@ private boolean assignTasksToClients(final Set<String> 
allSourceTopics,
         log.debug("Assigning tasks {} to clients {} with number of replicas 
{}",
             allTasks, clientStates, numStandbyReplicas());
 
-        final TaskAssignor taskAssignor;
-        if (highAvailabilityEnabled) {
-            if (lagComputationSuccessful) {
-                taskAssignor = new HighAvailabilityTaskAssignor(
-                    clientStates,
-                    allTasks,
-                    statefulTasks,
-                    assignmentConfigs);
-            } else {
-                log.info("Failed to fetch end offsets for changelogs, will 
return previous assignment to clients and "
-                             + "trigger another rebalance to retry.");
-                setAssignmentErrorCode(AssignorError.REBALANCE_NEEDED.code());
-                taskAssignor = new StickyTaskAssignor(clientStates, allTasks, 
statefulTasks, assignmentConfigs, true);
-            }
-        } else {
-            taskAssignor = new StickyTaskAssignor(clientStates, allTasks, 
statefulTasks, assignmentConfigs, false);
-        }
-        final boolean followupRebalanceNeeded = taskAssignor.assign();
+        final TaskAssignor taskAssignor = 
createTaskAssignor(lagComputationSuccessful);
+
+        final boolean followupRebalanceNeeded = 
taskAssignor.assign(clientStates,

Review comment:
       We should probably rename this to `probingRebalanceRequired` or so on, 
see comment on `FallbackPriorTaskAssignor`




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to