mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-06 13:08:29 +00:00
2beda3953d
RoutingTables activePrimaryShardsGrouped(), allActiveShardsGrouped() and allAssignedShardsGrouped() methods treated empty index array input parameters as meaning "all" indices and expanded to the routing maps keyset. However, the expansion of index names is now already done in MetaData#concreteIndices(). Returning an empty index name list here when a wildcard pattern didn't match any index name could lead to problems like #9081 because the RoutingTable still expanded this list of names to "_all". In case of e.g. the recovery endpoint this could lead to problems. Closes #9081 Closes #10148
59 lines
1021 B
YAML
59 lines
1021 B
YAML
---
|
|
setup:
|
|
- do:
|
|
indices.create:
|
|
index: test_1
|
|
body:
|
|
settings:
|
|
index:
|
|
number_of_replicas: 0
|
|
number_of_shards: 5
|
|
|
|
- do:
|
|
indices.create:
|
|
index: test_2
|
|
body:
|
|
settings:
|
|
index:
|
|
number_of_replicas: 0
|
|
number_of_shards: 5
|
|
|
|
- do:
|
|
cluster.health:
|
|
wait_for_status: green
|
|
|
|
---
|
|
"Indices refresh test _all":
|
|
|
|
- do:
|
|
indices.refresh:
|
|
index: [_all]
|
|
|
|
- match: { _shards.total: 10 }
|
|
- match: { _shards.successful: 10 }
|
|
- match: { _shards.failed: 0 }
|
|
|
|
---
|
|
"Indices refresh test empty array":
|
|
|
|
|
|
- do:
|
|
indices.refresh:
|
|
index: []
|
|
|
|
- match: { _shards.total: 10 }
|
|
- match: { _shards.successful: 10 }
|
|
- match: { _shards.failed: 0 }
|
|
|
|
---
|
|
"Indices refresh test no-match wildcard":
|
|
|
|
- do:
|
|
indices.refresh:
|
|
index: [bla*]
|
|
|
|
- match: { _shards.total: 0 }
|
|
- match: { _shards.successful: 0 }
|
|
- match: { _shards.failed: 0 }
|
|
|