You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by yu...@apache.org on 2014/02/26 01:03:53 UTC

[1/3] git commit: Fix RangeTombstoneTest for CASSANDRA-6640 change

Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 7bd23316e -> d0c38591b
  refs/heads/trunk 4cd434f46 -> b1201ba4e


Fix RangeTombstoneTest for CASSANDRA-6640 change


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

Branch: refs/heads/cassandra-2.1
Commit: d0c38591bbf340ad4e998b66201b8e41a36dba8a
Parents: 7bd2331
Author: Yuki Morishita <yu...@apache.org>
Authored: Tue Feb 25 18:02:18 2014 -0600
Committer: Yuki Morishita <yu...@apache.org>
Committed: Tue Feb 25 18:02:18 2014 -0600

----------------------------------------------------------------------
 .../apache/cassandra/db/RangeTombstoneTest.java | 24 +++++++++++---------
 1 file changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d0c38591/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java b/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
index 1885716..ce6028c 100644
--- a/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
+++ b/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
@@ -341,19 +341,16 @@ public class RangeTombstoneTest extends SchemaLoader
 
         cfs.forceBlockingFlush();
 
-        // We should have 2 updates to the indexed "1" column
-        assertEquals(2, index.inserts.size());
+        // We should have 1 insert and 1 update to the indexed "1" column
+        // CASSANDRA-6640 changed index update to just update, not insert then delete
+        assertEquals(1, index.inserts.size());
+        assertEquals(1, index.updates.size());
 
         CompactionManager.instance.performMaximal(cfs);
 
-        // verify that the "1" indexed column removed from the index twice:
-        // the first time by processing the RT, the second time by the
-        // re-indexing caused by the second insertion. This second write
-        // deletes from the 2i because the original column was still in the
-        // main cf's memtable (shadowed by the RT). One thing we're checking
-        // for here is that there wasn't an additional, bogus delete issued
-        // to the 2i (CASSANDRA-6517)
-        assertEquals(2, index.deletes.size());
+        // verify that the "1" indexed column removed from the index
+        // After CASSANDRA-6640, deletion only happens once
+        assertEquals(1, index.deletes.size());
     }
 
     private void runCompactionWithRangeTombstoneAndCheckSecondaryIndex() throws Exception
@@ -435,11 +432,13 @@ public class RangeTombstoneTest extends SchemaLoader
     {
         public List<Cell> inserts = new ArrayList<>();
         public List<Cell> deletes = new ArrayList<>();
+        public List<Cell> updates = new ArrayList<>();
 
         public void resetCounts()
         {
             inserts.clear();
             deletes.clear();
+            updates.clear();
         }
 
         public void delete(ByteBuffer rowKey, Cell col, OpOrder.Group opGroup)
@@ -452,7 +451,10 @@ public class RangeTombstoneTest extends SchemaLoader
             inserts.add(col);
         }
 
-        public void update(ByteBuffer rowKey, Cell oldCol, Cell col, OpOrder.Group opGroup){}
+        public void update(ByteBuffer rowKey, Cell oldCol, Cell col, OpOrder.Group opGroup)
+        {
+            updates.add(col);
+        }
 
         public void init(){}
 


[2/3] git commit: Fix RangeTombstoneTest for CASSANDRA-6640 change

Posted by yu...@apache.org.
Fix RangeTombstoneTest for CASSANDRA-6640 change


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

Branch: refs/heads/trunk
Commit: d0c38591bbf340ad4e998b66201b8e41a36dba8a
Parents: 7bd2331
Author: Yuki Morishita <yu...@apache.org>
Authored: Tue Feb 25 18:02:18 2014 -0600
Committer: Yuki Morishita <yu...@apache.org>
Committed: Tue Feb 25 18:02:18 2014 -0600

----------------------------------------------------------------------
 .../apache/cassandra/db/RangeTombstoneTest.java | 24 +++++++++++---------
 1 file changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d0c38591/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java b/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
index 1885716..ce6028c 100644
--- a/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
+++ b/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
@@ -341,19 +341,16 @@ public class RangeTombstoneTest extends SchemaLoader
 
         cfs.forceBlockingFlush();
 
-        // We should have 2 updates to the indexed "1" column
-        assertEquals(2, index.inserts.size());
+        // We should have 1 insert and 1 update to the indexed "1" column
+        // CASSANDRA-6640 changed index update to just update, not insert then delete
+        assertEquals(1, index.inserts.size());
+        assertEquals(1, index.updates.size());
 
         CompactionManager.instance.performMaximal(cfs);
 
-        // verify that the "1" indexed column removed from the index twice:
-        // the first time by processing the RT, the second time by the
-        // re-indexing caused by the second insertion. This second write
-        // deletes from the 2i because the original column was still in the
-        // main cf's memtable (shadowed by the RT). One thing we're checking
-        // for here is that there wasn't an additional, bogus delete issued
-        // to the 2i (CASSANDRA-6517)
-        assertEquals(2, index.deletes.size());
+        // verify that the "1" indexed column removed from the index
+        // After CASSANDRA-6640, deletion only happens once
+        assertEquals(1, index.deletes.size());
     }
 
     private void runCompactionWithRangeTombstoneAndCheckSecondaryIndex() throws Exception
@@ -435,11 +432,13 @@ public class RangeTombstoneTest extends SchemaLoader
     {
         public List<Cell> inserts = new ArrayList<>();
         public List<Cell> deletes = new ArrayList<>();
+        public List<Cell> updates = new ArrayList<>();
 
         public void resetCounts()
         {
             inserts.clear();
             deletes.clear();
+            updates.clear();
         }
 
         public void delete(ByteBuffer rowKey, Cell col, OpOrder.Group opGroup)
@@ -452,7 +451,10 @@ public class RangeTombstoneTest extends SchemaLoader
             inserts.add(col);
         }
 
-        public void update(ByteBuffer rowKey, Cell oldCol, Cell col, OpOrder.Group opGroup){}
+        public void update(ByteBuffer rowKey, Cell oldCol, Cell col, OpOrder.Group opGroup)
+        {
+            updates.add(col);
+        }
 
         public void init(){}
 


[3/3] git commit: Merge branch 'cassandra-2.1' into trunk

Posted by yu...@apache.org.
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: b1201ba4ec3ba720a488da40393c350ec66d1aab
Parents: 4cd434f d0c3859
Author: Yuki Morishita <yu...@apache.org>
Authored: Tue Feb 25 18:02:47 2014 -0600
Committer: Yuki Morishita <yu...@apache.org>
Committed: Tue Feb 25 18:02:47 2014 -0600

----------------------------------------------------------------------
 .../apache/cassandra/db/RangeTombstoneTest.java | 24 +++++++++++---------
 1 file changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------