This is an automated email from the ASF dual-hosted git repository.

dcapwell pushed a commit to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-3.0 by this push:
     new 624d016  jvm upgrade dtests fail on java 11 caused by bad 
initialization order of DatabaseDescriptor and FileUtils
624d016 is described below

commit 624d01660bdad4dc924717f4c602ce6241c0c825
Author: David Capwell <dcapw...@apache.org>
AuthorDate: Thu Jul 30 17:02:05 2020 -0700

    jvm upgrade dtests fail on java 11 caused by bad initialization order of 
DatabaseDescriptor and FileUtils
    
    patch by David Capwell; reviewed by Jon Meredith, Jordan West for 
CASSANDRA-16002
---
 src/java/org/apache/cassandra/io/util/FileUtils.java                 | 2 +-
 test/distributed/org/apache/cassandra/distributed/impl/Instance.java | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/java/org/apache/cassandra/io/util/FileUtils.java 
b/src/java/org/apache/cassandra/io/util/FileUtils.java
index 191e965..5a21729 100644
--- a/src/java/org/apache/cassandra/io/util/FileUtils.java
+++ b/src/java/org/apache/cassandra/io/util/FileUtils.java
@@ -75,8 +75,8 @@ public final class FileUtils
         }
         catch (Throwable t)
         {
+            logger.error("Cannot initialize un-mmaper.  (Are you using a 
non-Oracle JVM?)  Compacted data files will not be removed promptly.  Consider 
using an Oracle JVM or using standard disk access mode", t);
             JVMStabilityInspector.inspectThrowable(t);
-            logger.info("Cannot initialize un-mmaper.  (Are you using a 
non-Oracle JVM?)  Compacted data files will not be removed promptly.  Consider 
using an Oracle JVM or using standard disk access mode");
         }
         canCleanDirectBuffers = canClean;
     }
diff --git 
a/test/distributed/org/apache/cassandra/distributed/impl/Instance.java 
b/test/distributed/org/apache/cassandra/distributed/impl/Instance.java
index 8fa5966..95fefd2 100644
--- a/test/distributed/org/apache/cassandra/distributed/impl/Instance.java
+++ b/test/distributed/org/apache/cassandra/distributed/impl/Instance.java
@@ -506,14 +506,13 @@ public class Instance extends IsolatedExecutor implements 
IInvokableInstance
         sync(() -> {
             try
             {
-                FileUtils.setFSErrorHandler(new DefaultFSErrorHandler());
-
                 mkdirs();
 
                 assert 
config.networkTopology().contains(config.broadcastAddress());
                 DistributedTestSnitch.assign(config.networkTopology());
 
                 DatabaseDescriptor.setDaemonInitialized();
+                FileUtils.setFSErrorHandler(new DefaultFSErrorHandler());
                 DatabaseDescriptor.createAllDirectories();
 
                 // We need to  persist this as soon as possible after startup 
checks.


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

Reply via email to