Skip to content

Commit ac2da33

Browse files
authored
Update BWC version for PRRLs (#43958)
This commit updates the version in which PRRLs are expected to exist to 7.4.0.
1 parent 389c625 commit ac2da33

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.ci/java-versions.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
ES_BUILD_JAVA=openjdk12
88
ES_RUNTIME_JAVA=java11
99
GRADLE_TASK=build
10+
GRADLE_EXTRA_ARGS=-Dtests.bwc.refspec.7.x=peer-recovery-retention-leases-7.x
1011

1112

server/src/main/java/org/elasticsearch/index/seqno/ReplicationTracker.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)