-
Notifications
You must be signed in to change notification settings - Fork 642
CASSGO-61 fix connection timeout override with custom #1866
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
base: trunk
Are you sure you want to change the base?
Conversation
2704a12 to
deb64e8
Compare
951c58d to
ae2efae
Compare
ae2efae to
73bf8bb
Compare
OleksiienkoMykyta
left a comment
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.
Also, it would be nice to provide details to documentation with code examples, how to set a custom timeout, and how it works.
In general, LGTM)
cassandra_test.go
Outdated
| } | ||
| session.executor.pool.mu.Unlock() | ||
| err = session.Query("INSERT INTO gocql_test.named_query(id, value) VALUES(2, 'value')").Exec() | ||
| if err == nil || err != ErrTimeoutNoResponse { |
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.
If you are expecting exactly ErrTimeoutNoResponse, this part is redundant "err == nil" wdyt?
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.
Agree, fixed.
73bf8bb to
1d3d896
Compare
I've added the code example to the |
1d3d896 to
455a01c
Compare
|
When the context is cancelled because it had a deadline, we aren't calling |
455a01c to
62d08a2
Compare
Agree. I've also added this check here in case if deadline hits before we create |
Resolves #953
This PR provides the fix for the connection timeout override via query context timeout, allowing users to set the custom timeout for the query.