Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0BA8A457B for ; Tue, 21 Jun 2011 12:48:50 +0000 (UTC) Received: (qmail 17037 invoked by uid 500); 21 Jun 2011 12:48:49 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 16996 invoked by uid 500); 21 Jun 2011 12:48:49 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 16988 invoked by uid 99); 21 Jun 2011 12:48:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2011 12:48:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2011 12:48:48 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9C238238890D; Tue, 21 Jun 2011 12:48:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@cassandra.apache.org From: slebresne@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110621124828.9C238238890D@eris.apache.org> 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 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;