From 2ee87c99d9eb2a37e601e58a7ac858744dd94a45 Mon Sep 17 00:00:00 2001 From: Nhat Nguyen Date: Wed, 17 Apr 2019 10:25:47 -0400 Subject: [PATCH] Fix bwc version of sanity check of read only engine Relates #41041 --- .../java/org/elasticsearch/index/engine/ReadOnlyEngine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/org/elasticsearch/index/engine/ReadOnlyEngine.java b/server/src/main/java/org/elasticsearch/index/engine/ReadOnlyEngine.java index b5618d5b9cb..777aff88e9d 100644 --- a/server/src/main/java/org/elasticsearch/index/engine/ReadOnlyEngine.java +++ b/server/src/main/java/org/elasticsearch/index/engine/ReadOnlyEngine.java @@ -130,7 +130,7 @@ public class ReadOnlyEngine extends Engine { // created after the refactoring of the Close Index API and its TransportVerifyShardBeforeCloseAction // that guarantee that all operations have been flushed to Lucene. final Version indexVersionCreated = engineConfig.getIndexSettings().getIndexVersionCreated(); - if (indexVersionCreated.onOrAfter(Version.V_8_0_0) || + if (indexVersionCreated.onOrAfter(Version.V_7_1_0) || (seqNoStats.getGlobalCheckpoint() != SequenceNumbers.UNASSIGNED_SEQ_NO && indexVersionCreated.onOrAfter(Version.V_6_7_0))) { if (seqNoStats.getMaxSeqNo() != seqNoStats.getGlobalCheckpoint()) { throw new IllegalStateException("Maximum sequence number [" + seqNoStats.getMaxSeqNo()