cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1205312 - in /cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db: AbstractColumnContainer.java ColumnFamilyStore.java
Date Wed, 23 Nov 2011 07:23:25 GMT
Author: jbellis
Date: Wed Nov 23 07:23:25 2011
New Revision: 1205312

URL: http://svn.apache.org/viewvc?rev=1205312&view=rev
Log:
add javadoc for maybeResetDeletionTimes

Modified:
    cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/AbstractColumnContainer.java
    cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/ColumnFamilyStore.java

Modified: cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/AbstractColumnContainer.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/AbstractColumnContainer.java?rev=1205312&r1=1205311&r2=1205312&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/AbstractColumnContainer.java
(original)
+++ cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/AbstractColumnContainer.java
Wed Nov 23 07:23:25 2011
@@ -89,6 +89,11 @@ public abstract class AbstractColumnCont
         return columns.getComparator();
     }
 
+    /**
+     * Drops expired row-level tombstones.  Normally, these are dropped once the row no longer
exists, but
+     * if new columns are inserted into the row post-deletion, they can keep the row tombstone
alive indefinitely,
+     * with non-intuitive results.  See https://issues.apache.org/jira/browse/CASSANDRA-2317
+     */
     public void maybeResetDeletionTimes(int gcBefore)
     {
         while (true)
@@ -97,9 +102,11 @@ public abstract class AbstractColumnCont
             // Stop if either we don't need to change the deletion info (it's
             // still MIN_VALUE or not expired yet) or we've succesfully changed it
             if (current.localDeletionTime == Integer.MIN_VALUE
-             || current.localDeletionTime > gcBefore
-             || deletionInfo.compareAndSet(current, new DeletionInfo()))
+                || current.localDeletionTime > gcBefore
+                || deletionInfo.compareAndSet(current, new DeletionInfo()))
+            {
                 break;
+            }
         }
     }
 

Modified: cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=1205312&r1=1205311&r2=1205312&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
(original)
+++ cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
Wed Nov 23 07:23:25 2011
@@ -804,8 +804,6 @@ public class ColumnFamilyStore implement
         if (cf.getColumnCount() == 0 && cf.getLocalDeletionTime() <= gcBefore)
             return null;
 
-        // If there is non deleted columns, we still need to reset the column family
-        // deletion times since gc_grace seconds had elapsed
         cf.maybeResetDeletionTimes(gcBefore);
         return cf;
     }
@@ -882,8 +880,6 @@ public class ColumnFamilyStore implement
             }
             else
             {
-                // If there is non deleted columns, we still need to reset the column family
-                // deletion times since gc_grace seconds had elapsed
                 c.maybeResetDeletionTimes(gcBefore);
             }
         }



Mime
View raw message