[
https://issues.apache.org/jira/browse/BOOKKEEPER-153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187599#comment-13187599
]
Ivan Kelly commented on BOOKKEEPER-153:
---------------------------------------
The changes to LedgerCreateOp are nice. They simplify it a lot. I don't like
the changes to LedgerOpenOp though. The LedgerCreateOp should stop this from
happening, so now it should only happen in some sort of rare corruption case. I
think it's better just to throw the IOException in this case rather than
handling a special case of data.length==0 in numerous places. I assume
parseLedgerConfig does throw a IOException when the data is empty.
> Ledger can't be opened or closed due to zero-length metadata
> ------------------------------------------------------------
>
> Key: BOOKKEEPER-153
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-153
> Project: Bookkeeper
> Issue Type: Bug
> Components: bookkeeper-client
> Affects Versions: 4.0.0
> Reporter: Sijie Guo
> Assignee: Sijie Guo
> Fix For: 4.1.0
>
> Attachments: BK-153.patch
>
>
> Currently creating ledger path and writing ledger metadata are not in a
> transaction. so if the bookkeeper client (hub server uses bookkeeper client)
> is crashed, we have a ledger existed in zookeeper with zero-length metadata.
> we can't open/close it.
> we should create the ledger path with initial metadata to avoid such case.
> besides that, we need to add code in openLedgerOp to handle zero-length
> metadata for backward compatibility.
--
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