Skip to content

Commit

Permalink
update specs
Browse files Browse the repository at this point in the history
  • Loading branch information
idegtiarenko committed Oct 30, 2023
1 parent 9f4a9f2 commit 2287eb1
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/reference/cluster/get-desired-balance.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ The API returns the following result:
"reconciliation_time_in_millis": 0
},
"cluster_balance_stats" : {
"shard_count": 37,
"undesired_shard_allocation_count": 0,
"tiers": {
"data_hot" : {
"shard_count" : {
Expand Down Expand Up @@ -100,6 +102,7 @@ The API returns the following result:
"node_id": "UPYt8VwWTt-IADAEbqpLxA",
"roles": ["data_content"],
"shard_count": 10,
"undesired_shard_allocation_count": 0,
"forecast_write_load": 8.5,
"forecast_disk_usage_bytes": 498435,
"actual_disk_usage_bytes": 498435
Expand All @@ -108,6 +111,7 @@ The API returns the following result:
"node_id": "bgC66tboTIeFQ0VgRGI4Gg",
"roles": ["data_content"],
"shard_count": 15,
"undesired_shard_allocation_count": 0,
"forecast_write_load": 3.25,
"forecast_disk_usage_bytes": 384935,
"actual_disk_usage_bytes": 384935
Expand All @@ -116,6 +120,7 @@ The API returns the following result:
"node_id": "2x1VTuSOQdeguXPdN73yRw",
"roles": ["data_content"],
"shard_count": 12,
"undesired_shard_allocation_count": 0,
"forecast_write_load": 6.0,
"forecast_disk_usage_bytes": 648766,
"actual_disk_usage_bytes": 648766
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,35 @@ setup:
_internal.get_desired_balance: { }

- is_true: 'cluster_info'

---
"Test undesired_shard_allocation_count":

- skip:
version: " - 8.11.99"
reason: "undesired_shard_allocation_count added in in 8.12.0"

- do:
indices.create:
index: test
body:
settings:
number_of_shards: 1
number_of_replicas: 0

- do:
cluster.health:
index: test
wait_for_status: green

- do:
cluster.state: {}
- set: { nodes._arbitrary_key_ : node_id }
- set: { nodes.$node_id.name : node_name }

- do:
_internal.get_desired_balance: { }

- gte: { 'cluster_balance_stats.shard_count' : 0 }
- gte: { 'cluster_balance_stats.undesired_shard_allocation_count' : 0 }
- gte: { 'cluster_balance_stats.nodes.$node_name.undesired_shard_allocation_count' : 0 }
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,35 @@ setup:

- do:
_internal.delete_desired_balance: { }

---
"Test undesired_shard_allocation_count":

- skip:
version: " - 8.11.99"
reason: "undesired_shard_allocation_count added in in 8.12.0"

- do:
indices.create:
index: test
body:
settings:
number_of_shards: 1
number_of_replicas: 0

- do:
cluster.health:
index: test
wait_for_status: green

- do:
cluster.state: {}
- set: { nodes._arbitrary_key_ : node_id }
- set: { nodes.$node_id.name : node_name }

- do:
_internal.get_desired_balance: { }

- gte: { 'cluster_balance_stats.shard_count' : 0 }
- gte: { 'cluster_balance_stats.undesired_shard_allocation_count' : 0 }
- gte: { 'cluster_balance_stats.nodes.$node_name.undesired_shard_allocation_count' : 0 }

0 comments on commit 2287eb1

Please sign in to comment.