You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Ivan Kelly (Commented) (JIRA)" <ji...@apache.org> on 2011/11/18 19:05:01 UTC
[jira] [Commented] (BOOKKEEPER-62) Bookie can not start when
encountering corrupted records
[ https://issues.apache.org/jira/browse/BOOKKEEPER-62?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13153007#comment-13153007 ]
Ivan Kelly commented on BOOKKEEPER-62:
--------------------------------------
I've marked this as a blocker and moved to 4.0.0. We only need to deal with (1), as (2) indicates a disk failure, and there's nothing we can do. The bookie should be scrapped and a new bookie should replace it and recovery should be run for the lost bookie.
I think solving this could be quite simple. If we create the entrylogger file with a different name, such as <logid>.log-inprogress, and then rename it to <logid>.log when we're done, the journal would then be able to complete the recovery. EntryLogger.createLogId is what we'd need to change. We'd only need to add 2-3 lines of code. Testing could just be a matter of manually corrupting a log file and trying to start.
> Bookie can not start when encountering corrupted records
> --------------------------------------------------------
>
> Key: BOOKKEEPER-62
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-62
> Project: Bookkeeper
> Issue Type: Bug
> Reporter: Sijie Guo
> Assignee: Ivan Kelly
> Priority: Blocker
> Fix For: 4.0.0
>
>
> bookie tries to extract ledger ids from entry loggers during starting up. if some records corrupted, an IOException is thrown out.
> in extractLedgersFromEntryLogs function:
> line 459:
> int rc = bc.read(buff, pos);
> if (rc != data.length) {
> throw new IOException("Short read for entryLog " + entryLogId + "@" + pos + "(" + rc + "!="
> + data.length + ")");
> }
--
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