You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by st...@apache.org on 2016/07/25 00:47:54 UTC
[38/41] cassandra git commit: Merge branch 'cassandra-2.2' into
cassandra-3.0
Merge branch 'cassandra-2.2' into cassandra-3.0
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c3bf2f47
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c3bf2f47
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c3bf2f47
Branch: refs/heads/cassandra-3.0
Commit: c3bf2f47b979e14fbd2819741a5e3f63f50f68dc
Parents: 864e009 3a7cfbd
Author: Stefania Alborghetti <st...@datastax.com>
Authored: Mon Jul 25 08:41:17 2016 +0800
Committer: Stefania Alborghetti <st...@datastax.com>
Committed: Mon Jul 25 08:41:55 2016 +0800
----------------------------------------------------------------------
CHANGES.txt | 1 +
bin/cqlsh.py | 50 ++++++++-----------
...andra-driver-internal-only-3.0.0-6af642d.zip | Bin 228893 -> 0 bytes
...driver-internal-only-3.5.0.post0-d8d0456.zip | Bin 0 -> 245487 bytes
pylib/cqlshlib/copyutil.py | 23 ++++++---
pylib/cqlshlib/test/test_cqlsh_output.py | 2 +-
pylib/cqlshlib/tracing.py | 2 +-
7 files changed, 40 insertions(+), 38 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c3bf2f47/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index eb73da2,cf09719..15898df
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -21,20 -2,18 +21,21 @@@ Merged from 2.2
* Fixed cqlshlib.test.remove_test_db (CASSANDRA-12214)
* Synchronize ThriftServer::stop() (CASSANDRA-12105)
* Use dedicated thread for JMX notifications (CASSANDRA-12146)
- * NPE when trying to remove purgable tombstones from result (CASSANDRA-12143)
* Improve streaming synchronization and fault tolerance (CASSANDRA-11414)
* MemoryUtil.getShort() should return an unsigned short also for architectures not supporting unaligned memory accesses (CASSANDRA-11973)
- * Don't write shadowed range tombstone (CASSANDRA-12030)
Merged from 2.1:
+ * cannot use cql since upgrading python to 2.7.11+ (CASSANDRA-11850)
- * Improve digest calculation in the presence of overlapping tombstones (CASSANDRA-11349)
* Fix filtering on clustering columns when 2i is used (CASSANDRA-11907)
- * Account for partition deletions in tombstone histogram (CASSANDRA-12112)
-2.2.7
+3.0.8
+ * Fix potential race in schema during new table creation (CASSANDRA-12083)
+ * cqlsh: fix error handling in rare COPY FROM failure scenario (CASSANDRA-12070)
+ * Disable autocompaction during drain (CASSANDRA-11878)
+ * Add a metrics timer to MemtablePool and use it to track time spent blocked on memory in MemtableAllocator (CASSANDRA-11327)
+ * Fix upgrading schema with super columns with non-text subcomparators (CASSANDRA-12023)
+ * Add TimeWindowCompactionStrategy (CASSANDRA-9666)
+Merged from 2.2:
* Allow nodetool info to run with readonly JMX access (CASSANDRA-11755)
* Validate bloom_filter_fp_chance against lowest supported
value when the table is created (CASSANDRA-11920)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c3bf2f47/bin/cqlsh.py
----------------------------------------------------------------------
diff --cc bin/cqlsh.py
index f770ff1,a3eacdd..70eecfd
--- a/bin/cqlsh.py
+++ b/bin/cqlsh.py
@@@ -1308,25 -1236,30 +1295,30 @@@ class Shell(cmd.Cmd)
if not statement:
return False, None
- while True:
+ future = self.session.execute_async(statement, trace=self.tracing_enabled)
+ result = None
+ try:
+ result = future.result()
+ except CQL_ERRORS, err:
+ self.printerr(unicode(err.__class__.__name__) + u": " + err.message.decode(encoding='utf-8'))
+ except Exception:
+ import traceback
+ self.printerr(traceback.format_exc())
+
+ # Even if statement failed we try to refresh schema if not agreed (see CASSANDRA-9689)
+ if not future.is_schema_agreed:
try:
- future = self.session.execute_async(statement, trace=self.tracing_enabled)
- result = future.result()
- break
- except cassandra.OperationTimedOut, err:
- self.refresh_schema_metadata_best_effort()
- self.printerr(unicode(err.__class__.__name__) + u": " + unicode(err))
- return False, None
- except CQL_ERRORS, err:
- self.printerr(unicode(err.__class__.__name__) + u": " + unicode(err))
- return False, None
- except Exception, err:
- import traceback
- self.printerr(traceback.format_exc())
- return False, None
+ self.conn.refresh_schema_metadata(5) # will throw exception if there is a schema mismatch
+ except Exception:
+ self.printerr("Warning: schema version mismatch detected; check the schema versions of your "
+ "nodes in system.local and system.peers.")
+ self.conn.refresh_schema_metadata(-1)
+
+ if result is None:
+ return False, None
if statement.query_string[:6].lower() == 'select':
- self.print_result(result, self.parse_for_table_meta(statement.query_string))
+ self.print_result(result, self.parse_for_select_meta(statement.query_string))
elif statement.query_string.lower().startswith("list users") or statement.query_string.lower().startswith("list roles"):
self.print_result(result, self.get_table_meta('system_auth', 'roles'))
elif statement.query_string.lower().startswith("list"):
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c3bf2f47/pylib/cqlshlib/copyutil.py
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c3bf2f47/pylib/cqlshlib/test/test_cqlsh_output.py
----------------------------------------------------------------------