Skip to content

Commit 5094f92

Browse files
Change to correct version since this has been backported (opensearch-project#16472) (opensearch-project#16477)
(cherry picked from commit 936cdb9) Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 99a9a81 commit 5094f92

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequest.java

+4-6
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,10 @@ public RestoreSnapshotRequest(StreamInput in) throws IOException {
172172
if (in.getVersion().onOrAfter(Version.V_2_17_0)) {
173173
sourceRemoteTranslogRepository = in.readOptionalString();
174174
}
175-
// TODO: change to V_2_18_0 once this is backported into that version
176-
if (in.getVersion().onOrAfter(Version.CURRENT)) {
175+
if (in.getVersion().onOrAfter(Version.V_2_18_0)) {
177176
renameAliasPattern = in.readOptionalString();
178177
}
179-
if (in.getVersion().onOrAfter(Version.CURRENT)) {
178+
if (in.getVersion().onOrAfter(Version.V_2_18_0)) {
180179
renameAliasReplacement = in.readOptionalString();
181180
}
182181
}
@@ -215,11 +214,10 @@ public void writeTo(StreamOutput out) throws IOException {
215214
if (out.getVersion().onOrAfter(Version.V_2_17_0)) {
216215
out.writeOptionalString(sourceRemoteTranslogRepository);
217216
}
218-
// TODO: change to V_2_18_0 once this is backported into that version
219-
if (out.getVersion().onOrAfter(Version.CURRENT)) {
217+
if (out.getVersion().onOrAfter(Version.V_2_18_0)) {
220218
out.writeOptionalString(renameAliasPattern);
221219
}
222-
if (out.getVersion().onOrAfter(Version.CURRENT)) {
220+
if (out.getVersion().onOrAfter(Version.V_2_18_0)) {
223221
out.writeOptionalString(renameAliasReplacement);
224222
}
225223
}

0 commit comments

Comments
 (0)