vamossagar12 commented on code in PR #12561:
URL: https://github.com/apache/kafka/pull/12561#discussion_r994977689
##########
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/distributed/WorkerCoordinatorIncrementalTest.java:
##########
@@ -517,13 +517,13 @@ public void testTaskAssignmentWhenWorkerBounces() {
leaderAssignment = deserializeAssignment(result, leaderId);
assertAssignment(leaderId, offset,
Collections.emptyList(), 0,
- Collections.emptyList(), 0,
+ Collections.emptyList(), 1,
Review Comment:
> Isn't this a regression? We shouldn't be revoking tasks in this round
since, without those revocations, we'd have a balanced assignment.
Hello.. I have been playing around with the revokedInPrevious and the test
cases. I looked at this case which is a regression which I agree. However,
based on the changes made in this PR, what I think is that post the revoking
rebalance, there would be a follow up rebalance which would eventually lead to
a balanced load. If you look at
`IncrementalCooperativeAssignorTest#testTaskAssignmentWhenWorkerBounces` this
behaviour is exhibited. On similar lines, I made some edits to
`WorkerCoordinatorIncrementalTest#testTaskAssignmentWhenWorkerBounces` method
by causing a follow up rebalance after the revoking rebalance after worker 3
comes back. The assignments with which I am calling the final `onLeaderElected`
may not be accurate (as I couldn't get the full assignments using the
deserialzeAssignment) but I just chose something which is representative.
I know this is a deviation from what the KIP proposes i.e a bounced member
gets its assignments back without any revocations but if what I am stating
above sounds ok, do you think it's really bad- coz it seems to be getting to a
balanced load after a a follow up rebalance. WDYT?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]