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

Flavio Junqueira commented on BOOKKEEPER-193:
---------------------------------------------

I actually got confused with the structures. I just realized that the snapshot 
itself is a ConcurrentSkipListMap. 

One of my concerns in the discussion about ConcurrentHashMap is that articles 
like this:

http://www.informit.com/guides/content.aspx?g=java&seqNum=246

say that the performance of ConcurrentHashMaps is not great with a large number 
of items. updates and updatesToMerge, however, are not expected to hold a 
pretty large number of items, even if the bookie has a large number of active 
ledgers. Also, as Ivan pointed out offline, this is not on the critical path, 
so it is not much of a concern.

The patch is good for me, +1.
                
> Ledger is garbage collected by mistake.
> ---------------------------------------
>
>                 Key: BOOKKEEPER-193
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-193
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>            Reporter: Sijie Guo
>            Assignee: Sijie Guo
>            Priority: Blocker
>             Fix For: 4.1.0
>
>         Attachments: BK-193.patch, BK-193.patch_v2, BOOKKEEPER-193.diff
>
>
> currently, we encountered such case: ledger is garbage collected by mistake, 
> and following requests would fail due to NoLedgerException.
> {code}
> 2012-03-23 19:10:47,403 - INFO  
> [GarbageCollectorThread:GarbageCollectorThread@234] - Garbage collecting 
> deleted ledger index files.
> 2012-03-23 19:10:48,702 - INFO  [GarbageCollectorThread:LedgerCache@544] - 
> Deleting ledgerId: 89408
> 2012-03-23 19:10:48,703 - INFO  [GarbageCollectorThread:LedgerCache@577] - 
> Deleted ledger : 89408
> 2012-03-23 19:11:10,013 - ERROR [NIOServerFactory-3181:BookieServer@361] - 
> Error writing 1@89408
> org.apache.bookkeeper.bookie.Bookie$NoLedgerException: Ledger 89408 not found
>         at 
> org.apache.bookkeeper.bookie.LedgerCache.getFileInfo(LedgerCache.java:228)
>         at 
> org.apache.bookkeeper.bookie.LedgerCache.updatePage(LedgerCache.java:260)
>         at 
> org.apache.bookkeeper.bookie.LedgerCache.putEntryOffset(LedgerCache.java:158)
>         at 
> org.apache.bookkeeper.bookie.LedgerDescriptor.addEntry(LedgerDescriptor.java:135)
>         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)
> {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

        

Reply via email to