From 99a9886556ce92152b955137abd1e73d8318bb5d Mon Sep 17 00:00:00 2001 From: Yaniv Kaul Date: Thu, 17 Aug 2023 11:17:38 +0300 Subject: [PATCH] cqlsh should use cql v4 by default when connecting #44 ScyllaDB supports v4, and if it just inherits the default from the Python driver, it tries with different versions (66, 65, 5) until it finally succeeds, which just slows down the connection. No reason for ScyllaDB's cqlsh not to be opinionated about the protocol version it uses Fixes: #44 Signed-off-by: Yaniv Kaul --- bin/cqlsh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cqlsh.py b/bin/cqlsh.py index 5d80a91..97ce19b 100755 --- a/bin/cqlsh.py +++ b/bin/cqlsh.py @@ -2445,7 +2445,7 @@ def read_options(cmdlineargs, environment): optvalues.encoding = option_with_default(configs.get, 'ui', 'encoding', UTF8) optvalues.tty = option_with_default(configs.getboolean, 'ui', 'tty', sys.stdin.isatty()) - optvalues.protocol_version = option_with_default(configs.getint, 'protocol', 'version', None) + optvalues.protocol_version = option_with_default(configs.getint, 'protocol', 'version', 4) optvalues.cqlversion = option_with_default(configs.get, 'cql', 'version', None) optvalues.connect_timeout = option_with_default(configs.getint, 'connection', 'timeout', DEFAULT_CONNECT_TIMEOUT_SECONDS) optvalues.request_timeout = option_with_default(configs.getint, 'connection', 'request_timeout', DEFAULT_REQUEST_TIMEOUT_SECONDS)