Kezhu Wang created ZOOKEEPER-4821:
-------------------------------------
Summary: ConnectRequest got NOTREADONLY ReplyHeader
Key: ZOOKEEPER-4821
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4821
Project: ZooKeeper
Issue Type: Bug
Components: java client, server
Affects Versions: 3.9.2, 3.8.4
Reporter: Kezhu Wang
I would expect {{ConnectRequest}} has two kinds of response in normal
conditions: {{ConnectResponse}} and socket close. But if sever was configured
with {{readonlymode.enabled}} but not {{localSessionsEnabled}}, then client
could get {{NOTREADONLY}} in reply to {{ConnectRequest}}. I saw, at least, no
handling in java client. And, I encountered this in writing tests for rust
client.
It guess it is not by design. And we probably could close the socket in early
phase. But also, it could be solved in client sides as
{{sizeof(ConnectResponse)}} is larger than {{sizeof(ReplyHeader)}}. Then, we
gain ability to carry error for {{ConnectRequest}} while {{ConnectResponse}}
does not.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)