[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13715167#comment-13715167
 ] 

Vinay commented on BOOKKEEPER-655:
----------------------------------


Analysis:
-----------
Sequence is as follows

1. {{LedgerCacheImpl.deleteLedger(long)}} in  gc thread has removed the page 
from page table.
2. addentry call in {{LedgerCacheImpl.grabLedgerEntryPage(long, long)}} has got 
the ledger entry page from index file.
3. addEntry call again added the ledger entry page into pages table
4. GC has removed ledger from other tables parallely.
5. Since there is no exception now in addentry call, entry has been added to 
journal also.

6. after this while syncthread tries to flush this ledger, it fails. and aborts 
flushing for other ledgers also. 

This continues even after restart.
                
> Race between addEntry and deleteLedger causes all further flushes to fail
> -------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-655
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-655
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.2.1, 4.3.0
>            Reporter: Vinay
>            Assignee: Vinay
>
> In One of our cluster, following has been found.
> 1. One simple program to create ledgers, read and delete ledger will be 
> running periodically to check the service availability.
> 2. At one point, one of the Bookie got timeout while adding entry, and 
> program executed with other bookies, did add,read and delete of ledger.
> 3. In the timed out bookie, there was a race created between addEntry and 
> delete entry in LedgerCacheImpl and it caused all further flushes to fail.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to