cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [5/6] git commit: merge from 1.2
Date Tue, 15 Oct 2013 22:43:34 GMT
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 <jbellis@apache.org>
Authored: Tue Oct 15 23:43:18 2013 +0100
Committer: Jonathan Ellis <jbellis@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);
+                 }
              }
          }
      }


Mime
View raw message