[
https://issues.apache.org/jira/browse/BOOKKEEPER-163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227332#comment-13227332
]
Sijie Guo commented on BOOKKEEPER-163:
--------------------------------------
new patch is well done. but a new issue came to me when I reviewed this patch.
I am not sure that copying files is good enough for upgrading, since it would
take long time to copy data and exhaust disk space (if we don't have enough
space to copy data, the upgrading would be failed). do you consider creating
hardlink instead of copying data for upgrading?
> Prevent incorrect NoSuchLedgerException for readLastConfirmed.
> --------------------------------------------------------------
>
> Key: BOOKKEEPER-163
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-163
> Project: Bookkeeper
> Issue Type: Bug
> Components: bookkeeper-client, bookkeeper-server
> Affects Versions: 4.0.0
> Reporter: Sijie Guo
> Assignee: Ivan Kelly
> Fix For: 4.1.0
>
> Attachments: BOOKKEEPER-163.diff, BOOKKEEPER-163.diff
>
>
> bookkeeper client treats NoSuchLedgerException as valid response when reading
> last confirmed. If NoSuchLedgerException is caused due to an empty directory
> in following cases, it is an incorrect response.
> 1) A disk is replaced or ledger index is removed by a sloppy admin.
> 2) A disk is not mounted when a bookie machine is restarted.
> We need a mechanism to prevent such incorrect responses.
> Ivan suggested to generate a instance key for each bookie and write it into
> the ledger directories. If a directory doesn't have the key, and other
> directories do, then it shouldn't start. This would also resolve the issue
> that someone starting a new bookie with the same IP as a bookie which has
> previously died.
--
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