[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ivan Kelly updated BOOKKEEPER-166:
----------------------------------

    Attachment: BOOKKEEPER-166.diff

Patch simply reenables the test. Another fix actually fixed the issue. 

When we discussed this before we came to the conclusion that simply ensuring 
that we read 4 bytes would be enough. This is not the case, as the journal 
preallocates disk space, so in the case where the length is truncated, the 
final bits would be zeroed. However, this is fine now, as it will try to read 
in the packet. The entryId and ledgerId will be 0, and the bookie will see that 
ledgerId doesn't exist and skip the entry.
                
> Bookie will not recover its journal if the length prefix of an entry is 
> truncated
> ---------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-166
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-166
>             Project: Bookkeeper
>          Issue Type: Bug
>            Reporter: Ivan Kelly
>            Assignee: Ivan Kelly
>             Fix For: 4.1.0
>
>         Attachments: BOOKKEEPER-166.diff
>
>
> Entries in the bookie's journal are written in the format <len><entry>
> If the bookie crashes while writing the length part, then the bookie will not 
> be able to recover the journal.
> An unlikely situation to happen as this is only 1 int, but an issue none the 
> less.
> There is a testcase in BOOKKEEPER-165 which will trigger this when enabled 
> (BookieJournalTest#testTruncatedInLenJournal).

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