[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13186785#comment-13186785
 ] 

Flavio Junqueira commented on BOOKKEEPER-153:
---------------------------------------------

Hi Sijie, I'm not sure how adding the metadata when creating the znode avoids 
such cases. If a bookkeeper client creates a ledger and crashes before writing 
anything, then that ledger is clearly useless, so we just need to be able to 
identify and get rid of it.

Perhaps the idea you're trying to convey is that if the metadata is written 
there, then we can at execute the regular operations over the ledger, like open 
and delete. Is it the case?
                
> 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
>
>
> 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

        

Reply via email to