You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2013/09/30 01:29:32 UTC

[1/3] git commit: Fix memtable flushing for indexed tables

Updated Branches:
  refs/heads/trunk 1d31d358d -> 70bfc8eb9


Fix memtable flushing for indexed tables

patch by Aleksey Yeschenko; reviewed by Jonathan Ellis for
CASSANDRA-6112

Conflicts:
	CHANGES.txt
	src/java/org/apache/cassandra/db/compaction/CompactionManager.java


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

Branch: refs/heads/trunk
Commit: 898ce5f046fe2405a521f3128252d28ae9748f58
Parents: 8d3d67e
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Mon Sep 30 02:17:51 2013 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Mon Sep 30 02:27:26 2013 +0300

----------------------------------------------------------------------
 CHANGES.txt                                                  | 1 +
 src/java/org/apache/cassandra/db/Memtable.java               | 6 +++++-
 .../apache/cassandra/db/compaction/CompactionManager.java    | 2 +-
 .../org/apache/cassandra/db/index/SecondaryIndexManager.java | 8 ++++++++
 4 files changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/898ce5f0/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 27ebc9b..ca559b1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -8,6 +8,7 @@
  * Move batchlog replay to its own executor (CASSANDRA-6079)
  * Add tombstone debug threshold and histogram (CASSANDRA-6042, 6057)
  * Fix fat client schema pull NPE (CASSANDRA-6089)
+ * Fix memtable flushing for indexed tables (CASSANDRA-6112)
 
 
 1.2.10

http://git-wip-us.apache.org/repos/asf/cassandra/blob/898ce5f0/src/java/org/apache/cassandra/db/Memtable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/Memtable.java b/src/java/org/apache/cassandra/db/Memtable.java
index e39ccfe..1364030 100644
--- a/src/java/org/apache/cassandra/db/Memtable.java
+++ b/src/java/org/apache/cassandra/db/Memtable.java
@@ -423,7 +423,11 @@ public class Memtable
                         // But it can result in unexpected behaviour where deletes never make it to disk,
                         // as they are lost and so cannot override existing column values. So we only remove deleted columns if there
                         // is a CF level tombstone to ensure the delete makes it into an SSTable.
-                        ColumnFamilyStore.removeDeletedColumnsOnly(cf, Integer.MIN_VALUE);
+                        // We also shouldn't be dropping any columns obsoleted by partition and/or range tombstones in case
+                        // the table has secondary indexes, or else the stale entries wouldn't be cleaned up during compaction,
+                        // and will only be dropped during 2i query read-repair, if at all.
+                        if (!cfs.indexManager.hasIndexes())
+                            ColumnFamilyStore.removeDeletedColumnsOnly(cf, Integer.MIN_VALUE);
                     }
                     writer.append((DecoratedKey)entry.getKey(), cf);
                 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/898ce5f0/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 5c17b0a..b34856e 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -558,7 +558,7 @@ public class CompactionManager implements CompactionManagerMBean
         }
 
         boolean isCommutative = cfs.metadata.getDefaultValidator().isCommutative();
-        boolean hasIndexes = !cfs.indexManager.getIndexes().isEmpty();
+        boolean hasIndexes = cfs.indexManager.hasIndexes();
 
         for (SSTableReader sstable : sstables)
         {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/898ce5f0/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
index 52d2152..9cbbe8f 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@ -401,6 +401,14 @@ public class SecondaryIndexManager
     }
 
     /**
+     * @return if there are ANY indexes for this table..
+     */
+    public boolean hasIndexes()
+    {
+        return !indexesByColumn.isEmpty();
+    }
+
+    /**
      * @return total current ram size of all indexes
      */
     public long getTotalLiveSize()


[2/3] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0

Posted by al...@apache.org.
Merge branch 'cassandra-1.2' into cassandra-2.0

Conflicts:
	src/java/org/apache/cassandra/db/compaction/CompactionManager.java


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

Branch: refs/heads/trunk
Commit: b774eb14dd914521c91ea6e5a8b2121f528c45cb
Parents: dc7e2fd 898ce5f
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Mon Sep 30 02:28:49 2013 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Mon Sep 30 02:28:49 2013 +0300

----------------------------------------------------------------------
 CHANGES.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b774eb14/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index dcdb01b,ca559b1..33268dd
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,17 -1,4 +1,16 @@@
 -1.2.11
 +2.0.2
 + * Track and persist sstable read activity (CASSANDRA-5515)
 + * Fixes for speculative retry (CASSANDRA-5932)
 + * Improve memory usage of metadata min/max column names (CASSANDRA-6077)
 + * Fix thrift validation refusing row markers on CQL3 tables (CASSANDRA-6081)
 + * Fix insertion of collections with CAS (CASSANDRA-6069)
 + * Correctly send metadata on SELECT COUNT (CASSANDRA-6080)
 + * Track clients' remote addresses in ClientState (CASSANDRA-6070)
 + * Create snapshot dir if it does not exist when migrating
 +   leveled manifest (CASSANDRA-6093)
 + * make sequential nodetool repair the default (CASSANDRA-5950)
 + * Add more hooks for compaction strategy implementations (CASSANDRA-6111)
-  * Fix memtable flushing for indexed tables (CASSANDRA-6112)
 +Merged from 1.2:
   * Allow estimated memtable size to exceed slab allocator size (CASSANDRA-6078)
   * Start MeteredFlusher earlier to prevent OOM during CL replay (CASSANDRA-6087)
   * Avoid sending Truncate command to fat clients (CASSANDRA-6088)
@@@ -20,45 -7,11 +19,46 @@@
   * Do not open non-ssl storage port if encryption option is all (CASSANDRA-3916)
   * Move batchlog replay to its own executor (CASSANDRA-6079)
   * Add tombstone debug threshold and histogram (CASSANDRA-6042, 6057)
 + * Enable tcp keepalive on incoming connections (CASSANDRA-4053)
   * Fix fat client schema pull NPE (CASSANDRA-6089)
+  * Fix memtable flushing for indexed tables (CASSANDRA-6112)
  
  
 -1.2.10
 +2.0.1
 + * Fix bug that could allow reading deleted data temporarily (CASSANDRA-6025)
 + * Improve memory use defaults (CASSANDRA-5069)
 + * Make ThriftServer more easlly extensible (CASSANDRA-6058)
 + * Remove Hadoop dependency from ITransportFactory (CASSANDRA-6062)
 + * add file_cache_size_in_mb setting (CASSANDRA-5661)
 + * Improve error message when yaml contains invalid properties (CASSANDRA-5958)
 + * Improve leveled compaction's ability to find non-overlapping L0 compactions
 +   to work on concurrently (CASSANDRA-5921)
 + * Notify indexer of columns shadowed by range tombstones (CASSANDRA-5614)
 + * Log Merkle tree stats (CASSANDRA-2698)
 + * Switch from crc32 to adler32 for compressed sstable checksums (CASSANDRA-5862)
 + * Improve offheap memcpy performance (CASSANDRA-5884)
 + * Use a range aware scanner for cleanup (CASSANDRA-2524)
 + * Cleanup doesn't need to inspect sstables that contain only local data
 +   (CASSANDRA-5722)
 + * Add ability for CQL3 to list partition keys (CASSANDRA-4536)
 + * Improve native protocol serialization (CASSANDRA-5664)
 + * Upgrade Thrift to 0.9.1 (CASSANDRA-5923)
 + * Require superuser status for adding triggers (CASSANDRA-5963)
 + * Make standalone scrubber handle old and new style leveled manifest
 +   (CASSANDRA-6005)
 + * Fix paxos bugs (CASSANDRA-6012, 6013, 6023)
 + * Fix paged ranges with multiple replicas (CASSANDRA-6004)
 + * Fix potential AssertionError during tracing (CASSANDRA-6041)
 + * Fix NPE in sstablesplit (CASSANDRA-6027)
 + * Migrate pre-2.0 key/value/column aliases to system.schema_columns
 +   (CASSANDRA-6009)
 + * Paging filter empty rows too agressively (CASSANDRA-6040)
 + * Support variadic parameters for IN clauses (CASSANDRA-4210)
 + * cqlsh: return the result of CAS writes (CASSANDRA-5796)
 + * Fix validation of IN clauses with 2ndary indexes (CASSANDRA-6050)
 + * Support named bind variables in CQL (CASSANDRA-6033)
 +Merged from 1.2:
 + * Allow cache-keys-to-save to be set at runtime (CASSANDRA-5980)
   * Avoid second-guessing out-of-space state (CASSANDRA-5605)
   * Tuning knobs for dealing with large blobs and many CFs (CASSANDRA-5982)
   * (Hadoop) Fix CQLRW for thrift tables (CASSANDRA-6002)


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

Posted by al...@apache.org.
Merge branch 'cassandra-2.0' into trunk


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

Branch: refs/heads/trunk
Commit: 70bfc8eb91c09e895b712ad55153d6154adcfa36
Parents: 1d31d35 b774eb1
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Mon Sep 30 02:29:19 2013 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Mon Sep 30 02:29:19 2013 +0300

----------------------------------------------------------------------
 CHANGES.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/70bfc8eb/CHANGES.txt
----------------------------------------------------------------------