You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Rakesh R (JIRA)" <ji...@apache.org> on 2012/10/28 04:51:12 UTC
[jira] [Commented] (BOOKKEEPER-347) Provide mechanism to detect
r-o bookie by the bookie clients
[ https://issues.apache.org/jira/browse/BOOKKEEPER-347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485562#comment-13485562 ]
Rakesh R commented on BOOKKEEPER-347:
-------------------------------------
Thanks Vinay and nice work. Just following comments:
----
comment#1:
In your patch, its iterating over bookieAddresses and comparing with 'readonly' string. Instead we could check the corresponding bookie address present in '{bookieRegPath}/readonly/' znode. isn't it?
{code}
HashSet<InetSocketAddress> newBookieAddrs = new HashSet<InetSocketAddress>();
for (String bookieAddrString : children) {
+ if (Bookie.READONLY.equals(bookieAddrString)) {
+ // Just exclude the readonly bookies from available nodes
+ // list.
+ continue;
+ }
{code}
----
comment#2:
Also, its good to have test cases verifying the behaviour, like we can just creating an ephemeral znode bookieip:port under /readonly and try creating ledger using bkclient, should through exception.
-Rakesh
> 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
>
>
> 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