cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/2] git commit: (Thrift) fix range deletion of supercolumns
Date Mon, 11 Aug 2014 10:45:24 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1.0 228f0ade8 -> ef08f949f


(Thrift) fix range deletion of supercolumns

patch by Aleksey Yeschenko; reviewed by Sylvain Lebresne for
CASSANDRA-7733


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

Branch: refs/heads/cassandra-2.1.0
Commit: f732a8b3c5bb4af8906fb99b3a3cfc247d461200
Parents: 6976d82
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Mon Aug 11 13:39:06 2014 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Mon Aug 11 13:40:13 2014 +0300

----------------------------------------------------------------------
 CHANGES.txt                                               | 4 ++++
 src/java/org/apache/cassandra/thrift/CassandraServer.java | 2 +-
 test/system/test_thrift_server.py                         | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f732a8b3/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 9c78d07..723b978 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+2.0.11
+ * (Thrift) fix range deletion of supercolumns (CASSANDRA-7733)
+
+
 2.0.10
  * Fix potential AssertionError in RangeTombstoneList (CASSANDRA-7700)
  * Validate arguments of blobAs* functions (CASSANDRA-7707)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f732a8b3/src/java/org/apache/cassandra/thrift/CassandraServer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/CassandraServer.java b/src/java/org/apache/cassandra/thrift/CassandraServer.java
index d47d988..cfb0e80 100644
--- a/src/java/org/apache/cassandra/thrift/CassandraServer.java
+++ b/src/java/org/apache/cassandra/thrift/CassandraServer.java
@@ -911,7 +911,7 @@ public class CassandraServer implements Cassandra.Iface
             if (del.super_column == null && Schema.instance.getColumnFamilyType(rm.getKeyspaceName(),
cfName) == ColumnFamilyType.Super)
                 rm.deleteRange(cfName,
                                SuperColumns.startOf(del.predicate.getSlice_range().start),
-                               SuperColumns.startOf(del.predicate.getSlice_range().finish),
+                               SuperColumns.endOf(del.predicate.getSlice_range().finish),
                                del.timestamp);
             else if (del.super_column != null)
                 rm.deleteRange(cfName,

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f732a8b3/test/system/test_thrift_server.py
----------------------------------------------------------------------
diff --git a/test/system/test_thrift_server.py b/test/system/test_thrift_server.py
index 5f09475..1e43532 100644
--- a/test/system/test_thrift_server.py
+++ b/test/system/test_thrift_server.py
@@ -654,7 +654,7 @@ class TestMutations(ThriftTester):
             for subcolumn in column.columns:
                 client.insert('key', ColumnParent('Super1', column.name), subcolumn, ConsistencyLevel.ONE)
 
-        d = Deletion(1, predicate=SlicePredicate(slice_range=SliceRange(start='sc2', finish='sc5')))
+        d = Deletion(1, predicate=SlicePredicate(slice_range=SliceRange(start='sc2', finish='sc4')))
         client.batch_mutate({'key': {'Super1' : [Mutation(deletion=d)]}}, ConsistencyLevel.ONE)
 
         _assert_columnpath_exists('key', ColumnPath('Super1', super_column='sc1', column=_i64(1)))


Mime
View raw message