mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-10 06:55:32 +00:00
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
81 lines
2.8 KiB
YAML
81 lines
2.8 KiB
YAML
---
|
|
"Indices recovery test":
|
|
|
|
- do:
|
|
indices.create:
|
|
index: test_1
|
|
body:
|
|
settings:
|
|
index:
|
|
number_of_replicas: 0
|
|
|
|
- do:
|
|
cluster.health:
|
|
wait_for_status: green
|
|
|
|
- do:
|
|
indices.recovery:
|
|
index: [test_1]
|
|
|
|
- match: { test_1.shards.0.type: "GATEWAY" }
|
|
- match: { test_1.shards.0.stage: "DONE" }
|
|
- match: { test_1.shards.0.primary: true }
|
|
- match: { test_1.shards.0.target.ip: /^\d+\.\d+\.\d+\.\d+$/ }
|
|
- gte: { test_1.shards.0.index.files.total: 0 }
|
|
- gte: { test_1.shards.0.index.files.reused: 0 }
|
|
- gte: { test_1.shards.0.index.files.recovered: 0 }
|
|
- match: { test_1.shards.0.index.files.percent: /^\d+\.\d\%$/ }
|
|
- gte: { test_1.shards.0.index.size.total_in_bytes: 0 }
|
|
- gte: { test_1.shards.0.index.size.reused_in_bytes: 0 }
|
|
- gte: { test_1.shards.0.index.size.recovered_in_bytes: 0 }
|
|
- match: { test_1.shards.0.index.size.percent: /^\d+\.\d\%$/ }
|
|
- gte: { test_1.shards.0.index.source_throttle_time_in_millis: 0 }
|
|
- gte: { test_1.shards.0.index.target_throttle_time_in_millis: 0 }
|
|
- gte: { test_1.shards.0.translog.recovered: 0 }
|
|
- gte: { test_1.shards.0.translog.total: -1 }
|
|
- gte: { test_1.shards.0.translog.total_on_start: 0 }
|
|
- gte: { test_1.shards.0.translog.total_time_in_millis: 0 }
|
|
- gte: { test_1.shards.0.start.check_index_time_in_millis: 0 }
|
|
- gte: { test_1.shards.0.start.total_time_in_millis: 0 }
|
|
---
|
|
"Indices recovery test index name not matching":
|
|
|
|
- do:
|
|
indices.create:
|
|
index: test_1
|
|
body:
|
|
settings:
|
|
index:
|
|
number_of_replicas: 0
|
|
|
|
- do:
|
|
cluster.health:
|
|
wait_for_status: green
|
|
|
|
- do:
|
|
|
|
catch: missing
|
|
indices.recovery:
|
|
index: [foobar]
|
|
|
|
---
|
|
"Indices recovery test, wildcard not matching any index":
|
|
|
|
- do:
|
|
indices.create:
|
|
index: test_1
|
|
body:
|
|
settings:
|
|
index:
|
|
number_of_replicas: 0
|
|
|
|
- do:
|
|
cluster.health:
|
|
wait_for_status: green
|
|
|
|
- do:
|
|
indices.recovery:
|
|
index: [v*]
|
|
|
|
- match: { $body: {} }
|