|
@@ -26,7 +26,6 @@ import org.apache.lucene.index.IndexFormatTooOldException;
|
|
|
import org.elasticsearch.Assertions;
|
|
|
import org.elasticsearch.ElasticsearchException;
|
|
|
import org.elasticsearch.ExceptionsHelper;
|
|
|
-import org.elasticsearch.Version;
|
|
|
import org.elasticsearch.action.ActionListener;
|
|
|
import org.elasticsearch.cluster.node.DiscoveryNode;
|
|
|
import org.elasticsearch.common.UUIDs;
|
|
@@ -39,7 +38,6 @@ import org.elasticsearch.index.engine.Engine;
|
|
|
import org.elasticsearch.index.mapper.MapperException;
|
|
|
import org.elasticsearch.index.seqno.ReplicationTracker;
|
|
|
import org.elasticsearch.index.seqno.RetentionLeases;
|
|
|
-import org.elasticsearch.index.seqno.SequenceNumbers;
|
|
|
import org.elasticsearch.index.shard.IndexShard;
|
|
|
import org.elasticsearch.index.shard.IndexShardNotRecoveringException;
|
|
|
import org.elasticsearch.index.shard.IndexShardState;
|
|
@@ -288,9 +286,6 @@ public class RecoveryTarget extends AbstractRefCounted implements RecoveryTarget
|
|
|
ActionListener.completeWith(listener, () -> {
|
|
|
state().getTranslog().totalOperations(totalTranslogOps);
|
|
|
indexShard().openEngineAndSkipTranslogRecovery();
|
|
|
- assert indexShard.getGlobalCheckpoint() >= indexShard.seqNoStats().getMaxSeqNo() ||
|
|
|
- indexShard.indexSettings().getIndexVersionCreated().before(Version.V_7_2_0)
|
|
|
- : "global checkpoint is not initialized [" + indexShard.seqNoStats() + "]";
|
|
|
return null;
|
|
|
});
|
|
|
}
|
|
@@ -396,9 +391,6 @@ public class RecoveryTarget extends AbstractRefCounted implements RecoveryTarget
|
|
|
store.incRef();
|
|
|
try {
|
|
|
store.cleanupAndVerify("recovery CleanFilesRequestHandler", sourceMetaData);
|
|
|
- assert globalCheckpoint >= Long.parseLong(sourceMetaData.getCommitUserData().get(SequenceNumbers.MAX_SEQ_NO))
|
|
|
- || indexShard.indexSettings().getIndexVersionCreated().before(Version.V_7_2_0) :
|
|
|
- "invalid global checkpoint[" + globalCheckpoint + "] source_meta_data [" + sourceMetaData.getCommitUserData() + "]";
|
|
|
final String translogUUID = Translog.createEmptyTranslog(
|
|
|
indexShard.shardPath().resolveTranslog(), globalCheckpoint, shardId, indexShard.getPendingPrimaryTerm());
|
|
|
store.associateIndexWithNewTranslog(translogUUID);
|