Skip to content

Commit

Permalink
Update BWC version for PRRLs (#43959)
Browse files Browse the repository at this point in the history
This commit updates the version in which PRRLs are expected to exist to 7.4.0.
  • Loading branch information
DaveCTurner committed Jul 4, 2019
1 parent be80b60 commit 570b4b9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ public synchronized void renewPeerRecoveryRetentionLeases() {
* create peer recovery retention leases for every shard copy. TODO create leases lazily in that situation.
*/
assert checkpoints.get(shardRouting.allocationId().getId()).tracked == false
|| indexSettings.getIndexVersionCreated().before(Version.V_7_3_0);
|| indexSettings.getIndexVersionCreated().before(Version.V_7_4_0);
return false;
}
return retentionLease.timestamp() <= renewalTimeMillis
Expand Down Expand Up @@ -740,7 +740,7 @@ private boolean invariant() {
if (primaryMode
&& indexSettings.isSoftDeleteEnabled()
&& indexSettings.getIndexMetaData().getState() == IndexMetaData.State.OPEN
&& indexSettings.getIndexVersionCreated().onOrAfter(Version.V_7_3_0)) {
&& indexSettings.getIndexVersionCreated().onOrAfter(Version.V_7_4_0)) {
// all tracked shard copies have a corresponding peer-recovery retention lease
for (final ShardRouting shardRouting : routingTable.assignedShards()) {
if (checkpoints.get(shardRouting.allocationId().getId()).tracked) {
Expand Down Expand Up @@ -908,7 +908,7 @@ public synchronized void activatePrimaryMode(final long localCheckpoint) {
* We might have got here here via a rolling upgrade from an older version that doesn't create peer recovery retention
* leases for every shard copy, but in this case we do not expect any leases to exist.
*/
if (indexSettings.getIndexVersionCreated().onOrAfter(Version.V_7_3_0)) {
if (indexSettings.getIndexVersionCreated().onOrAfter(Version.V_7_4_0)) {
// We are starting up the whole replication group from scratch: if we were not (i.e. this is a replica promotion) then
// this copy must already be in-sync and active and therefore holds a retention lease for itself.
assert routingTable.activeShards().equals(Collections.singletonList(primaryShard)) : routingTable.activeShards();
Expand Down

0 comments on commit 570b4b9

Please sign in to comment.