-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keep track of average shard write load (#90768)
This commit adds a new field, write_load, into the shard stats. This new stat exposes the average number of write threads used while indexing documents. Closes #90102
- Loading branch information
Showing
25 changed files
with
412 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 90768 | ||
summary: Keep track of average shard write load | ||
area: CRUD | ||
type: enhancement | ||
issues: | ||
- 90102 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.stats/70_write_load.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
setup: | ||
- skip: | ||
version: " - 8.5.99" | ||
reason: Indices write load stats were introduced in 8.6 | ||
--- | ||
"Write load average is tracked at shard level": | ||
- do: | ||
indices.create: | ||
index: testindex | ||
body: | ||
settings: | ||
index.number_of_shards: 1 | ||
index.number_of_replicas: 0 | ||
mappings: | ||
properties: | ||
name: | ||
type: text | ||
description: | ||
type: text | ||
price: | ||
type: double | ||
|
||
- do: | ||
indices.stats: | ||
index: "testindex" | ||
level: shards | ||
metric: [ indexing ] | ||
|
||
- match: { _all.total.indexing.write_load: 0.0 } | ||
- match: { indices.testindex.total.indexing.write_load: 0.0 } | ||
- match: { indices.testindex.shards.0.0.indexing.write_load: 0.0 } | ||
|
||
- do: | ||
index: | ||
index: testindex | ||
body: { "name": "specialty coffee", "description": "arabica coffee beans", "price": 100 } | ||
- do: | ||
index: | ||
index: testindex | ||
body: { "name": "commercial coffee", "description": "robusta coffee beans", "price": 50 } | ||
- do: | ||
index: | ||
index: testindex | ||
body: { "name": "raw coffee", "description": "colombian coffee beans", "price": 25 } | ||
- do: | ||
index: | ||
index: testindex | ||
body: { "name": "book", "description": "some book", "price": 1000 } | ||
|
||
- do: | ||
indices.stats: | ||
index: "testindex" | ||
level: shards | ||
metric: [ indexing ] | ||
|
||
- gte: { _all.total.indexing.write_load: 0.0 } | ||
- gte: { indices.testindex.total.indexing.write_load: 0.0 } | ||
- gte: { indices.testindex.shards.0.0.indexing.write_load: 0.0 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.