[
https://issues.apache.org/jira/browse/BOOKKEEPER-68?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Flavio Junqueira updated BOOKKEEPER-68:
---------------------------------------
Attachment: BOOKKEEPER-68.patch
Patch with test. In the end, the test was way easier to write than I expected.
I simply create a reader before the writer closes the ledger, and I check that
the writer call to close the ledger fails.
To be able to verify that the call to close has failed, I needed to change the
signature of the close call, which was returning void. Hope no one finds it to
be a big deal.
> 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
> Fix For: 3.4.0
>
> Attachments: BOOKKEEPER-68.patch, 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.
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