cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/3] git commit: Avoid logging CompactionInterrupted at ERROR patch by marcuse; reviewed by jbellis for CASSANDRA-7694
Date Thu, 07 Aug 2014 14:25:37 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 f3f69cb47 -> 6e6a6c397
  refs/heads/cassandra-2.1.0 eea547c62 -> 33de6dc11


Avoid logging CompactionInterrupted at ERROR
patch by marcuse; reviewed by jbellis for CASSANDRA-7694


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

Branch: refs/heads/cassandra-2.0
Commit: 6e6a6c39794a06dfdaf7c5499e58b532188e7896
Parents: f3f69cb
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Thu Aug 7 09:21:30 2014 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Thu Aug 7 09:21:30 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                                  | 1 +
 .../cassandra/concurrent/DebuggableThreadPoolExecutor.java   | 8 ++++++--
 .../apache/cassandra/db/compaction/CompactionManager.java    | 4 ++--
 3 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e6a6c39/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 4392159..915aeea 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.10
+ * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694)
  * Minor leak in sstable2jon (CASSANDRA-7709)
  * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)
  * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e6a6c39/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java b/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
index 665f0b0..8e4dc7a 100644
--- a/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
+++ b/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
@@ -172,6 +172,12 @@ public class DebuggableThreadPoolExecutor extends ThreadPoolExecutor
implements
     {
         super.afterExecute(r, t);
 
+        maybeResetTraceSessionWrapper(r);
+        logExceptionsAfterExecute(r, t);
+    }
+
+    protected static void maybeResetTraceSessionWrapper(Runnable r)
+    {
         if (r instanceof TraceSessionWrapper)
         {
             TraceSessionWrapper tsw = (TraceSessionWrapper) r;
@@ -179,8 +185,6 @@ public class DebuggableThreadPoolExecutor extends ThreadPoolExecutor implements
             // and if left this thread might start tracing unrelated tasks
             tsw.reset();
         }
-        
-        logExceptionsAfterExecute(r, t);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e6a6c39/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 2708e4c..e804f1d 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -956,8 +956,8 @@ public class CompactionManager implements CompactionManagerMBean
         @Override
         public void afterExecute(Runnable r, Throwable t)
         {
-            super.afterExecute(r, t);
-
+            DebuggableThreadPoolExecutor.maybeResetTraceSessionWrapper(r);
+    
             if (t == null)
                 t = DebuggableThreadPoolExecutor.extractThrowable(r);
 


Mime
View raw message