[
https://issues.apache.org/jira/browse/BOOKKEEPER-347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13487193#comment-13487193
]
Ivan Kelly commented on BOOKKEEPER-347:
---------------------------------------
testLedgerCreationShouldFailWithReadonlyBookie() is broken. Try replacing the 2
zk lines with a 3 second thread sleep. it still passes. you've killed one of
the two bookies at the start of the test, so there's no way you'll be able to
create a ledger.
The problem is that, in BookieWatcher, you remove the READONLY znode, which
only removes "readonly" from the list, not the znodes under "readonly". Really,
what you need to do is watch /available/readonly similar to how /available is
watched, and update a list of readonly bookies when the children change. this
list can then be remove for the desired effect.
Finally, in the test, you should use BookKeeperClusterTestCase#getBookie()
instead of hard coding the bookie id.
> Provide mechanism to detect r-o bookie by the bookie clients
> -------------------------------------------------------------
>
> Key: BOOKKEEPER-347
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-347
> Project: Bookkeeper
> Issue Type: Sub-task
> Components: bookkeeper-client
> Affects Versions: 4.1.0
> Reporter: Rakesh R
> Assignee: Vinay
> Fix For: 4.2.0
>
> Attachments: BOOKKEEPER-347.patch, BOOKKEEPER-347.patch
>
>
> This jira to discuss, how the bookie client knows about the bookie running in
> r-o. This would be required by the client to choose writable bookies during
> add entries.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira