Nicklee007 commented on PR #3773:
URL: https://github.com/apache/bookkeeper/pull/3773#issuecomment-1445915568

   > I have one concern about the sort. If we have multiple replication 
workers, and each replication worker sorts the ledgers before getting the 
target ledger to replicate. Would this PR introduce more Zookeeper try-lock 
operation conflicts?
   
   @hangc0276 we set a condition `if (depth == 3)` to avoid the conflicts. 
   The zk under replicate ledger dir have 4 layers under 
/unserreplication/ledgers,  like `/aaaa/bbbb/cccc/dddd`. So, in the PR only 
sorted the first three layers `/aaaa/bbbb/cccc` to keep we can replicate the 
fresh ledger at first as far as possible,  and the last layer `/dddd` each 
worker shuffled znode to avoid workers always  try-lock the same znode and  
operation conflicts.


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

Reply via email to