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 2020/04/20 13:56:32 UTC

[GitHub] [bookkeeper] eolivelli opened a new issue #2316: API to delete multiple ledgers at once

eolivelli opened a new issue #2316:
URL: https://github.com/apache/bookkeeper/issues/2316


   **FEATURE REQUEST**
   
   1. Please describe the feature you are requesting.
   Add the ability to drop a few ledgers in a single atomic operation.
   
   2. Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have).
   should-have
   
   3. Provide any additional detail on your proposed use case for this feature.
   
   We could leverage ZooKeeper "multi" operation
   https://zookeeper.apache.org/doc/r3.5.5/api/org/apache/zookeeper/ZooKeeper.html#multi(java.lang.Iterable).
   
   Sometimes it happens that you need to delete multiple ledgers at once, and deleting only a single ledger could lead to an inconsistent state of the system (partial deletion of data).
   Actually in case of a failure you need to implement garbage collection like mechanisms that scan for orphan ledgers and delete them.
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [bookkeeper] mino181295 commented on issue #2316: API to delete multiple ledgers at once

Posted by GitBox <gi...@apache.org>.
mino181295 commented on issue #2316:
URL: https://github.com/apache/bookkeeper/issues/2316#issuecomment-616853216


   I can take this, a few question i had looking around the code:
   
   - Is it better to convert 
   `removeLedgerMetadata(long ledgerId, Version version)`
   to: `removeLedgerMetadata(Set<Long> ledgerIds, Version version)`
   Or do you suggest creating a brand new method?
   - In HierarchicalLedgerManager zk deletions are performed recursively and optimistically. Shoul i create a `ZKUtils#asyncCreateFullPathOptimistic` similar that runs multi instead of delete recursively?
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [bookkeeper] eolivelli edited a comment on issue #2316: API to delete multiple ledgers at once

Posted by GitBox <gi...@apache.org>.
eolivelli edited a comment on issue #2316:
URL: https://github.com/apache/bookkeeper/issues/2316#issuecomment-617079931


   @mino181295  
   `removeLedgerMetadata(Set<Long> ledgerIds, Version version)`
   this API does not work, because for each ledger you need a different "Version" object.
   So maybe it would look like this:
   `removeLedgerMetadata(List<LedgerIdAndVersion> ledgerIds)`
   
   please also check if in the case of "deleteLedgerOp" we have the Version or we are deleting the znode unconditionally
   
   is ZKUtils a BK class or a ZooKeeper class (check the package name) ?.
   btw, the answer is that we have to use "multi" and we have to introduce a new function


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [bookkeeper] eolivelli commented on issue #2316: API to delete multiple ledgers at once

Posted by GitBox <gi...@apache.org>.
eolivelli commented on issue #2316:
URL: https://github.com/apache/bookkeeper/issues/2316#issuecomment-617079931


   @mino181295  
   `removeLedgerMetadata(Set<Long> ledgerIds, Version version)`
   this API does not work, because for each ledger you need a different "Version" object.
   So maybe it would look like this:
   `removeLedgerMetadata(List<LedgerIdAndVersion> ledgerIds)`
   
   is ZKUtils a BK class or a ZooKeeper class (check the package name) ?.
   btw, the answer is that we have to use "multi" and we have to introduce a new function


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org