Skip to content

Commit 051e042

Browse files
authored
Added missing cancelled and resource_stats to /_reindex/{task_id}/_rethrottle. (#740)
Signed-off-by: dblock <[email protected]> Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>
1 parent 4226d83 commit 051e042

File tree

5 files changed

+51
-2
lines changed

5 files changed

+51
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
3535
- Added support for multiple test verbs ([#724](https://github.com/opensearch-project/opensearch-api-specification/pull/724))
3636
- Added support for using a certificate and key in tests ([#731](https://github.com/opensearch-project/opensearch-api-specification/pull/731))
3737
- Added `_type` to `termvector` and `mtermvector` ([#734](https://github.com/opensearch-project/opensearch-api-specification/pull/734))
38+
- Added missing `cancelled` and `resource_stats` to `/_reindex/{task_id}/_rethrottle` ([#740](https://github.com/opensearch-project/opensearch-api-specification/pull/740))
3839

3940
### Removed
4041
- Removed unsupported `_common.mapping:SourceField`'s `mode` field and associated `_common.mapping:SourceFieldMode` enum ([#652](https://github.com/opensearch-project/opensearch-api-specification/pull/652))

spec/namespaces/_core.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ paths:
470470
operationId: reindex_rethrottle.0
471471
x-operation-group: reindex_rethrottle
472472
x-version-added: '1.0'
473-
description: Changes the number of requests per second for a particular Reindex operation.
473+
description: Changes the number of requests per second for a particular reindex operation.
474474
externalDocs:
475475
url: https://opensearch.org/docs/latest
476476
parameters:

spec/schemas/_core.reindex_rethrottle.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,16 @@ components:
2424
type: string
2525
cancellable:
2626
type: boolean
27+
cancelled:
28+
type: boolean
2729
description:
2830
type: string
2931
id:
3032
type: number
3133
node:
3234
$ref: '_common.yaml#/components/schemas/Name'
35+
resource_stats:
36+
$ref: '_common.yaml#/components/schemas/ResourceStats'
3337
running_time_in_nanos:
3438
$ref: '_common.yaml#/components/schemas/DurationValueUnitNanos'
3539
start_time_in_millis:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
$schema: ../../../../json_schemas/test_story.schema.yaml
2+
3+
description: Test changing the number of requests per second for a particular reindex operation.
4+
epilogues:
5+
- path: /movies
6+
method: DELETE
7+
status: [200, 404]
8+
- path: /videos
9+
method: DELETE
10+
status: [200, 404]
11+
prologues:
12+
- path: /{index}/_doc
13+
method: POST
14+
parameters:
15+
index: movies
16+
refresh: true
17+
request:
18+
payload:
19+
title: Beauty and the Beast
20+
year: 91
21+
status: [201]
22+
- id: task
23+
path: /_reindex
24+
method: POST
25+
parameters:
26+
wait_for_completion: false
27+
requests_per_second: 1
28+
request:
29+
payload:
30+
source:
31+
index: movies
32+
dest:
33+
index: videos
34+
output:
35+
task_id: payload.task
36+
chapters:
37+
- synopsis: Change the value of `requests_per_second` on a running reindex.
38+
path: /_reindex/{task_id}/_rethrottle
39+
method: POST
40+
parameters:
41+
task_id: ${task.task_id}
42+
requests_per_second: 2
43+
response:
44+
status: 200

tests/default/indices/delete_by_query/rethrottle.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ prologues:
3030
output:
3131
task_id: payload.task
3232
chapters:
33-
- synopsis: Change the value of `requests_per_second``on a running delete by query.
33+
- synopsis: Change the value of `requests_per_second` on a running delete by query.
3434
path: /_delete_by_query/{task_id}/_rethrottle
3535
method: POST
3636
parameters:

0 commit comments

Comments
 (0)