Merge pull request #11850 from rmuir/enable_j9
allow IBM J9 2.8+ in version check
This commit is contained in:
commit
b00be9fe4a
|
@ -122,13 +122,24 @@ final class JVMCheck {
|
|||
}
|
||||
}
|
||||
} else if ("IBM Corporation".equals(Constants.JVM_VENDOR)) {
|
||||
// currently any JVM from IBM will easily result in index corruption.
|
||||
// currently some old JVM versions from IBM will easily result in index corruption.
|
||||
// 2.8+ seems ok for ES from testing.
|
||||
float version = Float.POSITIVE_INFINITY;
|
||||
try {
|
||||
version = Float.parseFloat(Constants.JVM_VERSION);
|
||||
} catch (NumberFormatException ignored) {
|
||||
// this is just a simple best-effort to detect old runtimes,
|
||||
// if we cannot parse it, we don't fail.
|
||||
}
|
||||
if (version < 2.8f) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("IBM runtimes suffer from several bugs which can cause data corruption.");
|
||||
sb.append("IBM J9 runtimes < 2.8 suffer from several bugs which can cause data corruption.");
|
||||
sb.append(System.lineSeparator());
|
||||
sb.append("Please upgrade the JVM, see ").append(JVM_RECOMMENDATIONS);
|
||||
sb.append(" for current recommendations.");
|
||||
sb.append("Your version: " + Constants.JVM_VERSION);
|
||||
sb.append(System.lineSeparator());
|
||||
sb.append("Please upgrade the JVM to a recent IBM JDK");
|
||||
throw new RuntimeException(sb.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue