diff --git a/changelog/12903.txt b/changelog/12903.txt new file mode 100644 index 000000000..f14762dce --- /dev/null +++ b/changelog/12903.txt @@ -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 +``` \ No newline at end of file diff --git a/plugins/database/cassandra/connection_producer.go b/plugins/database/cassandra/connection_producer.go index 423ca6988..db8ea4f64 100644 --- a/plugins/database/cassandra/connection_producer.go +++ b/plugins/database/cassandra/connection_producer.go @@ -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 diff --git a/website/content/api-docs/secret/databases/cassandra.mdx b/website/content/api-docs/secret/databases/cassandra.mdx index 2bc0cb84d..482cce026 100644 --- a/website/content/api-docs/secret/databases/cassandra.mdx +++ b/website/content/api-docs/secret/databases/cassandra.mdx @@ -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