You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Kezhu Wang (Jira)" <ji...@apache.org> on 2024/03/28 13:03:00 UTC

[jira] [Created] (ZOOKEEPER-4821) ConnectRequest got NOTREADONLY ReplyHeader

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)