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

Takashi Ohnishi commented on ZOOKEEPER-1871:
--------------------------------------------

Hi Rakesh. Thank you for review and comments!

>Does it really required to introduce a new argument "-waitforconnection" for 
>the connection stablishment.
>Instead can we think of reusing the "-timeout" option value and can wait till 
>the session timeout for the connection establishment. I hope deafult value 
>>30seconds is large time, isn't it?

All right.
I will change default value of this new timeout to 5 seconds. I think that it 
is enough to complete connection to  quorum,  even if one server is down. 

And I will also change the behavior of this option: 
  (a) if -waitforconnection option is specified, zkCli.sh wait  with same value 
as session timeout until connection to quorum is done
  (b) if -waitforconnection options is not specified, zkCli.sh wait with 
default 5 seconds until connection to quorum is done
So, the usage is as below:
{code}
  $ bin/zkCli.sh [-server host:port] [-timeout sessionTimeout[ms]] 
[-waitforconnection] cmd args 
{code}
How about?

>In tests, please add message part, it will give some hint for others about the 
>expectation.

I will fix it.

>After attaching the patch, please do 'Submit Patch', this will trigger the 
>regression and gets the QA report.

I will do so. Thanks!

> Add an option to zkCli to wait for connection before executing commands
> -----------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1871
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1871
>             Project: ZooKeeper
>          Issue Type: Improvement
>            Reporter: Vinayakumar B
>         Attachments: ZOOKEEPER-1871.patch
>
>
> Add an option to zkCli to wait for connection before executing any commands.
> This is helpful for the execution of inline commands.
> We are having some scripts to create/delete znodes through commandline. But 
> if getting the connection delays due to one of the node down, then command 
> will fail with connectionloss even though quorum is available.
> So I propose a commandline option (similar to -server and -timeout) 
> "-waitforconnection" to wait for the connection before executing any commands.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to