Skip to content

Commit

Permalink
Support wildcard/regex for indices param in _remotestore/_restore
Browse files Browse the repository at this point in the history
Signed-off-by: bansvaru <[email protected]>
  • Loading branch information
linuxpi committed Jul 27, 2023
1 parent 91bc891 commit 61aa234
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,12 @@ public ClusterState execute(ClusterState currentState) {

List<String> indicesToBeRestored = new ArrayList<>();
int totalShards = 0;
for (String index : request.indices()) {
List<String> filteredIndices = filterIndices(
new ArrayList<>(currentState.metadata().indices().keySet()),
request.indices(),

Check warning on line 232 in server/src/main/java/org/opensearch/snapshots/RestoreService.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/org/opensearch/snapshots/RestoreService.java#L230-L232

Added lines #L230 - L232 were not covered by tests
IndicesOptions.LENIENT_EXPAND_OPEN_HIDDEN
);
for (String index : filteredIndices) {
IndexMetadata currentIndexMetadata = currentState.metadata().index(index);
if (currentIndexMetadata == null) {
// ToDo: Handle index metadata does not exist case. (GitHub #3457)
Expand Down

0 comments on commit 61aa234

Please sign in to comment.