Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

Warning about 'old client' missing 'readOnly' flag #86

Open
JasonRosenberg opened this issue Sep 28, 2015 · 2 comments · May be fixed by #232
Open

Warning about 'old client' missing 'readOnly' flag #86

JasonRosenberg opened this issue Sep 28, 2015 · 2 comments · May be fixed by #232

Comments

@JasonRosenberg
Copy link

We are using the client to connect to a 3.4.6 zookeeper server. On connect, we get these warnings in the zk server log:

- Connection request from old client /127.0.0.1:51335; will be dropped if server is in r-o mode

Looking at the source code in ZooKeeperServer.java, there's this:

        boolean readOnly = false;
        try {
            readOnly = bia.readBool("readOnly");
            cnxn.isOldClient = false;
        } catch (IOException e) {
            // this is ok -- just a packet from an old client which
            // doesn't contain readOnly field
            LOG.warn("Connection request from old client "
                    + cnxn.getRemoteSocketAddress()
                    + "; will be dropped if server is in r-o mode");
        }

It appears this is ok, but the client should probably be updated to look like a current client.

@samuel
Copy link
Owner

samuel commented Oct 1, 2015

Is there other changes that need to be made to support the read only mode? Or is it just different possible error states to handle if the server is set to read-only?

Would like to understand what the r-o mode means before sending the flag.

@JasonRosenberg
Copy link
Author

FWIW, here's a design doc for the read-only mode feature (which is now completed and available): https://wiki.apache.org/hadoop/ZooKeeper/GSoCReadOnlyMode

I think the only thing needed here is to add the flag (default it false), and expose an api option to set it to true.....

guillaumebreton added a commit to guillaumebreton/go-zookeeper that referenced this issue Aug 25, 2016
The read only mode field should be send directly in the connect request
and response. fixes samuel#86
@timoha timoha linked a pull request Mar 6, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants