@@ -489,7 +489,7 @@ public synchronized void renewPeerRecoveryRetentionLeases() {
489489 * create peer recovery retention leases for every shard copy. TODO create leases lazily in that situation.
490490 */
491491 assert checkpoints .get (shardRouting .allocationId ().getId ()).tracked == false
492- || indexSettings .getIndexVersionCreated ().before (Version .V_8_0_0 );
492+ || indexSettings .getIndexVersionCreated ().before (Version .V_7_4_0 );
493493 return false ;
494494 }
495495 return retentionLease .timestamp () <= renewalTimeMillis
@@ -742,7 +742,7 @@ private boolean invariant() {
742742 if (primaryMode
743743 && indexSettings .isSoftDeleteEnabled ()
744744 && indexSettings .getIndexMetaData ().getState () == IndexMetaData .State .OPEN
745- && indexSettings .getIndexVersionCreated ().onOrAfter (Version .V_8_0_0 )) {
745+ && indexSettings .getIndexVersionCreated ().onOrAfter (Version .V_7_4_0 )) {
746746 // all tracked shard copies have a corresponding peer-recovery retention lease
747747 for (final ShardRouting shardRouting : routingTable .assignedShards ()) {
748748 if (checkpoints .get (shardRouting .allocationId ().getId ()).tracked ) {
@@ -910,7 +910,7 @@ public synchronized void activatePrimaryMode(final long localCheckpoint) {
910910 * We might have got here here via a rolling upgrade from an older version that doesn't create peer recovery retention
911911 * leases for every shard copy, but in this case we do not expect any leases to exist.
912912 */
913- if (indexSettings .getIndexVersionCreated ().onOrAfter (Version .V_8_0_0 )) {
913+ if (indexSettings .getIndexVersionCreated ().onOrAfter (Version .V_7_4_0 )) {
914914 // We are starting up the whole replication group from scratch: if we were not (i.e. this is a replica promotion) then
915915 // this copy must already be in-sync and active and therefore holds a retention lease for itself.
916916 assert routingTable .activeShards ().equals (Collections .singletonList (primaryShard )) : routingTable .activeShards ();
0 commit comments