When you delete ledger, the data of the ledger isn't delete immediately. They are removed lazily with garbage collection. So the system is designed not to reuse a ledger id.
- Sijie On Sun, Sep 20, 2015 at 12:02 PM, Venkateswara Rao Jujjuri < [email protected]> wrote: > Even after deleting it? I am deleting and recreating it. Can you please > educate be the reason behind it? > How long we can't reuse the same name? > > On Sun, Sep 20, 2015 at 11:54 AM, Sijie Guo <[email protected]> wrote: > > > You can't create a ledger with same ledger id twice. > > > > - Sijie > > > > On Sun, Sep 20, 2015 at 7:59 AM, Venkateswara Rao Jujjuri < > > [email protected] > > > wrote: > > > > > Hi All, > > > > > > I started to implement ledgerId API changes which allows user to pass > in > > an > > > unique > > > ledgerId instead of BK generating it. > > > > > > I have created a test which create/write/verify/delete a ledger with a > > > ledgerId > > > in a loop. This test is failing in second iteration as we are reading > > stale > > > data. > > > Can you please advise me if this is a bug or I am missing something in > my > > > implementation? > > > > > > Pushed the work-in-progress code to github. > > > > > > > > > https://github.com/jvrao/bookkeeper/commit/765194d2490021ed76ff46fe489430015961e345 > > > > > > https://github.com/jvrao/bookkeeper/commits/forSijie (top commit) > > > > > > Here is how the failure is: > > > > > > First loop: > > > 2015-09-20 07:16:56,478 - INFO - [New I/O worker > > > #5:PerChannelBookieClient$1@190] - Successfully connected to bookie: > > [id: > > > 0xf5c19fe8, /192.168.1.10:63232 => /192.168.1.10:15003] > > > 2015-09-20 07:16:56,599 - INFO - [Thread-2:BookieWriteLedgerTest@643] > - > > > Original entry: 2053591346 > > > 2015-09-20 07:16:56,599 - INFO - [Thread-2:BookieWriteLedgerTest@645] > - > > > Retrieved entry: 2053591346 > > > 2015-09-20 07:16:56,599 - INFO - [Thread-2:BookieWriteLedgerTest@643] > - > > > Original entry: 1119029279 > > > 2015-09-20 07:16:56,599 - INFO - [Thread-2:BookieWriteLedgerTest@645] > - > > > Retrieved entry: 1119029279 > > > 2015-09-20 07:16:56,599 - INFO - [Thread-2:BookieWriteLedgerTest@643] > - > > > Original entry: *1036910072* > > > 2015-09-20 07:16:56,599 - INFO - [Thread-2:BookieWriteLedgerTest@645] > - > > > Retrieved entry: *1036910072* > > > > > > > > > Second loop: > > > > > > 2015-09-20 07:16:56,715 - INFO - [Thread-2:BookieWriteLedgerTest@643] > - > > > Original entry: 952803458 > > > 2015-09-20 07:16:56,716 - INFO - [Thread-2:BookieWriteLedgerTest@645] > - > > > Retrieved entry: 952803458 > > > 2015-09-20 07:16:56,716 - INFO - [Thread-2:BookieWriteLedgerTest@643] > - > > > Original entry: 170728527 > > > 2015-09-20 07:16:56,716 - INFO - [Thread-2:BookieWriteLedgerTest@645] > - > > > Retrieved entry: 170728527 > > > 2015-09-20 07:16:56,716 - INFO - [Thread-2:BookieWriteLedgerTest@643] > - > > > Original entry: *1987418365* > > > 2015-09-20 07:16:56,716 - INFO - [Thread-2:BookieWriteLedgerTest@645] > - > > > Retrieved entry: *1036910072* *<--- Retrieved value is what we wrote in > > > first loop. * > > > > > > Thanks for your help. > > > > > > > > > -- > > > Jvrao > > > --- > > > First they ignore you, then they laugh at you, then they fight you, > then > > > you win. - Mahatma Gandhi > > > > > > > > > -- > Jvrao > --- > First they ignore you, then they laugh at you, then they fight you, then > you win. - Mahatma Gandhi >
