[
https://issues.apache.org/jira/browse/BOOKKEEPER-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479046#comment-13479046
]
Sijie Guo commented on BOOKKEEPER-346:
--------------------------------------
One possible better solution for 2) is copying the data to a temporary file in
other directly first, then renaming the temporary file to target index file.
so the steps would be
1) copying A.idx to B.rloc
2) deleting A.idx
3) renaming B.rloc to B.idx
so you would not find two *.idx at the same time when starting replaying
journal. just a tricky place is that if failure happens between 2) and 3).
there would be no *.idx for that ledger, the code needs to look up *.rloc too
if there is no *.idx. the changes would be quite small. After that, it would be
safe to replay the journal in one pass.
> Detect IOExceptions in LedgerCache and bookie should look at next ledger
> dir(if any)
> ------------------------------------------------------------------------------------
>
> Key: BOOKKEEPER-346
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-346
> Project: Bookkeeper
> Issue Type: Sub-task
> Components: bookkeeper-server
> Affects Versions: 4.1.0
> Reporter: Rakesh R
> Assignee: Vinay
> Fix For: 4.2.0
>
> Attachments: BOOKKEEPER-346.patch, BOOKKEEPER-346.patch,
> BOOKKEEPER-346.patch, BOOKKEEPER-346.patch, BOOKKEEPER-346.patch,
> BOOKKEEPER-346.patch
>
>
> This jira to detect IOExceptions in "LedgerCache" to iterate over all the
> configured ledger(s).
--
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