You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Flavio Junqueira (Commented) (JIRA)" <ji...@apache.org> on 2012/03/30 10:52:37 UTC

[jira] [Commented] (BOOKKEEPER-198) replaying entries of deleted ledgers would exhaust ledger cache.

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

Flavio Junqueira commented on BOOKKEEPER-198:
---------------------------------------------

It is mostly good, Sijie. I just think that pageCount has to be in a synchronized block when decremented here:

{noformat}
catch (IOException ie) {
+            // if we grab a clean page, but failed to update the page
+            // we are exhuasting the count of ledger entry pages.
+            // since this page will be never used, so we need to decrement
+            // page count of ledger cache.
+            lep.releasePage();
+            --pageCount;
+            throw ie; 
{noformat}

no?
                
> replaying entries of deleted ledgers would exhaust ledger cache.
> ----------------------------------------------------------------
>
>                 Key: BOOKKEEPER-198
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-198
>             Project: Bookkeeper
>          Issue Type: Bug
>            Reporter: Sijie Guo
>            Assignee: Sijie Guo
>             Fix For: 4.1.0
>
>         Attachments: BK-198.patch
>
>
> we found that replaying entries of deleted ledgers would exhaust ledger cache. then ledger cache would no clean page to grab, it would throw following exception.
> {code}
> java.util.NoSuchElementException
>         at java.util.LinkedList.getFirst(LinkedList.java:109)
>         at org.apache.bookkeeper.bookie.LedgerCacheImpl.grabCleanPage(LedgerCacheImpl.java:454)
>         at org.apache.bookkeeper.bookie.LedgerCacheImpl.putEntryOffset(LedgerCacheImpl.java:165)
> {code}
> this issue is because bookie grabs a clean page but fail to updating page due to NoLedgerException, but bookie doesn't return this clean page back to ledger cache. so the ledger cache is exhausted, when new ledger want to grab a clean page, it failed to find available page.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira