You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by mi...@apache.org on 2014/08/15 00:17:40 UTC
[02/13] git commit: cqlsh should automatically disable tracing when
selecting from system_traces
cqlsh should automatically disable tracing when selecting from system_traces
patch by Philip Thompson and Mikhail Stepura; reviewed by Mikhail Stepura for CASSANDRA-7641
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e7566609
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e7566609
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e7566609
Branch: refs/heads/cassandra-2.1.0
Commit: e7566609e232d2adee2e2879ad4811b7cce1f5d2
Parents: 44764c0
Author: Mikhail Stepura <mi...@apache.org>
Authored: Thu Aug 14 13:11:34 2014 -0700
Committer: Mikhail Stepura <mi...@apache.org>
Committed: Thu Aug 14 14:13:57 2014 -0700
----------------------------------------------------------------------
CHANGES.txt | 2 ++
bin/cqlsh | 4 ++++
2 files changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e7566609/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 1ac22f9..04902ad 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
2.0.10
+ * (cqlsh) cqlsh should automatically disable tracing when selecting
+ from system_traces (CASSANDRA-7641)
* (Hadoop) Add CqlOutputFormat (CASSANDRA-6927)
* Don't depend on cassandra config for nodetool ring (CASSANDRA-7508)
* (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e7566609/bin/cqlsh
----------------------------------------------------------------------
diff --git a/bin/cqlsh b/bin/cqlsh
index 6a24753..6aa397e 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -893,6 +893,9 @@ class Shell(cmd.Cmd):
if ksname is not None:
ksname = self.cql_unprotect_name(ksname)
cfname = self.cql_unprotect_name(parsed.get_binding('cfname'))
+ tracing_was_enabled = self.tracing_enabled
+ stop_tracing = ksname == 'system_traces' or (ksname is None and self.current_keyspace == 'system_traces')
+ self.tracing_enabled = self.tracing_enabled and not stop_tracing
statement = parsed.extract_orig()
with_default_limit = parsed.get_binding('limit') is None
if with_default_limit:
@@ -900,6 +903,7 @@ class Shell(cmd.Cmd):
self.perform_statement(statement,
decoder=ErrorHandlingSchemaDecoder,
with_default_limit=with_default_limit)
+ self.tracing_enabled = tracing_was_enabled
def perform_statement(self, statement, decoder=None, with_default_limit=False):
if self.tracing_enabled: