cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [2/5] git commit: Don't scrub 2i CF if index type is CUSTOM
Date Wed, 15 Jan 2014 03:13:23 GMT
Don't scrub 2i CF if index type is CUSTOM


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

Branch: refs/heads/trunk
Commit: 0bfe9efd859eccd6bb6c6a253ad3912650831ec0
Parents: 3e31143
Author: Yuki Morishita <yukim@apache.org>
Authored: Thu Jan 9 12:51:04 2014 -0600
Committer: Yuki Morishita <yukim@apache.org>
Committed: Tue Jan 14 20:23:00 2014 -0600

----------------------------------------------------------------------
 .../org/apache/cassandra/db/ColumnFamilyStore.java     | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0bfe9efd/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 6d3e21a..892e881 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -40,11 +40,8 @@ import org.apache.cassandra.cache.IRowCacheEntry;
 import org.apache.cassandra.cache.RowCacheKey;
 import org.apache.cassandra.cache.RowCacheSentinel;
 import org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor;
-import org.apache.cassandra.config.CFMetaData;
+import org.apache.cassandra.config.*;
 import org.apache.cassandra.config.CFMetaData.SpeculativeRetry;
-import org.apache.cassandra.config.ColumnDefinition;
-import org.apache.cassandra.config.DatabaseDescriptor;
-import org.apache.cassandra.config.Schema;
 import org.apache.cassandra.db.columniterator.OnDiskAtomIterator;
 import org.apache.cassandra.db.commitlog.CommitLog;
 import org.apache.cassandra.db.commitlog.ReplayPosition;
@@ -464,8 +461,12 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
         {
             if (def.isIndexed())
             {
-                CFMetaData indexMetadata = CFMetaData.newIndexMetadata(metadata, def, SecondaryIndex.getIndexComparator(metadata,
def));
-                scrubDataDirectories(indexMetadata);
+                CellNameType indexComparator = SecondaryIndex.getIndexComparator(metadata,
def);
+                if (indexComparator != null)
+                {
+                    CFMetaData indexMetadata = CFMetaData.newIndexMetadata(metadata, def,
indexComparator);
+                    scrubDataDirectories(indexMetadata);
+                }
             }
         }
     }


Mime
View raw message