Repository: cassandra
Updated Branches:
  refs/heads/trunk c406c456c -> 6d4e056c9


Make netty EventLoopGroups daemon threads

patch by jasobrown; reviewed by Marcus Eriksson for CASSANDRA-13837


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

Branch: refs/heads/trunk
Commit: 6d4e056c923b7367fc4199ae73dedea893d8f6b8
Parents: c406c45
Author: Jason Brown <jasedbr...@gmail.com>
Authored: Tue Sep 5 06:43:12 2017 -0700
Committer: Jason Brown <jasedbr...@gmail.com>
Committed: Fri Sep 8 03:25:34 2017 -0700

----------------------------------------------------------------------
 CHANGES.txt                                             |  1 +
 .../org/apache/cassandra/net/async/NettyFactory.java    | 12 ++++++------
 src/java/org/apache/cassandra/tools/BulkLoader.java     |  1 -
 3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6d4e056c/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index da024c9..da5d153 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.0
+ * Make netty EventLoopGroups daemon threads (CASSANDRA-13837)
  * Race condition when closing stream sessions (CASSANDRA-13852)
  * NettyFactoryTest is failing in trunk on macOS (CASSANDRA-13831)
  * Allow changing log levels via nodetool for related classes (CASSANDRA-12696)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6d4e056c/src/java/org/apache/cassandra/net/async/NettyFactory.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/net/async/NettyFactory.java 
b/src/java/org/apache/cassandra/net/async/NettyFactory.java
index cb4bd22..d193e31 100644
--- a/src/java/org/apache/cassandra/net/async/NettyFactory.java
+++ b/src/java/org/apache/cassandra/net/async/NettyFactory.java
@@ -126,10 +126,10 @@ public final class NettyFactory
     {
         this.useEpoll = useEpoll;
         acceptGroup = getEventLoopGroup(useEpoll, 
determineAcceptGroupSize(DatabaseDescriptor.getServerEncryptionOptions().internode_encryption),
-                                        
"MessagingService-NettyAcceptor-Threads", false);
-        inboundGroup = getEventLoopGroup(useEpoll, 
FBUtilities.getAvailableProcessors(), "MessagingService-NettyInbound-Threads", 
false);
-        outboundGroup = getEventLoopGroup(useEpoll, 
FBUtilities.getAvailableProcessors(), "MessagingService-NettyOutbound-Threads", 
true);
-        streamingGroup = getEventLoopGroup(useEpoll, 
FBUtilities.getAvailableProcessors(), "Streaming-Netty-Threads", false);
+                                        
"MessagingService-NettyAcceptor-Thread", false);
+        inboundGroup = getEventLoopGroup(useEpoll, 
FBUtilities.getAvailableProcessors(), "MessagingService-NettyInbound-Thread", 
false);
+        outboundGroup = getEventLoopGroup(useEpoll, 
FBUtilities.getAvailableProcessors(), "MessagingService-NettyOutbound-Thread", 
true);
+        streamingGroup = getEventLoopGroup(useEpoll, 
FBUtilities.getAvailableProcessors(), "Streaming-Netty-Thread", false);
     }
 
     /**
@@ -167,14 +167,14 @@ public final class NettyFactory
         if (useEpoll)
         {
             logger.debug("using netty epoll event loop for pool prefix {}", 
threadNamePrefix);
-            EpollEventLoopGroup eventLoopGroup = new 
EpollEventLoopGroup(threadCount, new DefaultThreadFactory(threadNamePrefix));
+            EpollEventLoopGroup eventLoopGroup = new 
EpollEventLoopGroup(threadCount, new DefaultThreadFactory(threadNamePrefix, 
true));
             if (boostIoRatio)
                 eventLoopGroup.setIoRatio(100);
             return eventLoopGroup;
         }
 
         logger.debug("using netty nio event loop for pool prefix {}", 
threadNamePrefix);
-        NioEventLoopGroup eventLoopGroup = new NioEventLoopGroup(threadCount, 
new DefaultThreadFactory(threadNamePrefix));
+        NioEventLoopGroup eventLoopGroup = new NioEventLoopGroup(threadCount, 
new DefaultThreadFactory(threadNamePrefix, true));
         if (boostIoRatio)
             eventLoopGroup.setIoRatio(100);
         return eventLoopGroup;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6d4e056c/src/java/org/apache/cassandra/tools/BulkLoader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/BulkLoader.java 
b/src/java/org/apache/cassandra/tools/BulkLoader.java
index 01d8c33..e7b812f 100644
--- a/src/java/org/apache/cassandra/tools/BulkLoader.java
+++ b/src/java/org/apache/cassandra/tools/BulkLoader.java
@@ -104,7 +104,6 @@ public class BulkLoader
 
             // Give sockets time to gracefully close
             Thread.sleep(1000);
-            System.exit(0); // We need that to stop non daemonized threads
         }
         catch (Exception e)
         {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to