You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add new parameters to snapshot restore to rename the restored aliases… (#16292) (#16447)
* Add new parameters to snapshot restore to rename the restored aliases similar to the existing parameters to rename indexes
* Fix comment. Update changelog.
* New parameters needs to only used for new version
* Add missing equals and hash implemenation for new parameters
* Add some tests
* Add some more tests
* Use CountDownLatch
* Add two more tests. Refactoring and cleanup.
* Use CURRENT version to pass backward compatibility tests. Change to V2.18 later once it is backported into that version.
* Refactoring
* Overwriting aliases variable causes test failures for reasons I do not understand. Also some refactoring.
* Convert to paramaterized tests
---------
Signed-off-by: Spencer G. Jones <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Co-authored-by: Spencer G. Jones <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
28
28
- Add _list/shards API as paginated alternate to _cat/shards ([#14641](https://github.com/opensearch-project/OpenSearch/pull/14641))
29
29
-[Star Tree - Search] Add support for metric aggregations with/without term query ([15289](https://github.com/opensearch-project/OpenSearch/pull/15289))
30
30
- URI path filtering support in cluster stats API ([#15938](https://github.com/opensearch-project/OpenSearch/pull/15938))
31
-
31
+
- Add support for renaming aliases during snapshot restore ([#16292](https://github.com/opensearch-project/OpenSearch/pull/16292))
32
32
33
33
### Dependencies
34
34
- Bump `org.apache.logging.log4j:log4j-core` from 2.23.1 to 2.24.0 ([#15858](https://github.com/opensearch-project/OpenSearch/pull/15858))
Copy file name to clipboardExpand all lines: server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequestBuilder.java
+28Lines changed: 28 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -144,6 +144,34 @@ public RestoreSnapshotRequestBuilder setRenameReplacement(String renameReplaceme
144
144
returnthis;
145
145
}
146
146
147
+
/**
148
+
* Sets rename pattern that should be applied to restored indices' aliases.
149
+
* <p>
150
+
* Aliases that match the rename pattern will be renamed according to {@link #setRenameAliasReplacement(String)}. The
151
+
* rename pattern is applied according to the {@link java.util.regex.Matcher#appendReplacement(StringBuffer, String)}
152
+
* The request will fail if two or more alias will be renamed into the same name.
Copy file name to clipboardExpand all lines: server/src/test/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequestTests.java
0 commit comments