cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [2/3] git commit: avoid starting exitThread multiple times patch by jbellis for CASSANDRA-5716
Date Mon, 01 Jul 2013 16:12:45 GMT
avoid starting exitThread multiple times
patch by jbellis for CASSANDRA-5716


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

Branch: refs/heads/trunk
Commit: 40f0bdce069db14e912f28d7351c4b602389c6a5
Parents: 1a8f723
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Mon Jul 1 09:10:06 2013 -0700
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Mon Jul 1 09:12:12 2013 -0700

----------------------------------------------------------------------
 src/java/org/apache/cassandra/service/CassandraDaemon.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/40f0bdce/src/java/org/apache/cassandra/service/CassandraDaemon.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/CassandraDaemon.java b/src/java/org/apache/cassandra/service/CassandraDaemon.java
index 53c653f..af21f07 100644
--- a/src/java/org/apache/cassandra/service/CassandraDaemon.java
+++ b/src/java/org/apache/cassandra/service/CassandraDaemon.java
@@ -195,7 +195,13 @@ public class CassandraDaemon
                 {
                     // some code, like FileChannel.map, will wrap an OutOfMemoryError in
another exception
                     if (e2 instanceof OutOfMemoryError)
-                        exitThread.start();
+                    {
+                        synchronized (exitThread)
+                        {
+                            if (!exitThread.isAlive())
+                                exitThread.start();
+                        }
+                    }
 
                     if (e2 instanceof FSError)
                     {


Mime
View raw message