Skip to content

Commit

Permalink
cqlsh should use cql v4 by default when connecting #44
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mykaul authored and fruch committed Aug 28, 2023
1 parent 0c724e2 commit 99a9886
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/cqlsh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 99a9886

Please sign in to comment.