cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject svn commit: r1137982 - in /cassandra/branches/cassandra-0.8: CHANGES.txt src/java/org/apache/cassandra/db/compaction/CompactionController.java
Date Tue, 21 Jun 2011 12:48:28 GMT
Author: slebresne
Date: Tue Jun 21 12:48:28 2011
New Revision: 1137982

URL: http://svn.apache.org/viewvc?rev=1137982&view=rev
Log:
Purge tombstones even if the row is in only one sstable
patch by slebresne; reviewed by jbellis for CASSANDRA-2801

Modified:
    cassandra/branches/cassandra-0.8/CHANGES.txt
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/compaction/CompactionController.java

Modified: cassandra/branches/cassandra-0.8/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1137982&r1=1137981&r2=1137982&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.8/CHANGES.txt Tue Jun 21 12:48:28 2011
@@ -68,6 +68,7 @@
  * Add startup flag to renew counter node id (CASSANDRA-2788)
  * add jamm agent to cassandra.bat (CASSANDRA-2787)
  * fix repair hanging if a neighbor has nothing to send (CASSANDRA-2797)
+ * purge tombstone even if row is in only one sstable (CASSANDRA-2801)
 
 
 0.8.0-final

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/compaction/CompactionController.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/compaction/CompactionController.java?rev=1137982&r1=1137981&r2=1137982&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/compaction/CompactionController.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/compaction/CompactionController.java
Tue Jun 21 12:48:28 2011
@@ -106,14 +106,13 @@ public class CompactionController
     /**
      * @return an AbstractCompactedRow implementation to write the merged rows in question.
      *
-     * If there is a single source row, the data is from a current-version sstable,
-     * and we aren't forcing deserialization for scrub,
-     * write it unchanged.  Otherwise, we deserialize, purge tombstones, and
-     * reserialize in the latest version.
+     * If there is a single source row, the data is from a current-version sstable, we don't
+     * need to purge and we aren't forcing deserialization for scrub, write it unchanged.
+     * Otherwise, we deserialize, purge tombstones, and reserialize in the latest version.
      */
     public AbstractCompactedRow getCompactedRow(List<SSTableIdentityIterator> rows)
     {
-        if (rows.size() == 1 && !needDeserialize())
+        if (rows.size() == 1 && !needDeserialize() && !shouldPurge(rows.get(0).getKey()))
             return new EchoedRow(rows.get(0));
 
         long rowSize = 0;



Mime
View raw message