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

Flavio Junqueira commented on BOOKKEEPER-68:
--------------------------------------------

I was also thinking that leaving to the application gives the opportunity to 
the client to give up. One case I can think of in which not retrying might be 
better is this. We have two cold backup servers, and both try to become the 
primary. They concurrently start to read from bookkeeper and, in the process, 
they try to recover the ledger. If one fails to recover because of the 
concurrent write of the ledger metadata, then it is better to have one replica 
giving up, since it will leave more read bandwidth free to the other backup 
server. 

I need to point out that I think both approaches are correct, and the argument 
I'm making is based on performance. My conclusion is that I don't feel strongly 
about having one way or the other, but I'm slightly inclined to leaving it to 
the application. 

> Conditional setData
> -------------------
>
>                 Key: BOOKKEEPER-68
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-68
>             Project: Bookkeeper
>          Issue Type: Bug
>            Reporter: Flavio Junqueira
>            Assignee: Flavio Junqueira
>         Attachments: BOOKKEEPER-68.patch
>
>
> The write to ZooKeeper to store ledger metadata when closing a ledger must be 
> conditional, otherwise concurrent clients might end up writing in a way that 
> the update of a client overwrites the update of the other. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to