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 2012/01/05 21:00:30 UTC
[44/50] [abbrv] git commit: Shutdown CL after having flushed
non-durable CF patch by slebresne; reviewed by jbellis for CASSANDRA-3520
Shutdown CL after having flushed non-durable CF
patch by slebresne; reviewed by jbellis for CASSANDRA-3520
git-svn-id: https://svn.apache.org/repos/asf/cassandra/branches/cassandra-0.8@1207262 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c1a6e5da
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c1a6e5da
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c1a6e5da
Branch: refs/heads/cassandra-1.0
Commit: c1a6e5da9e630b8d5377dc02ff75e32098d13c62
Parents: 9afaebb
Author: Sylvain Lebresne <sl...@apache.org>
Authored: Mon Nov 28 14:58:53 2011 +0000
Committer: Sylvain Lebresne <sl...@apache.org>
Committed: Mon Nov 28 14:58:53 2011 +0000
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../apache/cassandra/service/StorageService.java | 13 +++++++------
2 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c1a6e5da/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 0abbbad..feb6b5d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -42,6 +42,7 @@
* Fix bug preventing the use of efficient cross-DC writes (CASSANDRA-3472)
* (Hadoop) skip empty rows when entire row is requested, redux (CASSANDRA-2855)
* fix concurrence issue in the FailureDetector (CASSANDRA-3519)
+ * shutdown CL after having flushed non-durable CF (CASSANDRA-3520)
0.8.7
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c1a6e5da/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java
index 4e6e8d9..a51629f 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -404,12 +404,11 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe
public void runMayThrow() throws ExecutionException, InterruptedException, IOException
{
ThreadPoolExecutor mutationStage = StageManager.getStage(Stage.MUTATION);
- if (!mutationStage.isShutdown())
- {
- mutationStage.shutdown();
- mutationStage.awaitTermination(1, TimeUnit.SECONDS);
- CommitLog.instance.shutdownBlocking();
- }
+ if (mutationStage.isShutdown())
+ return; // drained already
+
+ mutationStage.shutdown();
+ mutationStage.awaitTermination(1, TimeUnit.SECONDS);
List<Future<?>> flushes = new ArrayList<Future<?>>();
for (Table table : Table.all())
@@ -426,6 +425,8 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe
}
}
FBUtilities.waitOnFutures(flushes);
+
+ CommitLog.instance.shutdownBlocking();
}
});
Runtime.getRuntime().addShutdownHook(drainOnShutdown);