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

n1ql query timeout should be set at both bucket and cluster level #3839

Closed
adamcfraser opened this issue Nov 28, 2018 · 0 comments

Comments

@adamcfraser
Copy link
Contributor

commented Nov 28, 2018

SG is currently setting the n1ql query for the bucket:

bucket.Bucket.SetN1qlTimeout(bucket.spec.GetViewQueryTimeout())

However, gocb will override that with the cluster-level query timeout if the cluster-level value is lower:
https://github.com/couchbase/gocb/blob/699b13a51af5dd4f80ff3deedf41bba60debad32/bucket_ping.go#L144

Since we establish a cluster connection per SG database, it should be sufficient to set both the cluster and bucket timeout to the same value. The cluster timeout needs to be specified as part of the connection string, to get picked up during cluster connect here:
https://github.com/couchbase/gocb/blob/0c2ba19e5dead131bfe587323908815d9201a9d3/cluster.go#L130

@adamcfraser adamcfraser added this to the Iridium milestone Nov 28, 2018

@adamcfraser adamcfraser changed the title n1ql query timeout needs to be set at both bucket and cluster level n1ql query timeout should be set at both bucket and cluster level Nov 28, 2018

@adamcfraser adamcfraser added the backlog label Dec 5, 2018

@adamcfraser adamcfraser added ready backlog and removed backlog ready labels Dec 10, 2018

@adamcfraser adamcfraser self-assigned this Jan 3, 2019

@adamcfraser adamcfraser added in progress review and removed backlog labels Jan 3, 2019

@bbrks bbrks closed this in #3885 Jan 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.