cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1187050 - in /cassandra/branches/cassandra-1.0: CHANGES.txt src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
Date Thu, 20 Oct 2011 21:03:49 GMT
Author: jbellis
Date: Thu Oct 20 21:03:49 2011
New Revision: 1187050

URL: http://svn.apache.org/viewvc?rev=1187050&view=rev
Log:
tolerate index being dropped mid-mutation
patch by jbellis; reviewed by slebresne for CASSANDRA-3334

Modified:
    cassandra/branches/cassandra-1.0/CHANGES.txt
    cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java

Modified: cassandra/branches/cassandra-1.0/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/CHANGES.txt?rev=1187050&r1=1187049&r2=1187050&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/CHANGES.txt (original)
+++ cassandra/branches/cassandra-1.0/CHANGES.txt Thu Oct 20 21:03:49 2011
@@ -45,6 +45,8 @@
  * avoid locking on update when no indexes are involved (CASSANDRA-3386)
  * optimize UUIDGen to avoid lock contention on InetAddress.getLocalHost 
    (CASSANDRA-3387)
+ * tolerate index being dropped mid-mutation (CASSANDRA-3334)
+
 
 1.0.0-final
  * close scrubbed sstable fd before deleting it (CASSANDRA-3318)

Modified: cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java?rev=1187050&r1=1187049&r2=1187050&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
(original)
+++ cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
Thu Oct 20 21:03:49 2011
@@ -367,8 +367,12 @@ public class SecondaryIndexManager
                     continue;              
                 
                 SecondaryIndex index = getIndexForColumn(columnName);
-                assert index != null;               
-
+                if (index == null)
+                {
+                    logger.debug("Looks like index got dropped mid-update.  Skipping");
+                    continue;
+                }
+                
                 // Update entire row if we encounter a row level index
                 if (index instanceof PerRowSecondaryIndex)
                 {



Mime
View raw message