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

Sijie Guo commented on BOOKKEEPER-193:
--------------------------------------

for #snapshot(), it means returning a snapshot object for processing. currently 
only gcThread would call snapshot, so it is safe to define the return value as 
NavigableMap.

but the variable snapshot in SnapshotMap, it would be access in the 
contains/remove operation in SnapshotMap. Currently contains/remove seems just 
be accessed in GcThread, but I am not sure the operations especially contains 
would be accessed in other thread. so I think it would better to keep 
add/remove/contains as ThreadSafe.
                
> 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