Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZOOKEEPER-4492: Merge readOnly field into ConnectRequest and Response #1837

Closed
wants to merge 17 commits into from

Conversation

tisonkun
Copy link
Member

According to this comment in ZOOKEEPER-102 I introduce a Protocol abstraction and going to moving all wire protocol concept into cnxn and this scope, so that client and server's business logics handle only deserialized/real record.

cc @eolivelli @maoling @Randgalt

This supersedes #1832.

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gave a first look.
I have to spend more time tomorrow on this.

At first glance it looks good, but I still haven't understood why the new server will be compatible with old clients.
I have got why the new client will be compatible with old servers

@tisonkun
Copy link
Member Author

tisonkun commented Mar 13, 2022

why the new server will be compatible with old clients

An old client sends connect request without readonly field, and the new server read that payload with an exception fail to read readonly field, so it switch to zk 3.3 protocol.

An old client receives connect response with readonly field from the new server, which is consumed from the wire by the leading length field, and the client doesn't parse it actually, which does no harm.

@eolivelli is there any other communication round you find subtle to understand?

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

End to end tests are passing.

We need more eyes on this patch

@lvfangmin @hanm @anmolnar @symat @fpj

@eolivelli
Copy link
Contributor

Please log a JiRA and update the commit message

@tisonkun tisonkun changed the title ZOOKEEPER-XXXX: Merge readOnly field into ConnectRequest and Response ZOOKEEPER-4492: Merge readOnly field into ConnectRequest and Response Mar 14, 2022
@tisonkun
Copy link
Member Author

@eolivelli logged as ZOOKEEPER-4492. For "commit message", I've updated the PR title. Shall I squash all commits into "ZOOKEEPER-4492: ..." also?

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
@tisonkun
Copy link
Member Author

tisonkun commented Jun 5, 2022

It seems that travis CI failed on s390x arch due to its own env issues:

Error: JAVA_HOME is not defined correctly.
  We cannot execute /usr/lib/jvm/java-11-amazon-corretto/bin/java
The command "mvn clean apache-rat:check verify -DskipTests spotbugs:check checkstyle:check -Pfull-build" exited with 1.
cache.2
store build cache

@symat @anmolnar @ztzg could you take a look at this PR?

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Copy link
Contributor

@symat symat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, sorry for the late review

@symat
Copy link
Contributor

symat commented Jun 27, 2022

merging it

@asfgit asfgit closed this in de7c586 Jun 27, 2022
@symat
Copy link
Contributor

symat commented Jun 27, 2022

merged to master, thank you @tisonkun for the contribution!

@tisonkun
Copy link
Member Author

@eolivelli @symat thanks for your reviews!

@tisonkun tisonkun deleted the protocol branch June 27, 2022 06:24
anuragmadnawat1 pushed a commit to anuragmadnawat1/zookeeper that referenced this pull request Nov 2, 2022
According to [this comment in ZOOKEEPER-102](https://issues.apache.org/jira/browse/ZOOKEEPER-102?focusedCommentId=16977000&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16977000) I introduce a `Protocol` abstraction and going to moving all wire protocol concept into `cnxn` and this scope, so that client and server's business logics handle only deserialized/real record.

cc eolivelli maoling Randgalt

This supersedes apache#1832.

Author: tison <wander4096@gmail.com>

Reviewers: Enrico Olivelli <eolivelli@apache.org>, Mate Szalay-Beko <symat@apache.org>

Closes apache#1837 from tisonkun/protocol
anuragmadnawat1 added a commit to anuragmadnawat1/zookeeper that referenced this pull request Nov 2, 2022
…#71)

According to [this comment in ZOOKEEPER-102](https://issues.apache.org/jira/browse/ZOOKEEPER-102?focusedCommentId=16977000&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16977000) I introduce a `Protocol` abstraction and going to moving all wire protocol concept into `cnxn` and this scope, so that client and server's business logics handle only deserialized/real record.

cc eolivelli maoling Randgalt

This supersedes apache#1832.

Author: tison <wander4096@gmail.com>

Reviewers: Enrico Olivelli <eolivelli@apache.org>, Mate Szalay-Beko <symat@apache.org>

Closes apache#1837 from tisonkun/protocol

Co-authored-by: tison <wander4096@gmail.com>
anurag-harness pushed a commit to anurag-harness/zookeeper that referenced this pull request Jan 13, 2023
According to [this comment in ZOOKEEPER-102](https://issues.apache.org/jira/browse/ZOOKEEPER-102?focusedCommentId=16977000&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16977000) I introduce a `Protocol` abstraction and going to moving all wire protocol concept into `cnxn` and this scope, so that client and server's business logics handle only deserialized/real record.

cc eolivelli maoling Randgalt

This supersedes apache#1832.

Author: tison <wander4096@gmail.com>

Reviewers: Enrico Olivelli <eolivelli@apache.org>, Mate Szalay-Beko <symat@apache.org>

Closes apache#1837 from tisonkun/protocol
Slach added a commit to Altinity/clickhouse-backup that referenced this pull request Aug 28, 2023
…ickhouse and zookeeper 3.9.0, see details in apache/zookeeper#1837 (comment) return `:latest` default value after resolve ClickHouse/ClickHouse#53749
minguyen9988 added a commit to minguyen9988/clickhouse-backup that referenced this pull request Sep 28, 2023
* add connection to gcs and use different context for upload incase it got cancel by another thread

* save

* keep ctx

* keep ctx

* use v2

* change to GCS_CLIENT_POOL_SIZE

* pin zookeeper to 3.8.2 version for resolve incompatibility between clickhouse and zookeeper 3.9.0, see details in apache/zookeeper#1837 (comment) return `:latest` default value after resolve ClickHouse/ClickHouse#53749

* Revert "add more precise disk re-balancing for not exists disks, during download, partial fix Altinity#561"

This reverts commit 20e250c.

* fix S3 head object Server Side Encryption parameters, fix Altinity#709

* change timeout to 60m, TODO make tests Parallel

---------

Co-authored-by: Slach <bloodjazman@gmail.com>
@ztzg
Copy link
Contributor

ztzg commented Mar 7, 2024

why the new server will be compatible with old clients

[...]

An old client receives connect response with readonly field from the new server, which is consumed from the wire by the leading length field, and the client doesn't parse it actually, which does no harm.

While this may apply to "old" Java clients, I'm afraid it does not hold for all implementations!

ZooKeeper's own C client library, notably, currently cannot connect to 3.9 servers.

I have a patch in the works.

See ZOOKEEPER-4814.

vincentbernat added a commit to akvorado/akvorado that referenced this pull request Apr 4, 2024
There is an incompatibility of ClickHouse with Zookeeper 3.9. See:

- apache/zookeeper#2146
- apache/zookeeper#1837
- ClickHouse/ClickHouse#53749
vincentbernat added a commit to akvorado/akvorado that referenced this pull request Apr 4, 2024
There is an incompatibility of ClickHouse with Zookeeper 3.9. See:

- apache/zookeeper#2146
- apache/zookeeper#1837
- ClickHouse/ClickHouse#53749
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants