Skip to content

Commit f38506e

Browse files
committed
test
1 parent f2a5f61 commit f38506e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/src/main/java/org/opensearch/index/engine/InternalEngine.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,9 @@ public IndexResult index(Index index) throws IOException {
924924
if (plan.indexIntoLucene || plan.addStaleOpToLucene) {
925925
indexResult = indexIntoLucene(index, plan);
926926
} else {
927-
if ()
927+
if (plan.versionForIndexing != index.indexingStrategy().versionForIndexing || plan.currentNotFoundOrDeleted != index.indexingStrategy().currentNotFoundOrDeleted) {
928+
throw new RuntimeException("plan.versionForIndexing != index.indexingStrategy().versionForIndexing || plan.currentNotFoundOrDeleted != index.indexingStrategy().currentNotFoundOrDeleted");
929+
}
928930
indexResult = new IndexResult(
929931
plan.versionForIndexing,
930932
index.primaryTerm(),
@@ -1155,7 +1157,6 @@ private IndexResult indexIntoLucene(Index index, IndexingStrategy plan) throws I
11551157
}
11561158
if (plan.versionForIndexing != indexingStrategy.versionForIndexing || plan.currentNotFoundOrDeleted != indexingStrategy.currentNotFoundOrDeleted) {
11571159
throw new RuntimeException("plan.versionForIndexing != indexingStrategy.versionForIndexing || plan.currentNotFoundOrDeleted != indexingStrategy.currentNotFoundOrDeleted");
1158-
11591160
}
11601161
return new IndexResult(plan.versionForIndexing, index.primaryTerm(), index.seqNo(), plan.currentNotFoundOrDeleted);
11611162
} catch (Exception ex) {

0 commit comments

Comments
 (0)