You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2013/10/16 00:43:30 UTC

[1/6] git commit: Mark CF clean if a mutation raced the drop and got it marked dirty patch by jbellis; reviewed by Tyler Hobbs for CASSANDRA-5946

Updated Branches:
  refs/heads/cassandra-1.2 8dcdce4e9 -> b33b53e8f
  refs/heads/cassandra-2.0 bd45c4c59 -> a1e594bfb
  refs/heads/trunk 0c34fa8e9 -> 3f1465779


Mark CF clean if a mutation raced the drop and got it marked dirty
patch by jbellis; reviewed by Tyler Hobbs for CASSANDRA-5946


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

Branch: refs/heads/cassandra-1.2
Commit: b33b53e8f91011fe07ed39df75d6b5728c6f8cf1
Parents: 8dcdce4
Author: Jonathan Ellis <jb...@apache.org>
Authored: Tue Oct 15 23:41:01 2013 +0100
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Tue Oct 15 23:41:37 2013 +0100

----------------------------------------------------------------------
 CHANGES.txt                                     |  2 ++
 .../db/commitlog/CommitLogAllocator.java        | 34 +++++++++++++-------
 2 files changed, 25 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b33b53e8/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2dbadc4..d6ecac1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,7 @@
 1.2.12
  * Add ability to list specific KS/CF combinations in nodetool cfstats (CASSANDRA-4191)
+ * Mark CF clean if a mutation raced the drop and got it marked dirty 
+
 
 1.2.11
  * Limit CQL prepared statement cache by size instead of count (CASSANDRA-6107)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b33b53e8/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java b/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
index 2855979..d62d7ca 100644
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
@@ -39,6 +39,7 @@ import org.apache.cassandra.db.Table;
 import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.net.MessagingService;
 import org.apache.cassandra.service.StorageService;
+import org.apache.cassandra.utils.Pair;
 import org.apache.cassandra.utils.WrappedRunnable;
 
 /**
@@ -296,19 +297,30 @@ public class CommitLogAllocator
         {
             for (UUID dirtyCFId : oldestSegment.getDirtyCFIDs())
             {
-                String keypace = Schema.instance.getCF(dirtyCFId).left;
-                final ColumnFamilyStore cfs = Table.open(keypace).getColumnFamilyStore(dirtyCFId);
-                // flush shouldn't run on the commitlog executor, since it acquires Table.switchLock,
-                // which may already be held by a thread waiting for the CL executor (via getContext),
-                // causing deadlock
-                Runnable runnable = new Runnable()
+                Pair<String,String> pair = Schema.instance.getCF(dirtyCFId);
+                if (pair == null)
                 {
-                    public void run()
+                    // even though we remove the schema entry before a final flush when dropping a CF,
+                    // it's still possible for a writer to race and finish his append after the flush.
+                    logger.debug("Marking clean CF {} that doesn't exist anymore", dirtyCFId);
+                    oldestSegment.markClean(dirtyCFId, oldestSegment.getContext());
+                }
+                else
+                {
+                    String keypace = pair.left;
+                    final ColumnFamilyStore cfs = Table.open(keypace).getColumnFamilyStore(dirtyCFId);
+                    // flush shouldn't run on the commitlog executor, since it acquires Table.switchLock,
+                    // which may already be held by a thread waiting for the CL executor (via getContext),
+                    // causing deadlock
+                    Runnable runnable = new Runnable()
                     {
-                        cfs.forceFlush();
-                    }
-                };
-                StorageService.optionalTasks.execute(runnable);
+                        public void run()
+                        {
+                            cfs.forceFlush();
+                        }
+                    };
+                    StorageService.optionalTasks.execute(runnable);
+                }
             }
         }
     }


[5/6] git commit: merge from 1.2

Posted by jb...@apache.org.
merge from 1.2


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

Branch: refs/heads/cassandra-2.0
Commit: a1e594bfb8833e2d73401c456fa5cb31b7ecdea5
Parents: bd45c4c b33b53e
Author: Jonathan Ellis <jb...@apache.org>
Authored: Tue Oct 15 23:43:18 2013 +0100
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Tue Oct 15 23:43:18 2013 +0100

----------------------------------------------------------------------
 CHANGES.txt                                     |  2 ++
 .../db/commitlog/CommitLogAllocator.java        | 34 +++++++++++++-------
 2 files changed, 25 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a1e594bf/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 6fab83b,d6ecac1..aa7ad66
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,29 -1,7 +1,31 @@@
 -1.2.12
 +2.0.2
 + * Fix FileCacheService regressions (CASSANDRA-6149)
 + * Never return WriteTimeout for CL.ANY (CASSANDRA-6032)
 + * Fix race conditions in bulk loader (CASSANDRA-6129)
 + * Add configurable metrics reporting (CASSANDRA-4430)
 + * drop queries exceeding a configurable number of tombstones (CASSANDRA-6117)
 + * 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 potential NPE on composite 2ndary indexes (CASSANDRA-6098)
 + * Delete can potentially be skipped in batch (CASSANDRA-6115)
 + * Allow alter keyspace on system_traces (CASSANDRA-6016)
 + * Disallow empty column names in cql (CASSANDRA-6136)
 + * Use Java7 file-handling APIs and fix file moving on Windows (CASSANDRA-5383)
 + * Save compaction history to system keyspace (CASSANDRA-5078)
 + * Fix NPE if StorageService.getOperationMode() is executed before full startup (CASSANDRA-6166)
 +Merged from 1.2:
   * Add ability to list specific KS/CF combinations in nodetool cfstats (CASSANDRA-4191)
+  * Mark CF clean if a mutation raced the drop and got it marked dirty 
+ 
  
  1.2.11
   * Limit CQL prepared statement cache by size instead of count (CASSANDRA-6107)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a1e594bf/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
index d56bf7a,d62d7ca..706cf9e
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
@@@ -296,19 -297,30 +297,30 @@@ public class CommitLogAllocato
          {
              for (UUID dirtyCFId : oldestSegment.getDirtyCFIDs())
              {
-                 String keypace = Schema.instance.getCF(dirtyCFId).left;
-                 final ColumnFamilyStore cfs = Keyspace.open(keypace).getColumnFamilyStore(dirtyCFId);
-                 // flush shouldn't run on the commitlog executor, since it acquires Keyspace.switchLock,
-                 // which may already be held by a thread waiting for the CL executor (via getContext),
-                 // causing deadlock
-                 Runnable runnable = new Runnable()
+                 Pair<String,String> pair = Schema.instance.getCF(dirtyCFId);
+                 if (pair == null)
                  {
-                     public void run()
+                     // even though we remove the schema entry before a final flush when dropping a CF,
+                     // it's still possible for a writer to race and finish his append after the flush.
+                     logger.debug("Marking clean CF {} that doesn't exist anymore", dirtyCFId);
+                     oldestSegment.markClean(dirtyCFId, oldestSegment.getContext());
+                 }
+                 else
+                 {
+                     String keypace = pair.left;
 -                    final ColumnFamilyStore cfs = Table.open(keypace).getColumnFamilyStore(dirtyCFId);
++                    final ColumnFamilyStore cfs = Keyspace.open(keypace).getColumnFamilyStore(dirtyCFId);
+                     // flush shouldn't run on the commitlog executor, since it acquires Table.switchLock,
+                     // which may already be held by a thread waiting for the CL executor (via getContext),
+                     // causing deadlock
+                     Runnable runnable = new Runnable()
                      {
-                         cfs.forceFlush();
-                     }
-                 };
-                 StorageService.optionalTasks.execute(runnable);
+                         public void run()
+                         {
+                             cfs.forceFlush();
+                         }
+                     };
+                     StorageService.optionalTasks.execute(runnable);
+                 }
              }
          }
      }


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

Posted by jb...@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/3f146577
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3f146577
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3f146577

Branch: refs/heads/trunk
Commit: 3f1465779de511ba2351bdf514e5dbab34e16e1b
Parents: 0c34fa8 a1e594b
Author: Jonathan Ellis <jb...@apache.org>
Authored: Tue Oct 15 23:43:25 2013 +0100
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Tue Oct 15 23:43:25 2013 +0100

----------------------------------------------------------------------
 CHANGES.txt                                     |  2 ++
 .../db/commitlog/CommitLogAllocator.java        | 34 +++++++++++++-------
 2 files changed, 25 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


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


[3/6] git commit: Mark CF clean if a mutation raced the drop and got it marked dirty patch by jbellis; reviewed by Tyler Hobbs for CASSANDRA-5946

Posted by jb...@apache.org.
Mark CF clean if a mutation raced the drop and got it marked dirty
patch by jbellis; reviewed by Tyler Hobbs for CASSANDRA-5946


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

Branch: refs/heads/trunk
Commit: b33b53e8f91011fe07ed39df75d6b5728c6f8cf1
Parents: 8dcdce4
Author: Jonathan Ellis <jb...@apache.org>
Authored: Tue Oct 15 23:41:01 2013 +0100
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Tue Oct 15 23:41:37 2013 +0100

----------------------------------------------------------------------
 CHANGES.txt                                     |  2 ++
 .../db/commitlog/CommitLogAllocator.java        | 34 +++++++++++++-------
 2 files changed, 25 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b33b53e8/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2dbadc4..d6ecac1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,7 @@
 1.2.12
  * Add ability to list specific KS/CF combinations in nodetool cfstats (CASSANDRA-4191)
+ * Mark CF clean if a mutation raced the drop and got it marked dirty 
+
 
 1.2.11
  * Limit CQL prepared statement cache by size instead of count (CASSANDRA-6107)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b33b53e8/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java b/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
index 2855979..d62d7ca 100644
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
@@ -39,6 +39,7 @@ import org.apache.cassandra.db.Table;
 import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.net.MessagingService;
 import org.apache.cassandra.service.StorageService;
+import org.apache.cassandra.utils.Pair;
 import org.apache.cassandra.utils.WrappedRunnable;
 
 /**
@@ -296,19 +297,30 @@ public class CommitLogAllocator
         {
             for (UUID dirtyCFId : oldestSegment.getDirtyCFIDs())
             {
-                String keypace = Schema.instance.getCF(dirtyCFId).left;
-                final ColumnFamilyStore cfs = Table.open(keypace).getColumnFamilyStore(dirtyCFId);
-                // flush shouldn't run on the commitlog executor, since it acquires Table.switchLock,
-                // which may already be held by a thread waiting for the CL executor (via getContext),
-                // causing deadlock
-                Runnable runnable = new Runnable()
+                Pair<String,String> pair = Schema.instance.getCF(dirtyCFId);
+                if (pair == null)
                 {
-                    public void run()
+                    // even though we remove the schema entry before a final flush when dropping a CF,
+                    // it's still possible for a writer to race and finish his append after the flush.
+                    logger.debug("Marking clean CF {} that doesn't exist anymore", dirtyCFId);
+                    oldestSegment.markClean(dirtyCFId, oldestSegment.getContext());
+                }
+                else
+                {
+                    String keypace = pair.left;
+                    final ColumnFamilyStore cfs = Table.open(keypace).getColumnFamilyStore(dirtyCFId);
+                    // flush shouldn't run on the commitlog executor, since it acquires Table.switchLock,
+                    // which may already be held by a thread waiting for the CL executor (via getContext),
+                    // causing deadlock
+                    Runnable runnable = new Runnable()
                     {
-                        cfs.forceFlush();
-                    }
-                };
-                StorageService.optionalTasks.execute(runnable);
+                        public void run()
+                        {
+                            cfs.forceFlush();
+                        }
+                    };
+                    StorageService.optionalTasks.execute(runnable);
+                }
             }
         }
     }


[2/6] git commit: Mark CF clean if a mutation raced the drop and got it marked dirty patch by jbellis; reviewed by Tyler Hobbs for CASSANDRA-5946

Posted by jb...@apache.org.
Mark CF clean if a mutation raced the drop and got it marked dirty
patch by jbellis; reviewed by Tyler Hobbs for CASSANDRA-5946


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

Branch: refs/heads/cassandra-2.0
Commit: b33b53e8f91011fe07ed39df75d6b5728c6f8cf1
Parents: 8dcdce4
Author: Jonathan Ellis <jb...@apache.org>
Authored: Tue Oct 15 23:41:01 2013 +0100
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Tue Oct 15 23:41:37 2013 +0100

----------------------------------------------------------------------
 CHANGES.txt                                     |  2 ++
 .../db/commitlog/CommitLogAllocator.java        | 34 +++++++++++++-------
 2 files changed, 25 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b33b53e8/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2dbadc4..d6ecac1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,7 @@
 1.2.12
  * Add ability to list specific KS/CF combinations in nodetool cfstats (CASSANDRA-4191)
+ * Mark CF clean if a mutation raced the drop and got it marked dirty 
+
 
 1.2.11
  * Limit CQL prepared statement cache by size instead of count (CASSANDRA-6107)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b33b53e8/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java b/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
index 2855979..d62d7ca 100644
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
@@ -39,6 +39,7 @@ import org.apache.cassandra.db.Table;
 import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.net.MessagingService;
 import org.apache.cassandra.service.StorageService;
+import org.apache.cassandra.utils.Pair;
 import org.apache.cassandra.utils.WrappedRunnable;
 
 /**
@@ -296,19 +297,30 @@ public class CommitLogAllocator
         {
             for (UUID dirtyCFId : oldestSegment.getDirtyCFIDs())
             {
-                String keypace = Schema.instance.getCF(dirtyCFId).left;
-                final ColumnFamilyStore cfs = Table.open(keypace).getColumnFamilyStore(dirtyCFId);
-                // flush shouldn't run on the commitlog executor, since it acquires Table.switchLock,
-                // which may already be held by a thread waiting for the CL executor (via getContext),
-                // causing deadlock
-                Runnable runnable = new Runnable()
+                Pair<String,String> pair = Schema.instance.getCF(dirtyCFId);
+                if (pair == null)
                 {
-                    public void run()
+                    // even though we remove the schema entry before a final flush when dropping a CF,
+                    // it's still possible for a writer to race and finish his append after the flush.
+                    logger.debug("Marking clean CF {} that doesn't exist anymore", dirtyCFId);
+                    oldestSegment.markClean(dirtyCFId, oldestSegment.getContext());
+                }
+                else
+                {
+                    String keypace = pair.left;
+                    final ColumnFamilyStore cfs = Table.open(keypace).getColumnFamilyStore(dirtyCFId);
+                    // flush shouldn't run on the commitlog executor, since it acquires Table.switchLock,
+                    // which may already be held by a thread waiting for the CL executor (via getContext),
+                    // causing deadlock
+                    Runnable runnable = new Runnable()
                     {
-                        cfs.forceFlush();
-                    }
-                };
-                StorageService.optionalTasks.execute(runnable);
+                        public void run()
+                        {
+                            cfs.forceFlush();
+                        }
+                    };
+                    StorageService.optionalTasks.execute(runnable);
+                }
             }
         }
     }


[4/6] git commit: merge from 1.2

Posted by jb...@apache.org.
merge from 1.2


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

Branch: refs/heads/trunk
Commit: a1e594bfb8833e2d73401c456fa5cb31b7ecdea5
Parents: bd45c4c b33b53e
Author: Jonathan Ellis <jb...@apache.org>
Authored: Tue Oct 15 23:43:18 2013 +0100
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Tue Oct 15 23:43:18 2013 +0100

----------------------------------------------------------------------
 CHANGES.txt                                     |  2 ++
 .../db/commitlog/CommitLogAllocator.java        | 34 +++++++++++++-------
 2 files changed, 25 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a1e594bf/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 6fab83b,d6ecac1..aa7ad66
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,29 -1,7 +1,31 @@@
 -1.2.12
 +2.0.2
 + * Fix FileCacheService regressions (CASSANDRA-6149)
 + * Never return WriteTimeout for CL.ANY (CASSANDRA-6032)
 + * Fix race conditions in bulk loader (CASSANDRA-6129)
 + * Add configurable metrics reporting (CASSANDRA-4430)
 + * drop queries exceeding a configurable number of tombstones (CASSANDRA-6117)
 + * 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 potential NPE on composite 2ndary indexes (CASSANDRA-6098)
 + * Delete can potentially be skipped in batch (CASSANDRA-6115)
 + * Allow alter keyspace on system_traces (CASSANDRA-6016)
 + * Disallow empty column names in cql (CASSANDRA-6136)
 + * Use Java7 file-handling APIs and fix file moving on Windows (CASSANDRA-5383)
 + * Save compaction history to system keyspace (CASSANDRA-5078)
 + * Fix NPE if StorageService.getOperationMode() is executed before full startup (CASSANDRA-6166)
 +Merged from 1.2:
   * Add ability to list specific KS/CF combinations in nodetool cfstats (CASSANDRA-4191)
+  * Mark CF clean if a mutation raced the drop and got it marked dirty 
+ 
  
  1.2.11
   * Limit CQL prepared statement cache by size instead of count (CASSANDRA-6107)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a1e594bf/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
index d56bf7a,d62d7ca..706cf9e
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
@@@ -296,19 -297,30 +297,30 @@@ public class CommitLogAllocato
          {
              for (UUID dirtyCFId : oldestSegment.getDirtyCFIDs())
              {
-                 String keypace = Schema.instance.getCF(dirtyCFId).left;
-                 final ColumnFamilyStore cfs = Keyspace.open(keypace).getColumnFamilyStore(dirtyCFId);
-                 // flush shouldn't run on the commitlog executor, since it acquires Keyspace.switchLock,
-                 // which may already be held by a thread waiting for the CL executor (via getContext),
-                 // causing deadlock
-                 Runnable runnable = new Runnable()
+                 Pair<String,String> pair = Schema.instance.getCF(dirtyCFId);
+                 if (pair == null)
                  {
-                     public void run()
+                     // even though we remove the schema entry before a final flush when dropping a CF,
+                     // it's still possible for a writer to race and finish his append after the flush.
+                     logger.debug("Marking clean CF {} that doesn't exist anymore", dirtyCFId);
+                     oldestSegment.markClean(dirtyCFId, oldestSegment.getContext());
+                 }
+                 else
+                 {
+                     String keypace = pair.left;
 -                    final ColumnFamilyStore cfs = Table.open(keypace).getColumnFamilyStore(dirtyCFId);
++                    final ColumnFamilyStore cfs = Keyspace.open(keypace).getColumnFamilyStore(dirtyCFId);
+                     // flush shouldn't run on the commitlog executor, since it acquires Table.switchLock,
+                     // which may already be held by a thread waiting for the CL executor (via getContext),
+                     // causing deadlock
+                     Runnable runnable = new Runnable()
                      {
-                         cfs.forceFlush();
-                     }
-                 };
-                 StorageService.optionalTasks.execute(runnable);
+                         public void run()
+                         {
+                             cfs.forceFlush();
+                         }
+                     };
+                     StorageService.optionalTasks.execute(runnable);
+                 }
              }
          }
      }