forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix noop_update_total metric in indexing stats cannot be updated by b…
…ulk API (opensearch-project#11485) Signed-off-by: Gao Binlong <gbinlong@amazon.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
- Loading branch information
1 parent
3c1f4c3
commit f2f61ff
Showing
4 changed files
with
65 additions
and
0 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
55 changes: 55 additions & 0 deletions
55
rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats/50_noop_update.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,55 @@ | ||
--- | ||
setup: | ||
|
||
- do: | ||
indices.create: | ||
index: test1 | ||
wait_for_active_shards: all | ||
body: | ||
settings: | ||
index.number_of_shards: 1 | ||
index.number_of_replicas: 1 | ||
|
||
- do: | ||
index: | ||
index: test1 | ||
id: 1 | ||
body: { "bar": "bar" } | ||
|
||
- do: | ||
indices.refresh: {} | ||
|
||
# Related issue: https://github.com/opensearch-project/OpenSearch/issues/9857 | ||
--- | ||
"Test noop_update_total metric can be updated by both update API and bulk API": | ||
- skip: | ||
version: " - 2.99.99" #TODO: change to 2.11.99 after the PR is backported to 2.x branch | ||
reason: "fixed in 3.0" | ||
|
||
- do: | ||
update: | ||
index: test1 | ||
id: 1 | ||
body: { "doc": { "bar": "bar" } } | ||
|
||
- do: | ||
indices.stats: | ||
index: test1 | ||
metric: indexing | ||
|
||
- match: { indices.test1.primaries.indexing.noop_update_total: 1 } | ||
- match: { indices.test1.total.indexing.noop_update_total: 1 } | ||
|
||
- do: | ||
bulk: | ||
body: | | ||
{"update": {"_id": "1", "_index": "test1"}} | ||
{"doc": {"bar": "bar"}} | ||
- do: | ||
indices.stats: | ||
index: test1 | ||
metric: indexing | ||
|
||
- match: { indices.test1.primaries.indexing.noop_update_total: 2 } | ||
- match: { indices.test1.total.indexing.noop_update_total: 2 } |
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