You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2010/07/16 21:30:15 UTC

svn commit: r964915 - /cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java

Author: jbellis
Date: Fri Jul 16 19:30:15 2010
New Revision: 964915

URL: http://svn.apache.org/viewvc?rev=964915&view=rev
Log:
improve comments on removeDeleted.  patch by jbellis

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=964915&r1=964914&r2=964915&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java Fri Jul 16 19:30:15 2010
@@ -528,7 +528,10 @@ public class ColumnFamilyStore implement
         for (byte[] cname : cf.getColumnNames())
         {
             IColumn c = cf.getColumnsMap().get(cname);
-            // we split the test to avoid comparing if not necessary
+            // remove columns if
+            // (a) the column itself is tombstoned or
+            // (b) the CF is tombstoned and the column is not newer than it
+            // (we split the test to avoid computing ClockRelationship if not necessary)
             if ((c.isMarkedForDelete() && c.getLocalDeletionTime() <= gcBefore))
             {
                 cf.remove(cname);
@@ -556,7 +559,10 @@ public class ColumnFamilyStore implement
             IClock minClock = c.getMarkedForDeleteAt().getSuperset(clocks);
             for (IColumn subColumn : c.getSubColumns())
             {
-                // we split the test to avoid comparing if not necessary
+                // remove subcolumns if
+                // (a) the subcolumn itself is tombstoned or
+                // (b) the supercolumn is tombstoned and the subcolumn is not newer than it
+                // (we split the test to avoid computing ClockRelationship if not necessary)
                 if (subColumn.isMarkedForDelete() && subColumn.getLocalDeletionTime() <= gcBefore)
                 {
                     ((SuperColumn)c).remove(subColumn.name());