Set consistency prior to calling CreateSesion (#24649)

* Set consistency prior to calling CreateSesion

* Add changelog

---------

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
This commit is contained in:
David Suarez
2024-01-04 11:09:59 -08:00
committed by GitHub
parent 3b08d08909
commit 52917e0908
2 changed files with 4 additions and 0 deletions

3
changelog/24649.txt Normal file
View File

@@ -0,0 +1,3 @@
```release-note:bug
cassandra: Update Cassandra to set consistency prior to calling CreateSession, ensuring consistency setting is correct when opening connection.
```

View File

@@ -104,6 +104,7 @@ func NewCassandraBackend(conf map[string]string, logger log.Logger) (physical.Ba
cluster := gocql.NewCluster(hosts...)
cluster.Port = port
cluster.Keyspace = keyspace
cluster.Consistency = consistency
if retryCountStr, ok := conf["simple_retry_policy_retries"]; ok {
retryCount, err := strconv.Atoi(retryCountStr)