[
https://issues.apache.org/jira/browse/BOOKKEEPER-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13637073#comment-13637073
]
Sijie Guo commented on BOOKKEEPER-572:
--------------------------------------
{quote}
I disagree. If a buggy record doesn't crash the bookie when first being
applied, there's no reason it should crash it when being replayed from the
journal.
{quote}
you don't know whether the record crash bookie if you reverse the order to
write journal first. so when you knew it crashed the bookie, it is too late
since that record is in journal.
{quote}
This sounds like a completely different design for the index cache. Is there a
design doc for this? The changelist you posted doesn't show where this fits
into the current design.
{quote}
this change would base on the refactoring we made for LedgerCacheImpl by
separating the memory part and the persistence part
(https://github.com/twitter/bookkeeper/blob/master/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/IndexPersistenceMgr.java
and
https://github.com/twitter/bookkeeper/blob/master/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/IndexInMemPageMgr.java).
The change is an alternative for index persistence, it didn't change the
in-memory structures.
> Make the journal a write ahead log
> ----------------------------------
>
> Key: BOOKKEEPER-572
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-572
> Project: Bookkeeper
> Issue Type: Bug
> Reporter: Ivan Kelly
> Assignee: Ivan Kelly
> Fix For: 4.3.0
>
> Attachments:
> 0001-BOOKKEEPER-572-Write-to-the-journal-before-writing-t.patch,
> 0001-BOOKKEEPER-572-Write-to-the-journal-before-writing-t.patch,
> 0001-BOOKKEEPER-572-Write-to-the-journal-before-writing-t.patch,
> 0001-BOOKKEEPER-572-Write-to-the-journal-before-writing-t.patch,
> 0003-BOOKKEEPER-572-Write-to-the-journal-before-writing-t.patch,
> 0003-BOOKKEEPER-572-Write-to-the-journal-before-writing-t.patch,
> BookieServer-2013-02-22.snapshot
>
>
> A bookie adds to the LedgerStorage before writing to the journal. This is the
> fundamental problem behind BOOKKEEPER-447 and blocks a nice solution to
> BOOKKEEPER-530. By writing to the memory state before the journal, we exposed
> ourselves to bugs if the bookie crashed before we wrote to the journal. The
> entry may exist in index, but not in the entrylog, a situation which cannot
> be distinguished from an I/O error. The comments on BOOKKEEPER-447 goes into
> more details.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira