Updated Branches: refs/heads/trunk d3a9e8f13 -> 7faff8db7
Avoid special casing received/expected counts in CAS timeout exceptions patch by slebresne; reviewed by jbellis for CASSANDRA-6595 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1d4caf4e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1d4caf4e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1d4caf4e Branch: refs/heads/trunk Commit: 1d4caf4e4e5d7a83ede14db1b2278e074d545ba8 Parents: 27488a5 Author: Sylvain Lebresne <sylv...@datastax.com> Authored: Thu Jan 16 15:33:46 2014 +0100 Committer: Sylvain Lebresne <sylv...@datastax.com> Committed: Thu Jan 16 16:39:01 2014 +0100 ---------------------------------------------------------------------- CHANGES.txt | 1 + src/java/org/apache/cassandra/service/StorageProxy.java | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1d4caf4e/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 2bbf809..ac8c428 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,6 +5,7 @@ * Allow specifying custom secondary index options in CQL3 (CASSANDRA-6480) * Improve replica pinning for cache efficiency in DES (CASSANDRA-6485) * Fix LOCAL_SERIAL from thrift (CASSANDRA-6584) + * Don't special case received counts in CAS timeout exceptions (CASSANDRA-6595) Merged from 1.2: * fsync compression metadata (CASSANDRA-6531) * Validate CF existence on execution for prepared statement (CASSANDRA-6535) http://git-wip-us.apache.org/repos/asf/cassandra/blob/1d4caf4e/src/java/org/apache/cassandra/service/StorageProxy.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/service/StorageProxy.java b/src/java/org/apache/cassandra/service/StorageProxy.java index c8ee297..5671655 100644 --- a/src/java/org/apache/cassandra/service/StorageProxy.java +++ b/src/java/org/apache/cassandra/service/StorageProxy.java @@ -271,7 +271,7 @@ public class StorageProxy implements StorageProxyMBean // continue to retry } - throw new WriteTimeoutException(WriteType.CAS, consistencyForPaxos, -1, -1); + throw new WriteTimeoutException(WriteType.CAS, consistencyForPaxos, 0, consistencyForPaxos.blockFor(Keyspace.open(keyspaceName))); } private static boolean hasLiveColumns(ColumnFamily cf, long now) @@ -413,7 +413,7 @@ public class StorageProxy implements StorageProxyMBean return ballot; } - throw new WriteTimeoutException(WriteType.CAS, consistencyForPaxos, -1, -1); + throw new WriteTimeoutException(WriteType.CAS, consistencyForPaxos, 0, consistencyForPaxos.blockFor(Keyspace.open(metadata.ksName))); } /** @@ -1179,7 +1179,7 @@ public class StorageProxy implements StorageProxyMBean } catch (WriteTimeoutException e) { - throw new ReadTimeoutException(consistency_level, -1, -1, false); + throw new ReadTimeoutException(consistency_level, 0, consistency_level.blockFor(Keyspace.open(command.ksName)), false); } rows = fetchRows(commands, ConsistencyLevel.QUORUM);