Skip to content

Commit e122adb

Browse files
committed
remove unnecessary legacy version check
Signed-off-by: Nicholas Walter Knize <[email protected]>
1 parent 05a6b15 commit e122adb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

server/src/main/java/org/opensearch/indices/recovery/RecoverySourceHandler.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
import org.apache.lucene.store.RateLimiter;
4141
import org.apache.lucene.util.ArrayUtil;
4242
import org.apache.lucene.util.SetOnce;
43-
import org.opensearch.LegacyESVersion;
4443
import org.opensearch.action.ActionListener;
4544
import org.opensearch.action.ActionRunnable;
4645
import org.opensearch.action.StepListener;
@@ -720,8 +719,7 @@ void createRetentionLease(final long startingSeqNo, ActionListener<RetentionLeas
720719
// it's possible that the primary has no retention lease yet if we are doing a rolling upgrade from a version before
721720
// 7.4, and in that case we just create a lease using the local checkpoint of the safe commit which we're using for
722721
// recovery as a conservative estimate for the global checkpoint.
723-
assert shard.indexSettings().getIndexVersionCreated().before(LegacyESVersion.fromId(7040099))
724-
|| shard.indexSettings().isSoftDeleteEnabled() == false;
722+
assert shard.indexSettings().isSoftDeleteEnabled() == false;
725723
final StepListener<ReplicationResponse> addRetentionLeaseStep = new StepListener<>();
726724
final long estimatedGlobalCheckpoint = startingSeqNo - 1;
727725
final RetentionLease newLease = shard.addPeerRecoveryRetentionLease(

0 commit comments

Comments
 (0)