Hi ZK Experts,

I would like to ask a quick question. As we know, assume we are using
the default 1 MB jute.maxbuffer, if a zk client tries to write a large
znode > 1MB, the server will fail it. Server will log "Len error" and
close the connection. The client will receive a connection loss. In a
third party ZkClient lib (eg. I0IZkClient), it'll keep retrying the
operation upon connection loss. And this forever retrying might have a
chance to take down the zk server.

I believe the zk community must have considered such a situation. I
wonder why zk server does not handle the error a bit better and send a
clearer response to the client, eg. KeeperException.PacketLenError
(and zk server does not really have to close the connection), so the
client knows the error is non retryable. I think there must be some
reasons I am not aware of that zk does not offer it, so I'd like to
ask here. Or is there any ticket/email thread that has discussed this?

Maybe zk would expect the app client to handle connection loss
appropriately, eg. by having a retry strategy(backoff retry, limiting
the retry count, etc.). Is this what zk would expect, instead of
returning a PacketLenError exception?

Really appreciate any input.


Best,
-Huizhi

Reply via email to