-
Notifications
You must be signed in to change notification settings - Fork 622
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
CASSGO-1 CASSGO-30 Native Protocol 5 Support #1822
base: trunk
Are you sure you want to change the base?
CASSGO-1 CASSGO-30 Native Protocol 5 Support #1822
Conversation
d67fcb1
to
93933c6
Compare
47a3ae9
to
b617638
Compare
What about #1783 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copied unsolved comments fromCopied unresolved comments from previous PRs.
Thanks a lot for reaching out! This PR is lacking changes from #1783. I will ask @testisnullus if we could merge it into this PR. |
@worryg0d @lukasz-antoniak I think we can keep the current implementation and merge the #1783 PR into this one. |
b617638
to
3f50a90
Compare
3f50a90
to
fbdaa2b
Compare
I merged changes from #1783 into this one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass review. I'll need some extra time to properly review the envelope/message format changes.
Hey, @joao-r-reis. Thanks a lot for your feedback! I'm pleased this PR is moving. I will take a look at your comments and suggestions tomorrow. I hope everything will be fine here. |
…to ver < 5. Using ptr based logic for now_in_seconds field instead of additional flag
Hello, @joao-r-reis. I added some changes following your comments and suggestions. Could you please take a look at this one again? Also, I have a question regarding to cache of prepared statements. Could you please look at this one too? Thanks a lot. |
…orthIt integration tests
…n METADATA_CHANGED is presented in ROWS/RESULT only if the prepared stmt is presented in the cache
2b7d196
to
2a5056d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there! I think the functionality is now done and everything looks to be working correctly 👍 These last few comments are small things.
Still need another committer to take a look at this PR though.
// 2.3.1 Initial Handshake | ||
// In order to support both v5 and earlier formats, the v5 framing format is not | ||
// applied to message exchanges before an initial handshake is completed. | ||
startupCompleted := &atomic.Bool{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to keep this one open until we have a second reviewer to look at this.
Added |
2. The driver should relly on No_metadata flag instead of Skip_metadata when handling RESULT/ROWS responses from C*
…_changed handling logic by forcing the driver to execute queries with old metadata 2. Added checking of integrity of the result to the test
6370ae0
to
b5d76bd
Compare
…rent code base uses initial keyspace provided by the user to construct the keys. Since proto v5 we also should account for keyspace bounding for a specific query, so the driver should use the bounded keyspace instead of the initial to construct the key. 2. Changed the way how routing key cache keys are constructed to account the keyspace overriding as well.
b5d76bd
to
0298a00
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff 👍 , I left 2 conversations open so that we get input from the other committer that looks at this:
- bumping
go.mod
version to1.19
so we can useatomic.Bool
(current minimum version is1.17
butgo.mod
is not up to date - Compressor interface changes
I'm +1 on both of these though.
oh I just noticed the integration tests on GH are running with |
Thanks a lot! I'm really happy to hear that. I'm waiting for a review from another committer and hoping everything will be fine here.
Oh, yeah. I'll try to change CI to run tests here. |
I changed CI here to run tests over proto 5. One thing I had to replace |
…CacheUsesOverriddenKeyspace integration tests when running on proto < 5 because they requires overridding keyspace feature that is available for proto 5 and higher
Hmm it does look weird to have If |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@joao-r-reis I adjusted the CI in this PR to run integration tests over proto 5 and the lz4 compressor. Could you please approve running the workflow to see if nothing breaks? |
Overview
C* 4.0 introduced Native Protocol 5, so we should make gocql to support it.
This PR consists of other my PRs, which also provides support for the v5 version of the protocol.
This PR provides support of Native Protocol 5 features as:
result_metadata_id
field for EXECUTE and PREPARED messages CASSANDRA-10786now_in_seconds
field forBATCH
andQUERY
messages CASSANDRA-14664keyspace
field forBATCH
andQUERY
messages