minleejae opened a new pull request, #24341:
URL: https://github.com/apache/kafka/pull/24341
With incremental cooperative rebalancing, the rebalance that follows a stop
request only tells the owning workers to revoke the connector's tasks. Those
workers stop the tasks after they have received the assignment and then
rejoin
the group. Until they rejoin, the leader sees no pending rebalance, a STOPPED
target state and zero task configs, so it accepts requests to alter or reset
the connector's offsets while a source task may still be running. The final
offset commit of that task then overwrites the offsets written by the
request.
The leader now remembers which connectors had tasks revoked in the most
recent
rebalance and answers offset modification requests for those source
connectors
with a 409 until the follow-up rebalance has completed. Sink connectors are
not
affected, since altering consumer group offsets already fails while a sink
task's consumer is still a member of the group.
Testing:
- DistributedHerderTest#testModifyOffsetsTasksStillBeingRevoked: a reset
request is rejected with RebalanceNeededException and no offsets are
written
while a revocation is pending.
-
IncrementalCooperativeAssignorTest#testLeaderStateTracksConnectorsWithRevokedTasks:
the leader state reports the connector after the rebalance that revokes its
tasks and no longer reports it after the follow-up rebalance.
- Existing OffsetsApiIntegrationTest passes unchanged.
- Reproduced manually with 1 broker and 3 workers on 4.3.1 (details in the
Jira issue): 0 of 10 altered offsets survived without the change, 10 of 10
with it.
--
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]