[
https://issues.apache.org/jira/browse/BOOKKEEPER-62?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13159846#comment-13159846
]
Sijie Guo commented on BOOKKEEPER-62:
-------------------------------------
suppose bookie servers run in following case:
1. bookie server running, writing 3 entries to 1.log.
2. bookie server crashed. 1.log was corrupted, entry 3 is partial. we still has
3 entries in journal file.
3. bookie server restarted, replay these 3 entries from journal file, writing
to 2.log again. SyncThread did flush. 2.log be flushed, became a completed log
file.
4. bookie server shuts down.
5. bookie server restarts. it tried to extract ledger id from entry logs. it
failed on 1.log (would skip the partial entry), then 2.log will not be
processed (we just have first 2 entries). Also, SyncThread did flush in step3,
no journal replay took placed. Then we lose entry 3 (although we have it in
2.log).
> 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: Benjamin Reed
> Priority: Blocker
> Fix For: 4.0.0
>
> Attachments: BOOKKEEPER-62.diff, BOOKKEEPER-62.diff,
> BOOKKEEPER-62.patch, BOOKKEEPER-62.patch
>
>
> 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