You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "michaelsembwever (via GitHub)" <gi...@apache.org> on 2026/08/26 14:42:19 UTC
[PR] Override option for default consistency levels in cqlsh [cassandra]
michaelsembwever opened a new pull request, #5066:
URL: https://github.com/apache/cassandra/pull/5066
Add the --consistency-level and --serial-consistency-level options, and the matching consistency_level and serial_consistency_level settings in the [cql] section of cqlshrc. The defaults stay ONE and SERIAL. cqlsh fails to start when either value is invalid.
Upstreamed from datastax/cassandra commit 87929f133dfed4ec1a45cbfaac5246ca14723c26
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] Override option for default consistency levels in cqlsh [cassandra]
Posted by "driftx (via GitHub)" <gi...@apache.org>.
driftx commented on code in PR #5066:
URL: https://github.com/apache/cassandra/pull/5066#discussion_r3863930178
##########
pylib/cqlshlib/cqlshmain.py:
##########
@@ -399,6 +406,14 @@ def __init__(self, hostname, port, color=False,
self.tracing_enabled = tracing_enabled
self.page_size = self.default_page_size
self.expand_enabled = expand_enabled
+
+ if not consistency_level:
+ raise Exception('Argument consistency_level must not be None')
+ if not serial_consistency_level:
+ raise Exception('Argument serial_consistency_level must not be None')
Review Comment:
Misleading exception here too
##########
pylib/cqlshlib/cqlshmain.py:
##########
@@ -399,6 +406,14 @@ def __init__(self, hostname, port, color=False,
self.tracing_enabled = tracing_enabled
self.page_size = self.default_page_size
self.expand_enabled = expand_enabled
+
+ if not consistency_level:
Review Comment:
Need to compare to None to make the exception correct, and also this will catch ConsistencyLevel.ANY which is numerically zero.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org