-
Notifications
You must be signed in to change notification settings - Fork 625
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
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? |
} | ||
|
||
// connReader implements ConnReader. | ||
// It retries to read data up to 5 times or returns error. |
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 curious why it retries up to 5 times. Is that recommended somewhere or consistent with other drivers? I'm not used to seeing a Read
call not respect the timeout and instead take 5x the timeout.
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.
Here I focused on extracting this code to the specific connReader
type to avoid unintentional reading from Conn.conn
or Conn.r
. I didn't aim to change this behavior, because this is a bit out of the scope of this PR. However, I already added a connReader
... Probably changing this behavior should be handled here as well
@@ -1394,14 +1578,18 @@ func (c *Conn) executeQuery(ctx context.Context, qry *Query) *Iter { | |||
params.skipMeta = !(c.session.cfg.DisableSkipMetadata || qry.disableSkipMetadata) |
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.
Can you update this like I did in #1852 or we can just merge that MR since I don't think it'll conflict? We shouldn't be sending skipMeta if we didn't get it from the prepare. @joao-r-reis
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.
Yeah now I see the difference, I think it's better if we just merge #1852 right away, I don't think it will conflict
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 think we can merge #1852. It should not cause conflicts, but if it does I'll resolve them
Hello. This PR has already been floating for quite a while. Is there anything I can do to push it forward? |
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