kumarpritam863 commented on issue #16282:
URL: https://github.com/apache/iceberg/issues/16282#issuecomment-5083420717

   Yes this:
   
   > d1 loses it. close(closedPartitions) → 
hasLeaderPartition(closedPartitions) describes the
   group to find the first partition; during a rebalance that snapshot can come 
back empty or
   partial, so it returns false and stopCoordinator() is skipped. Coordinator C 
keeps running.
   d2 gains it. open() → startCoordinator() → C' is constructed → its first 
poll() sends
   JoinGroup → coord-side rebalance.
   d1 gains it back. open() → startCoordinator(), but if (null == 
this.coordinatorThread)
   is false, so it's a no-op. C carries straight on, with its commitBuffer, 
currentCommitId
   and controlTopicOffsets intact.
   d2 loses it. close() → stopCoordinator() → consumer.close() → LeaveGroup → 
coord-side
   rebalance again.
   
   is an issue of split-brain I flagged much earlier and is also targeted in 
the PR(https://github.com/apache/iceberg/pull/17376). This PR ensures that no 
state change happens between Kafka Connect calls open/close and the stuff that 
is performed in open and close. The current descertibe members and earlier 
state check was the actual bug and removal of that only partially fixed. All 
this can be caused by the having multiple coordinator and having a 
multipartition control topic makes this situation adverse (a point which I 
raised in discussion with brain). Also I am going to remove the task id from 
the transaction id of the coordinator which will fence the other coordinator 
once a new one is elected. All of this will make the situation more intact. 
   
   Also thanks for pointing I think this can be a corner case which will be 
solved by the PR changes as it will enforce a single coordinator as we will not 
longer check the minPartition by describing members but by just taking the 
partition "0" of the smallest (lexicographically) topic from the subscription .
   
   Let me know if any more guard you think is required.
   
   Also I would request you to if possible take the changes from this PR and 
test these. Meanwhile I will also test these changes against the production 
load.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to