From f38506ebc5233e8727135abb4e138a19d99906ed Mon Sep 17 00:00:00 2001 From: kkewwei Date: Sat, 18 Jan 2025 16:50:38 +0800 Subject: [PATCH] test --- .../java/org/opensearch/index/engine/InternalEngine.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/org/opensearch/index/engine/InternalEngine.java b/server/src/main/java/org/opensearch/index/engine/InternalEngine.java index 4acab6fe582e8..ff4d79f9b57d8 100644 --- a/server/src/main/java/org/opensearch/index/engine/InternalEngine.java +++ b/server/src/main/java/org/opensearch/index/engine/InternalEngine.java @@ -924,7 +924,9 @@ public IndexResult index(Index index) throws IOException { if (plan.indexIntoLucene || plan.addStaleOpToLucene) { indexResult = indexIntoLucene(index, plan); } else { - if () + if (plan.versionForIndexing != index.indexingStrategy().versionForIndexing || plan.currentNotFoundOrDeleted != index.indexingStrategy().currentNotFoundOrDeleted) { + throw new RuntimeException("plan.versionForIndexing != index.indexingStrategy().versionForIndexing || plan.currentNotFoundOrDeleted != index.indexingStrategy().currentNotFoundOrDeleted"); + } indexResult = new IndexResult( plan.versionForIndexing, index.primaryTerm(), @@ -1155,7 +1157,6 @@ private IndexResult indexIntoLucene(Index index, IndexingStrategy plan) throws I } if (plan.versionForIndexing != indexingStrategy.versionForIndexing || plan.currentNotFoundOrDeleted != indexingStrategy.currentNotFoundOrDeleted) { throw new RuntimeException("plan.versionForIndexing != indexingStrategy.versionForIndexing || plan.currentNotFoundOrDeleted != indexingStrategy.currentNotFoundOrDeleted"); - } return new IndexResult(plan.versionForIndexing, index.primaryTerm(), index.seqNo(), plan.currentNotFoundOrDeleted); } catch (Exception ex) {