Skip to content

Commit edc0bd9

Browse files
committed
Remove assertion when safe commit not found
If the previous peer recovery failed after copying segment files, then the safe commit invariant won't hold in the next recovery. Relates #57187
1 parent ff9be2b commit edc0bd9

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

server/src/main/java/org/elasticsearch/index/shard/IndexShard.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,8 +1418,6 @@ public long recoverLocallyUpToGlobalCheckpoint() {
14181418
maybeCheckIndex(); // check index here and won't do it again if ops-based recovery occurs
14191419
recoveryState.setStage(RecoveryState.Stage.TRANSLOG);
14201420
if (safeCommit.isPresent() == false) {
1421-
assert globalCheckpoint == UNASSIGNED_SEQ_NO || indexSettings.getIndexVersionCreated().before(Version.V_6_2_0) :
1422-
"global checkpoint [" + globalCheckpoint + "] [ created version [" + indexSettings.getIndexVersionCreated() + "]";
14231421
logger.trace("skip local recovery as no safe commit found");
14241422
return UNASSIGNED_SEQ_NO;
14251423
}

0 commit comments

Comments
 (0)