You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2019/02/27 19:41:37 UTC

[GitHub] athanatos opened a new issue #1967: Ledger creation and removal can return erroneous errors if there is a zk ConnectionLoss event while the update is inflight

athanatos opened a new issue #1967: Ledger creation and removal can return erroneous errors if there is a zk ConnectionLoss event while the update is inflight
URL: https://github.com/apache/bookkeeper/issues/1967
 
 
   The bookkeeper project ZooKeeperClient wrapper (not to be confused with ZooKeeper or the distributed log analogue) will resend zk node creations and removals upon reconnect after a ConnectionLoss event.  In the event that the original succeeded, the resent operation will erroneously return LedgerExistException or NoSuchLedgerExistsException for creation and removal respectively.
   
   For removal, I propose limiting the operation to be idempotent by letting it succeed if the ledger does not exist.  This is by far the simplest solution if exclusive removal isn't important.
   
   For creation, exclusive creation is genuinely important for correctness, so I suggest adding a unique nonce to the LedgerMetadata to disambiguate the above race from a real race.  For zk, this can simply be the zk session id.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services