Set Cassandra connect timeout, not just regular timeout (#12903)

This commit is contained in:
Nick Cabatoff 2021-10-22 11:02:28 -04:00 committed by GitHub
parent 702a275ccc
commit 83076bb58d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

3
changelog/12903.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:improvement
db/cassandra: make the connect_timeout config option actually apply to connection timeouts, in addition to non-connection operations
```

View File

@ -189,6 +189,7 @@ func (c *cassandraConnectionProducer) createSession(ctx context.Context) (*gocql
}
clusterConfig.Timeout = c.connectTimeout
clusterConfig.ConnectTimeout = c.connectTimeout
clusterConfig.SocketKeepalive = c.socketKeepAlive
clusterConfig.SslOpts = c.sslOpts

View File

@ -78,7 +78,8 @@ vault write database/config/cassandra-example <...other fields> pem_json=@/path/
- `protocol_version` `(int: 2)` Specifies the CQL protocol version to use.
- `connect_timeout` `(string: "5s")` Specifies the connection timeout to use.
- `connect_timeout` `(string: "5s")` Specifies the timeout to use, both for
connections and in general.
- `local_datacenter` `(string: "")` If set, enables host selection policy
which will prioritize and use hosts which are in the local datacenter before