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
This commit is contained in:
David Capwell 2020-07-30 17:02:05 -07:00 committed by David Capwell
parent e5c3d08a14
commit 624d01660b
2 changed files with 2 additions and 3 deletions

View File

@ -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;
}

View File

@ -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.