jacek-lewandowski commented on code in PR #2553:
URL: https://github.com/apache/cassandra/pull/2553#discussion_r1292073148


##########
test/distributed/org/apache/cassandra/distributed/test/TestBaseImpl.java:
##########
@@ -61,6 +62,7 @@ public void afterEach() {
     public static void beforeClass() throws Throwable
     {
         ICluster.setup();
+        
CassandraRelevantProperties.IO_NETTY_TRANSPORT_NO_NATIVE.setBoolean(false);

Review Comment:
   So, alternatively you may set:
   ```
   CassandraRelevantProperties.NATIVE_EPOLL_ENABLED.setBoolean(false);
   ```
   which will be consistent with that settings in `ICluster`. Also, perhaps a 
better place to set this or that option is initialization block in 
`AbstractCluster`:
   
   ```
           {
               // Indicate that we are running in the in-jvm dtest environment
               
CassandraRelevantProperties.DTEST_IS_IN_JVM_DTEST.setBoolean(true);
               // those properties may be set for unit-test optimizations; 
those should not be used when running dtests
               
CassandraRelevantProperties.TEST_FLUSH_LOCAL_SCHEMA_CHANGES.reset();
               CassandraRelevantProperties.NON_GRACEFUL_SHUTDOWN.reset();
   ...
   ```
   
   However, there also another problem reported when running those tests:
   
   ```
   org.hyperic.sigar.SigarException: Native Library 
/home/jlewandowski/dev/cassandra/trunk/lib/sigar-bin/libsigar-amd64-linux.so 
already loaded in another classloader
        at org.hyperic.sigar.Sigar.loadLibrary(Sigar.java:172)
        at org.hyperic.sigar.Sigar.<clinit>(Sigar.java:100)
        at org.apache.cassandra.utils.SigarLibrary.<init>(SigarLibrary.java:49)
        at 
org.apache.cassandra.utils.SigarLibrary.<clinit>(SigarLibrary.java:30)
        at 
org.apache.cassandra.service.StartupChecks$8.execute(StartupChecks.java:367)
        at 
org.apache.cassandra.service.StartupChecks.verify(StartupChecks.java:175)
        at 
org.apache.cassandra.service.CassandraDaemon.runStartupChecks(CassandraDaemon.java:495)
        at 
org.apache.cassandra.distributed.impl.Instance.lambda$startup$12(Instance.java:620)
        at org.apache.cassandra.concurrent.FutureTask$1.call(FutureTask.java:96)
        at org.apache.cassandra.concurrent.FutureTask.call(FutureTask.java:61)
        at org.apache.cassandra.concurrent.FutureTask.run(FutureTask.java:71)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:829)
   ```
   
   which makes all Sigar based stuff unused in some instances. I think we 
should mark `SigarLibrary` class with `Shared` annotation to fix that.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to