Skip to content

Commit

Permalink
Adjust bwc version for StoreFilesMetaData
Browse files Browse the repository at this point in the history
Relates #46959
  • Loading branch information
dnhatn committed Oct 14, 2019
1 parent 2a1be7c commit 7f83d06
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public StoreFilesMetaData(ShardId shardId, Store.MetadataSnapshot metadataSnapsh
public StoreFilesMetaData(StreamInput in) throws IOException {
this.shardId = new ShardId(in);
this.metadataSnapshot = new Store.MetadataSnapshot(in);
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.getVersion().onOrAfter(Version.V_7_5_0)) {
this.peerRecoveryRetentionLeases = in.readList(RetentionLease::new);
} else {
this.peerRecoveryRetentionLeases = Collections.emptyList();
Expand All @@ -200,7 +200,7 @@ public StoreFilesMetaData(StreamInput in) throws IOException {
public void writeTo(StreamOutput out) throws IOException {
shardId.writeTo(out);
metadataSnapshot.writeTo(out);
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_5_0)) {
out.writeList(peerRecoveryRetentionLeases);
}
}
Expand Down

0 comments on commit 7f83d06

Please sign in to comment.