You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ja...@apache.org on 2013/11/07 07:09:40 UTC
[1/3] git commit: Allow LOCAL_ONE/LOCAL_QUORUM to work with
SimpleStrategy patch by Alex Liu; reviewed by jasobrown for CASSANDRA-6238
Updated Branches:
refs/heads/trunk c65c15cc0 -> c2bd0d8d1
Allow LOCAL_ONE/LOCAL_QUORUM to work with SimpleStrategy
patch by Alex Liu; reviewed by jasobrown for CASSANDRA-6238
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e5715f4e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e5715f4e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e5715f4e
Branch: refs/heads/trunk
Commit: e5715f4e9618e933fca4d4537ff84fd4ee24a641
Parents: 8c24044
Author: Jason Brown <ja...@gmail.com>
Authored: Wed Nov 6 22:02:49 2013 -0800
Committer: Jason Brown <ja...@gmail.com>
Committed: Wed Nov 6 22:02:49 2013 -0800
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/db/ConsistencyLevel.java | 14 ++------------
2 files changed, 3 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e5715f4e/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index eab185a..d27c495 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -12,6 +12,7 @@
* make calculatePendingRanges asynchronous (CASSANDRA-6244)
* Remove blocking flushes in gossip thread (CASSANDRA-6297)
* Fix potential socket leak in connectionpool creation (CASSANDRA-6308)
+ * Allow LOCAL_ONE/LOCAL_QUORUM to work with SimpleSrrategy (CASSANDRA-6238)
1.2.11
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e5715f4e/src/java/org/apache/cassandra/db/ConsistencyLevel.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ConsistencyLevel.java b/src/java/org/apache/cassandra/db/ConsistencyLevel.java
index 1ce019b..25fb25b 100644
--- a/src/java/org/apache/cassandra/db/ConsistencyLevel.java
+++ b/src/java/org/apache/cassandra/db/ConsistencyLevel.java
@@ -275,10 +275,6 @@ public enum ConsistencyLevel
{
case ANY:
throw new InvalidRequestException("ANY ConsistencyLevel is only supported for writes");
- case LOCAL_QUORUM:
- case LOCAL_ONE:
- requireNetworkTopologyStrategy(table);
- break;
case EACH_QUORUM:
throw new InvalidRequestException("EACH_QUORUM ConsistencyLevel is only supported for writes");
}
@@ -286,14 +282,8 @@ public enum ConsistencyLevel
public void validateForWrite(String table) throws InvalidRequestException
{
- switch (this)
- {
- case LOCAL_QUORUM:
- case EACH_QUORUM:
- case LOCAL_ONE:
- requireNetworkTopologyStrategy(table);
- break;
- }
+ if(this == EACH_QUORUM)
+ requireNetworkTopologyStrategy(table);
}
public void validateCounterForWrite(CFMetaData metadata) throws InvalidRequestException
[2/3] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Posted by ja...@apache.org.
Merge branch 'cassandra-1.2' into cassandra-2.0
Conflicts:
src/java/org/apache/cassandra/db/ConsistencyLevel.java
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0e9906e6
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0e9906e6
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0e9906e6
Branch: refs/heads/trunk
Commit: 0e9906e6d068f6236996093220563dc8cee54ed6
Parents: b402097 e5715f4
Author: Jason Brown <ja...@gmail.com>
Authored: Wed Nov 6 22:08:12 2013 -0800
Committer: Jason Brown <ja...@gmail.com>
Committed: Wed Nov 6 22:08:12 2013 -0800
----------------------------------------------------------------------
CHANGES.txt | 1 +
src/java/org/apache/cassandra/db/ConsistencyLevel.java | 6 ------
2 files changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/0e9906e6/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 4a1fd05,d27c495..77749d6
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -30,42 -12,10 +30,43 @@@ Merged from 1.2
* make calculatePendingRanges asynchronous (CASSANDRA-6244)
* Remove blocking flushes in gossip thread (CASSANDRA-6297)
* Fix potential socket leak in connectionpool creation (CASSANDRA-6308)
+ * Allow LOCAL_ONE/LOCAL_QUORUM to work with SimpleSrrategy (CASSANDRA-6238)
-1.2.11
+2.0.2
+ * Update FailureDetector to use nanontime (CASSANDRA-4925)
+ * Fix FileCacheService regressions (CASSANDRA-6149)
+ * Never return WriteTimeout for CL.ANY (CASSANDRA-6032)
+ * Fix race conditions in bulk loader (CASSANDRA-6129)
+ * Add configurable metrics reporting (CASSANDRA-4430)
+ * drop queries exceeding a configurable number of tombstones (CASSANDRA-6117)
+ * Track and persist sstable read activity (CASSANDRA-5515)
+ * Fixes for speculative retry (CASSANDRA-5932, CASSANDRA-6194)
+ * Improve memory usage of metadata min/max column names (CASSANDRA-6077)
+ * Fix thrift validation refusing row markers on CQL3 tables (CASSANDRA-6081)
+ * Fix insertion of collections with CAS (CASSANDRA-6069)
+ * Correctly send metadata on SELECT COUNT (CASSANDRA-6080)
+ * Track clients' remote addresses in ClientState (CASSANDRA-6070)
+ * Create snapshot dir if it does not exist when migrating
+ leveled manifest (CASSANDRA-6093)
+ * make sequential nodetool repair the default (CASSANDRA-5950)
+ * Add more hooks for compaction strategy implementations (CASSANDRA-6111)
+ * Fix potential NPE on composite 2ndary indexes (CASSANDRA-6098)
+ * Delete can potentially be skipped in batch (CASSANDRA-6115)
+ * Allow alter keyspace on system_traces (CASSANDRA-6016)
+ * Disallow empty column names in cql (CASSANDRA-6136)
+ * Use Java7 file-handling APIs and fix file moving on Windows (CASSANDRA-5383)
+ * Save compaction history to system keyspace (CASSANDRA-5078)
+ * Fix NPE if StorageService.getOperationMode() is executed before full startup (CASSANDRA-6166)
+ * CQL3: support pre-epoch longs for TimestampType (CASSANDRA-6212)
+ * Add reloadtriggers command to nodetool (CASSANDRA-4949)
+ * cqlsh: ignore empty 'value alias' in DESCRIBE (CASSANDRA-6139)
+ * Fix sstable loader (CASSANDRA-6205)
+ * Reject bootstrapping if the node already exists in gossip (CASSANDRA-5571)
+ * Fix NPE while loading paxos state (CASSANDRA-6211)
+ * cqlsh: add SHOW SESSION <tracing-session> command (CASSANDRA-6228)
+Merged from 1.2:
+ * (Hadoop) Require CFRR batchSize to be at least 2 (CASSANDRA-6114)
* Add a warning for small LCS sstable size (CASSANDRA-6191)
* Add ability to list specific KS/CF combinations in nodetool cfstats (CASSANDRA-4191)
* Mark CF clean if a mutation raced the drop and got it marked dirty (CASSANDRA-5946)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/0e9906e6/src/java/org/apache/cassandra/db/ConsistencyLevel.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/ConsistencyLevel.java
index 5f17907,25fb25b..4fffc8a
--- a/src/java/org/apache/cassandra/db/ConsistencyLevel.java
+++ b/src/java/org/apache/cassandra/db/ConsistencyLevel.java
@@@ -286,46 -280,10 +282,44 @@@ public enum ConsistencyLeve
}
}
- public void validateForWrite(String table) throws InvalidRequestException
+ public void validateForWrite(String keyspaceName) throws InvalidRequestException
{
- if(this == EACH_QUORUM)
- requireNetworkTopologyStrategy(table);
+ switch (this)
+ {
+ case LOCAL_QUORUM:
+ case EACH_QUORUM:
+ case LOCAL_ONE:
+ requireNetworkTopologyStrategy(keyspaceName);
+ break;
+ case SERIAL:
+ case LOCAL_SERIAL:
+ throw new InvalidRequestException("You must use conditional updates for serializable writes");
+ }
+ }
+
+ // This is the same than validateForWrite really, but we include a slightly different error message for SERIAL/LOCAL_SERIAL
+ public void validateForCasCommit(String keyspaceName) throws InvalidRequestException
+ {
+ switch (this)
+ {
- case LOCAL_QUORUM:
+ case EACH_QUORUM:
- case LOCAL_ONE:
+ requireNetworkTopologyStrategy(keyspaceName);
+ break;
+ case SERIAL:
+ case LOCAL_SERIAL:
+ throw new InvalidRequestException(this + " is not supported as conditional update commit consistency. Use ANY if you mean \"make sure it is accepted but I don't care how many replicas commit it for non-SERIAL reads\"");
+ }
+ }
+
+ public void validateForCas() throws InvalidRequestException
+ {
+ if (!isSerialConsistency())
+ throw new InvalidRequestException("Invalid consistency for conditional update. Must be one of SERIAL or LOCAL_SERIAL");
+ }
+
+ public boolean isSerialConsistency()
+ {
+ return this == SERIAL || this == LOCAL_SERIAL;
}
public void validateCounterForWrite(CFMetaData metadata) throws InvalidRequestException
[3/3] git commit: Merge branch 'cassandra-2.0' into trunk
Posted by ja...@apache.org.
Merge branch 'cassandra-2.0' into trunk
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c2bd0d8d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c2bd0d8d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c2bd0d8d
Branch: refs/heads/trunk
Commit: c2bd0d8d171d52dbc8f5520e9c5a2e6a24fbd1de
Parents: c65c15c 0e9906e
Author: Jason Brown <ja...@gmail.com>
Authored: Wed Nov 6 22:09:24 2013 -0800
Committer: Jason Brown <ja...@gmail.com>
Committed: Wed Nov 6 22:09:24 2013 -0800
----------------------------------------------------------------------
CHANGES.txt | 1 +
src/java/org/apache/cassandra/db/ConsistencyLevel.java | 6 ------
2 files changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c2bd0d8d/CHANGES.txt
----------------------------------------------------------------------