Skip to content

Commit

Permalink
Set Cassandra connect timeout, not just regular timeout (#12903)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncabatoff committed Oct 22, 2021
1 parent 4d4b37b commit 8f7dafe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions 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
```
1 change: 1 addition & 0 deletions plugins/database/cassandra/connection_producer.go
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion website/content/api-docs/secret/databases/cassandra.mdx
Expand Up @@ -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
Expand Down

0 comments on commit 8f7dafe

Please sign in to comment.