From cfc3b2d34473312dd89c339920d88d143e8fb8c9 Mon Sep 17 00:00:00 2001 From: Boaz Leskes Date: Tue, 12 Dec 2017 09:38:54 +0100 Subject: [PATCH] remove InternalEngine.compareOpToLuceneDocBasedOnVersions as it is unused relates #27720 --- .../elasticsearch/index/engine/InternalEngine.java | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/index/engine/InternalEngine.java b/core/src/main/java/org/elasticsearch/index/engine/InternalEngine.java index ecf589cbaf9..47056c3b010 100644 --- a/core/src/main/java/org/elasticsearch/index/engine/InternalEngine.java +++ b/core/src/main/java/org/elasticsearch/index/engine/InternalEngine.java @@ -648,19 +648,6 @@ public class InternalEngine extends Engine { return versionValue; } - private OpVsLuceneDocStatus compareOpToLuceneDocBasedOnVersions(final Operation op) - throws IOException { - assert op.seqNo() == SequenceNumbers.UNASSIGNED_SEQ_NO : "op is resolved based on versions but have a seq#"; - assert op.version() >= 0 : "versions should be non-negative. got " + op.version(); - final VersionValue versionValue = resolveDocVersion(op); - if (versionValue == null) { - return OpVsLuceneDocStatus.LUCENE_DOC_NOT_FOUND; - } else { - return op.versionType().isVersionConflictForWrites(versionValue.version, op.version(), versionValue.isDelete()) ? - OpVsLuceneDocStatus.OP_STALE_OR_EQUAL : OpVsLuceneDocStatus.OP_NEWER; - } - } - private boolean canOptimizeAddDocument(Index index) { if (index.getAutoGeneratedIdTimestamp() != IndexRequest.UNSET_AUTO_GENERATED_TIMESTAMP) { assert index.getAutoGeneratedIdTimestamp() >= 0 : "autoGeneratedIdTimestamp must be positive but was: "