[sheepdog] [PATCH 1/3] zookeeper: retry zk_create_seq_node on retryable error
MORITA Kazutaka
morita.kazutaka at gmail.com
Thu May 30 16:58:44 CEST 2013
At Thu, 30 May 2013 22:45:37 +0800,
Liu Yuan wrote:
>
> On 05/30/2013 10:41 PM, MORITA Kazutaka wrote:
> > But actually I've experienced many ZCONNECTIONLOSS errors by
> > zoo_create() with zookeeper 3.3.5. I'm not sure ZOPERATIONTIMEOUT
> > also happens, though.
>
> So what I previous meant was, zk_create() ABI is changed on newer zookeeper. I am using v3.4.5 and this is the doc in zookeeper.h
>
> * ZOK operation completed successfully
> * ZNONODE the parent node does not exist.
> * ZNODEEXISTS the node already exists
> * ZNOAUTH the client does not have permission.
> * ZNOCHILDRENFOREPHEMERALS cannot create children of ephemeral nodes.
> * ZBADARGUMENTS - invalid input parameters
> * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE
> * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory
> */
> ZOOAPI int zoo_create(zhandle_t *zh, const char *path, const char *value,
> int valuelen, const struct ACL_vector *acl, int flags,
> char *path_buffer, int path_buffer_len);
>
> So I guess we should add ZINVALIDSTATE in the switch case handling.
How do you think we handle ZINVALIDSTATE?
I've also experienced ZINVALIDSTATE and ZSESSIONEXPIRED, but, IIUC,
those errors are caused by a timeout. Am I wrong?
Either way, I think the error should be handled in the different patch
unless it is a retryable one.
Thanks,
Kazutaka
More information about the sheepdog
mailing list