From f0ec716a9180e88b9a2843431bb7cf5a00ec68dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Wed, 5 Apr 2023 12:59:22 +0200 Subject: [PATCH] casds: More lax timeouts --- blockstore/cassbs/cassandra_ds.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/blockstore/cassbs/cassandra_ds.go b/blockstore/cassbs/cassandra_ds.go index 09259e2e882..f30e4b86a4b 100644 --- a/blockstore/cassbs/cassandra_ds.go +++ b/blockstore/cassbs/cassandra_ds.go @@ -26,6 +26,9 @@ func NewCassandraDS(connectString string) (*CassandraDatastore, error) { cluster := gocql.NewCluster(connectString) cluster.Consistency = gocql.Quorum cluster.RetryPolicy = &gocql.SimpleRetryPolicy{NumRetries: 30} + cluster.Timeout = 30 * time.Second + cluster.ConnectTimeout = 30 * time.Second + session, err := cluster.CreateSession() if err != nil { return nil, fmt.Errorf("creating new Cassandra session: %w", err)