Merge pull request #16305 from s1monw/issues/16301
Add a hard check to ensure we are running with the expected lucene version
This commit is contained in:
commit
74a1959c3b
|
@ -288,6 +288,9 @@ final class Bootstrap {
|
||||||
// fail if using broken version
|
// fail if using broken version
|
||||||
JVMCheck.check();
|
JVMCheck.check();
|
||||||
|
|
||||||
|
// fail if somebody replaced the lucene jars
|
||||||
|
checkLucene();
|
||||||
|
|
||||||
INSTANCE.setup(true, settings, environment);
|
INSTANCE.setup(true, settings, environment);
|
||||||
|
|
||||||
INSTANCE.start();
|
INSTANCE.start();
|
||||||
|
@ -364,4 +367,11 @@ final class Bootstrap {
|
||||||
private static void exit(int status) {
|
private static void exit(int status) {
|
||||||
System.exit(status);
|
System.exit(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void checkLucene() {
|
||||||
|
if (Version.CURRENT.luceneVersion.equals(org.apache.lucene.util.Version.LATEST) == false) {
|
||||||
|
throw new AssertionError("Lucene version mismatch this version of Elasticsearch requires lucene version ["
|
||||||
|
+ Version.CURRENT.luceneVersion + "] but the current lucene version is [" + org.apache.lucene.util.Version.LATEST + "]");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue