From e40a582f89d5d2c6c1f3b85198aec6508d2ebfdc Mon Sep 17 00:00:00 2001 From: Yaniv Michael Kaul Date: Fri, 26 Apr 2024 11:10:23 +0300 Subject: [PATCH] Do not try using peers_v2 table upon connection if the connectio is to a ScyllaDB cluster Fixes: https://github.com/scylladb/gocql/issues/170 Signed-off-by: Yaniv Kaul --- conn.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conn.go b/conn.go index 0f687aaa7..49c87e1c9 100644 --- a/conn.go +++ b/conn.go @@ -1769,6 +1769,10 @@ func (c *Conn) querySystemPeers(ctx context.Context, version cassVersion) *Iter ) c.mu.Lock() + if isScyllaConn((c)) { // ScyllaDB does not support system.peers_v2 + c.isSchemaV2 = false + } + isSchemaV2 := c.isSchemaV2 c.mu.Unlock()