cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jasobr...@apache.org
Subject cassandra git commit: NettyFactoryTest is failing in trunk on MacOS
Date Thu, 07 Sep 2017 18:03:42 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk e8b559ce2 -> bab76eba9


NettyFactoryTest is failing in trunk on MacOS

patch by jasobrown; reviewed by Aleksey Yeschenko for CASSANDRA-13831


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

Branch: refs/heads/trunk
Commit: bab76eba958241bbfca33e9fc6fe663ce230b034
Parents: e8b559c
Author: Jason Brown <jasobrown@apple.com>
Authored: Thu Aug 31 05:27:16 2017 -0700
Committer: Jason Brown <jasedbrown@gmail.com>
Committed: Thu Sep 7 11:02:13 2017 -0700

----------------------------------------------------------------------
 CHANGES.txt                                               |  7 ++++---
 src/java/org/apache/cassandra/net/async/NettyFactory.java |  7 +------
 .../apache/cassandra/service/NativeTransportService.java  |  5 +++++
 .../org/apache/cassandra/net/async/NettyFactoryTest.java  | 10 ++++++++++
 4 files changed, 20 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/bab76eba/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 0a38e6f..0175992 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,11 +1,12 @@
 4.0
+ * NettyFactoryTest is failing in trunk on macOS (CASSANDRA-13831)
  * Allow changing log levels via nodetool for related classes (CASSANDRA-12696)
  * Add stress profile yaml with LWT (CASSANDRA-7960)
  * Reduce memory copies and object creations when acting on ByteBufs (CASSANDRA-13789)
- * simplify mx4j configuration (Cassandra-13578)
+ * Simplify mx4j configuration (Cassandra-13578)
  * Fix trigger example on 4.0 (CASSANDRA-13796)
- * force minumum timeout value (CASSANDRA-9375)
- * use netty for streaming (CASSANDRA-12229)
+ * Force minumum timeout value (CASSANDRA-9375)
+ * Use netty for streaming (CASSANDRA-12229)
  * Use netty for internode messaging (CASSANDRA-8457)
  * Add bytes repaired/unrepaired to nodetool tablestats (CASSANDRA-13774)
  * Don't delete incremental repair sessions if they still have sstables (CASSANDRA-13758)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bab76eba/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 762c39b..cb4bd22 100644
--- a/src/java/org/apache/cassandra/net/async/NettyFactory.java
+++ b/src/java/org/apache/cassandra/net/async/NettyFactory.java
@@ -19,7 +19,6 @@ import io.netty.channel.ChannelOption;
 import io.netty.channel.ChannelPipeline;
 import io.netty.channel.EventLoopGroup;
 import io.netty.channel.ServerChannel;
-import io.netty.channel.epoll.Epoll;
 import io.netty.channel.epoll.EpollEventLoopGroup;
 import io.netty.channel.epoll.EpollServerSocketChannel;
 import io.netty.channel.epoll.EpollSocketChannel;
@@ -54,6 +53,7 @@ import org.apache.cassandra.service.NativeTransportService;
 import org.apache.cassandra.utils.ChecksumType;
 import org.apache.cassandra.utils.CoalescingStrategies;
 import org.apache.cassandra.utils.FBUtilities;
+import org.apache.cassandra.utils.NativeLibrary;
 
 /**
  * A factory for building Netty {@link Channel}s. Channels here are setup with a pipeline
to participate
@@ -92,11 +92,6 @@ public final class NettyFactory
     }
 
     private static final boolean DEFAULT_USE_EPOLL = NativeTransportService.useEpoll();
-    static
-    {
-        if (!DEFAULT_USE_EPOLL)
-            logger.warn("epoll not availble {}", Epoll.unavailabilityCause());
-    }
 
     /**
      * The size of the receive queue for the outbound channels. As outbound channels do not
receive data

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bab76eba/src/java/org/apache/cassandra/service/NativeTransportService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/NativeTransportService.java b/src/java/org/apache/cassandra/service/NativeTransportService.java
index 28e7dac..b184442 100644
--- a/src/java/org/apache/cassandra/service/NativeTransportService.java
+++ b/src/java/org/apache/cassandra/service/NativeTransportService.java
@@ -37,6 +37,7 @@ import org.apache.cassandra.metrics.AuthMetrics;
 import org.apache.cassandra.metrics.ClientMetrics;
 import org.apache.cassandra.transport.RequestThreadPoolExecutor;
 import org.apache.cassandra.transport.Server;
+import org.apache.cassandra.utils.NativeLibrary;
 
 /**
  * Handles native transport server lifecycle and associated resources. Lazily initialized.
@@ -159,6 +160,10 @@ public class NativeTransportService
     public static boolean useEpoll()
     {
         final boolean enableEpoll = Boolean.parseBoolean(System.getProperty("cassandra.native.epoll.enabled",
"true"));
+
+        if (enableEpoll && !Epoll.isAvailable() && NativeLibrary.osType ==
NativeLibrary.OSType.LINUX)
+            logger.warn("epoll not availble {}", Epoll.unavailabilityCause());
+
         return enableEpoll && Epoll.isAvailable();
     }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bab76eba/test/unit/org/apache/cassandra/net/async/NettyFactoryTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/net/async/NettyFactoryTest.java b/test/unit/org/apache/cassandra/net/async/NettyFactoryTest.java
index c4cc7e6..67b221a 100644
--- a/test/unit/org/apache/cassandra/net/async/NettyFactoryTest.java
+++ b/test/unit/org/apache/cassandra/net/async/NettyFactoryTest.java
@@ -52,6 +52,7 @@ import org.apache.cassandra.exceptions.ConfigurationException;
 import org.apache.cassandra.net.MessagingService;
 import org.apache.cassandra.net.async.NettyFactory.InboundInitializer;
 import org.apache.cassandra.net.async.NettyFactory.OutboundInitializer;
+import org.apache.cassandra.service.NativeTransportService;
 import org.apache.cassandra.utils.FBUtilities;
 import org.apache.cassandra.utils.NativeLibrary;
 
@@ -61,6 +62,7 @@ public class NettyFactoryTest
     private static final InetSocketAddress REMOTE_ADDR = new InetSocketAddress("127.0.0.2",
9876);
     private static final int receiveBufferSize = 1 << 16;
     private static final IInternodeAuthenticator AUTHENTICATOR = new AllowAllInternodeAuthenticator();
+    private static final boolean EPOLL_AVAILABLE = NativeTransportService.useEpoll();
 
     private ChannelGroup channelGroup;
     private NettyFactory factory;
@@ -87,6 +89,8 @@ public class NettyFactoryTest
     @Test
     public void createServerChannel_Epoll()
     {
+        if (!EPOLL_AVAILABLE)
+            return;
         Channel inboundChannel = createServerChannel(true);
         if (inboundChannel == null)
             return;
@@ -176,6 +180,8 @@ public class NettyFactoryTest
     @Test
     public void getEventLoopGroup_EpollWithIoRatioBoost()
     {
+        if (!EPOLL_AVAILABLE)
+            return;
         getEventLoopGroup_Epoll(true);
     }
 
@@ -202,6 +208,8 @@ public class NettyFactoryTest
     @Test
     public void getEventLoopGroup_EpollWithoutIoRatioBoost()
     {
+        if (!EPOLL_AVAILABLE)
+            return;
         getEventLoopGroup_Epoll(false);
     }
 
@@ -227,6 +235,8 @@ public class NettyFactoryTest
     @Test
     public void createOutboundBootstrap_Epoll()
     {
+        if (!EPOLL_AVAILABLE)
+            return;
         Bootstrap bootstrap = createOutboundBootstrap(true);
         Assert.assertEquals(EpollEventLoopGroup.class, bootstrap.config().group().getClass());
     }


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


Mime
View raw message