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

120: Support protocol v2 #119

Merged
merged 30 commits into from
Jul 24, 2024
Merged

120: Support protocol v2 #119

merged 30 commits into from
Jul 24, 2024

Conversation

lukasz-antoniak
Copy link
Contributor

@lukasz-antoniak lukasz-antoniak commented Jun 17, 2024

fix #120

@lukasz-antoniak lukasz-antoniak marked this pull request as ready for review June 17, 2024 15:29
@joao-r-reis
Copy link
Collaborator

The purpose of the ticket is to support v2, protocol negotiation in the control connection is just a part of it so I suggest modifying the name of the PR.

There's another part that is missing here which is modifying the maximum number of stream ids and that part might be more tricky and will require you to deep dive a bit more into the other part of the codebase (cluster connector, client connector, client handler).

Modifying the number of stream ids in the control connection is probably not hard and it's on the part of the code that you're already working with so you can start there. But we also need to set the max number of stream ids based on the protocol version on the non control connections too. At the moment there's a config setting for it that defaults to 2048 but with v2 the connection only supports up to 128 stream ids.

@joao-r-reis
Copy link
Collaborator

Also we should make sure we have tests covering v2 protocol to validate this PR.

@joao-r-reis joao-r-reis changed the title ZDM-71: Introduce protocol negotiation ZDM-610 Introduce protocol negotiation Jun 19, 2024
@joao-r-reis joao-r-reis changed the title ZDM-610 Introduce protocol negotiation ZDM-610 Support protocol v2 Jun 19, 2024
@lukasz-antoniak lukasz-antoniak changed the title ZDM-610 Support protocol v2 120: Support protocol v2 Jun 19, 2024
Copy link
Collaborator

@joao-r-reis joao-r-reis left a comment

Choose a reason for hiding this comment

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

Looking good, left some comments.

go.sum Outdated Show resolved Hide resolved
integration-tests/customhandler_test_utils.go Outdated Show resolved Hide resolved
integration-tests/prepared_statements_test.go Outdated Show resolved Hide resolved
integration-tests/setup/testcluster.go Outdated Show resolved Hide resolved
integration-tests/utils/testutils.go Outdated Show resolved Hide resolved
proxy/pkg/zdmproxy/controlconn.go Show resolved Hide resolved
proxy/pkg/zdmproxy/cqlconn.go Outdated Show resolved Hide resolved
proxy/pkg/zdmproxy/cqlconn.go Outdated Show resolved Hide resolved
integration-tests/customhandler_test_utils.go Outdated Show resolved Hide resolved
@joao-r-reis
Copy link
Collaborator

Also, the stream ids are still left unchanged, we need to override the max stream ids config setting when it's v2 in case it's above what v2 supports. And need a test for it.

Copy link
Collaborator

@joao-r-reis joao-r-reis left a comment

Choose a reason for hiding this comment

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

Some more comments

README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
integration-tests/connect_test.go Outdated Show resolved Hide resolved
integration-tests/customhandler_test_utils.go Show resolved Hide resolved
integration-tests/protocolv2_test.go Outdated Show resolved Hide resolved
proxy/pkg/config/config.go Outdated Show resolved Hide resolved
proxy/pkg/zdmproxy/clienthandler.go Outdated Show resolved Hide resolved
proxy/pkg/zdmproxy/clienthandler.go Outdated Show resolved Hide resolved
integration-tests/protocolv2_test.go Outdated Show resolved Hide resolved
integration-tests/protocolv2_test.go Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@joao-r-reis joao-r-reis left a comment

Choose a reason for hiding this comment

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

The tests look really good 👍

README.md Show resolved Hide resolved
@lukasz-antoniak lukasz-antoniak merged commit 7e7b1f2 into main Jul 24, 2024
8 checks passed
@lukasz-antoniak lukasz-antoniak deleted the ZDM-71 branch July 24, 2024 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support protocol version 2
3 participants