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/21 17:57:43 UTC

[jira] [Commented] (BOOKKEEPER-190) Add entries would fail when number of open ledgers reaches more than openFileLimit.

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

Flavio Junqueira commented on BOOKKEEPER-190:
---------------------------------------------

hi sijie, it looks good, but let me propose a slightly different approach for the test. I think that it should be more focused and should be really just exercising the cache here instead of emulating a full run. We could start a single bookie, create ledgers through the bookie interface, and verify that we don't get an error when evicting the ledger. How does it sound to you? 
                
> Add entries would fail when number of open ledgers reaches more than openFileLimit.
> -----------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-190
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-190
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>            Reporter: Sijie Guo
>            Assignee: Sijie Guo
>             Fix For: 4.1.0
>
>         Attachments: BOOKKEEPER-190.diff
>
>
> when the number of open ledgers reaches more than openFileLimit, a file info will be closed and removed from opened ledgers list. And after BOOKKEEPER-137, the ledger index file creation delayed until necessary.
> suppose ledger l is removed from opened ledger list, and its index file haven't been created.
> new add entries operations of other ledgers came into bookie server, a new page need to be grab for them. so bookie server may need to flush the dirty pages of ledger l(when page cache is full). and the flush would fail due to NoLedgerException (no index file found).
> actually the ledger l isn't lost, it could be recovered if restarting bookie server, but the bookie server would not work well on adding entries. 
> a proposal solution is that we need to force index creation when the ledger is evicted from open ledgers list.
> {code}
> 2012-03-21 14:00:42,989 - DEBUG - [NIOServerFactory-5000:LedgerCache@235] - New ledger index file created for ledgerId: 4
> 2012-03-21 14:00:42,990 - INFO  - [NIOServerFactory-5000:LedgerCache@241] - Ledger 2 is evicted from file info cache.
> 2012-03-21 14:00:42,990 - DEBUG - [New I/O client worker #1-1:PerChannelBookieClient$2@255] - Successfully wrote request for adding entry: 0 ledger-id: 4 bookie: /10.82.129.173:5000 entry length: 70
> 2012-03-21 14:00:42,990 - ERROR - [NIOServerFactory-5000:BookieServer@361] - Error writing 0@4
> org.apache.bookkeeper.bookie.Bookie$NoLedgerException: Ledger 2 not found
>         at org.apache.bookkeeper.bookie.LedgerCache.getFileInfo(LedgerCache.java:228)
>         at org.apache.bookkeeper.bookie.LedgerCache.flushLedger(LedgerCache.java:359)
>         at org.apache.bookkeeper.bookie.LedgerCache.flushLedger(LedgerCache.java:292)
>         at org.apache.bookkeeper.bookie.LedgerCache.grabCleanPage(LedgerCache.java:447)
>         at org.apache.bookkeeper.bookie.LedgerCache.putEntryOffset(LedgerCache.java:157)
>         at org.apache.bookkeeper.bookie.LedgerDescriptor.addEntry(LedgerDescriptor.java:130)
>         at org.apache.bookkeeper.bookie.Bookie.addEntryInternal(Bookie.java:1059)
>         at org.apache.bookkeeper.bookie.Bookie.addEntry(Bookie.java:1099)
>         at org.apache.bookkeeper.proto.BookieServer.processPacket(BookieServer.java:357)
>         at org.apache.bookkeeper.proto.NIOServerFactory$Cnxn.readRequest(NIOServerFactory.java:315)
>         at org.apache.bookkeeper.proto.NIOServerFactory$Cnxn.doIO(NIOServerFactory.java:213)
>         at org.apache.bookkeeper.proto.NIOServerFactory.run(NIOServerFactory.java:124)
> 2012-03-21 14:00:42,991 - DEBUG - [pool-3-thread-1:PerChannelBookieClient@576] - Got response for add request from bookie: /10.82.129.173:5000 for ledger: 4 entry: 0 rc: 101
> 2012-03-21 14:00:42,991 - ERROR - [pool-3-thread-1:PerChannelBookieClient@594] - Add for ledger: 4, entry: 0 failed on bookie: /10.82.129.173:5000 with code: 101
> 2012-03-21 14:00:42,991 - WARN  - [pool-3-thread-1:PendingAddOp@142] - Write did not succeed: 4, 0
> {code}

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