cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [4/4] git commit: initial CAS support patch by jbellis and slebresne for CASSANDRA-5062
Date Thu, 11 Apr 2013 15:59:02 GMT
initial CAS support
patch by jbellis and slebresne for CASSANDRA-5062


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8b0e1868
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8b0e1868
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8b0e1868

Branch: refs/heads/trunk
Commit: 8b0e1868e8cf813ddfc98d11448aa2ad363eccc1
Parents: f5ec4c7
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Thu Apr 11 10:57:48 2013 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Thu Apr 11 10:57:48 2013 -0500

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 conf/cassandra.yaml                                |    3 +
 interface/cassandra.thrift                         |   11 +-
 .../org/apache/cassandra/thrift/Cassandra.java     | 6469 +++++++++------
 .../cassandra/thrift/cassandraConstants.java       |    2 +-
 .../org/apache/cassandra/config/CFMetaData.java    |   12 +-
 src/java/org/apache/cassandra/config/Config.java   |    2 +
 .../cassandra/config/DatabaseDescriptor.java       |   10 +
 .../org/apache/cassandra/config/KSMetaData.java    |    1 +
 src/java/org/apache/cassandra/config/Schema.java   |    2 +-
 .../org/apache/cassandra/cql3/QueryProcessor.java  |    2 +-
 .../cql3/statements/ModificationStatement.java     |    2 +-
 .../db/AbstractThreadUnsafeSortedColumns.java      |    5 -
 .../cassandra/db/ArrayBackedSortedColumns.java     |    2 +-
 .../apache/cassandra/db/AtomicSortedColumns.java   |    5 -
 src/java/org/apache/cassandra/db/ColumnFamily.java |   45 +-
 .../org/apache/cassandra/db/ConsistencyLevel.java  |    3 +-
 src/java/org/apache/cassandra/db/DefsTable.java    |   12 +-
 src/java/org/apache/cassandra/db/Memtable.java     |    2 +-
 src/java/org/apache/cassandra/db/Row.java          |    8 +
 src/java/org/apache/cassandra/db/RowMutation.java  |    8 +-
 src/java/org/apache/cassandra/db/SystemTable.java  |   59 +
 src/java/org/apache/cassandra/db/WriteType.java    |    3 +-
 .../db/index/composites/CompositesSearcher.java    |    2 +-
 .../org/apache/cassandra/net/IAsyncCallback.java   |   14 +
 src/java/org/apache/cassandra/net/MessageIn.java   |    5 +
 .../org/apache/cassandra/net/MessagingService.java |   31 +-
 .../service/AbstractWriteResponseHandler.java      |   10 -
 .../org/apache/cassandra/service/StorageProxy.java |  173 +-
 .../cassandra/service/StorageProxyMBean.java       |    2 +
 .../apache/cassandra/service/StorageService.java   |   21 +-
 .../service/paxos/AbstractPaxosCallback.java       |   45 +
 .../org/apache/cassandra/service/paxos/Commit.java |  130 +
 .../cassandra/service/paxos/CommitVerbHandler.java |   12 +
 .../apache/cassandra/service/paxos/PaxosState.java |  100 +
 .../cassandra/service/paxos/PrepareCallback.java   |   66 +
 .../cassandra/service/paxos/PrepareResponse.java   |   72 +
 .../service/paxos/PrepareVerbHandler.java          |   16 +
 .../cassandra/service/paxos/ProposeCallback.java   |   34 +
 .../service/paxos/ProposeVerbHandler.java          |   17 +
 .../apache/cassandra/thrift/CassandraServer.java   |   99 +-
 .../apache/cassandra/utils/BooleanSerializer.java  |   46 +
 .../org/apache/cassandra/utils/FBUtilities.java    |    1 +
 src/java/org/apache/cassandra/utils/UUIDGen.java   |   28 +-
 .../org/apache/cassandra/utils/UUIDSerializer.java |    4 -
 test/cassandra.in.sh                               |    2 +-
 test/system/__init__.py                            |    4 +-
 test/system/test_thrift_server.py                  |   12 +
 .../apache/cassandra/db/ColumnFamilyStoreTest.java |    4 +-
 .../cassandra/db/compaction/CompactionsTest.java   |    6 +-
 50 files changed, 5105 insertions(+), 2520 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8b0e1868/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 848e843..667c901 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0
+ * CAS support (CASSANDRA-5062, )
  * Leveled compaction performs size-tiered compactions in L0 (CASSANDRA-5371)
  * Add yaml network topology snitch for mixed ec2/other envs (CASSANDRA-5339)
  * Log when a node is down longer than the hint window (CASSANDRA-4554)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/8b0e1868/conf/cassandra.yaml
----------------------------------------------------------------------
diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml
index ed61a26..9c1eb11 100644
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@ -475,6 +475,9 @@ read_request_timeout_in_ms: 10000
 range_request_timeout_in_ms: 10000
 # How long the coordinator should wait for writes to complete
 write_request_timeout_in_ms: 10000
+# how long a coordinator should continue to retry a CAS operation
+# that contends with other proposals for the same row
+cas_contention_timeout_in_ms: 1000
 # How long the coordinator should wait for truncates to complete
 # (This can be much longer, because unless auto_snapshot is disabled
 # we need to flush first so we can snapshot before removing the data.)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/8b0e1868/interface/cassandra.thrift
----------------------------------------------------------------------
diff --git a/interface/cassandra.thrift b/interface/cassandra.thrift
index d26cc26..a57603c 100644
--- a/interface/cassandra.thrift
+++ b/interface/cassandra.thrift
@@ -55,7 +55,7 @@ namespace rb CassandraThrift
 # An effort should be made not to break forward-client-compatibility either
 # (e.g. one should avoid removing obsolete fields from the IDL), but no
 # guarantees in this respect are made by the Cassandra project.
-const string VERSION = "19.36.0"
+const string VERSION = "19.37.0"
 
 
 #
@@ -636,6 +636,15 @@ service Cassandra {
        throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException
te),
 
   /**
+   * Atomic compare and set
+   */
+  bool cas(1:required binary key, 
+           2:required string column_family,
+           3:list<Column> expected,
+           4:list<Column> updates)
+       throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException
te),
+
+  /**
     Remove data from the row specified by key at the granularity specified by column_path,
and the given timestamp. Note
     that all the values in column_path besides column_path.column_family are truly optional:
you can remove the entire
     row by just specifying the ColumnFamily, or you can remove a SuperColumn or a single
Column by specifying those levels too.


Mime
View raw message