Propagate ?master_timeout query parameter from CCR apis to downstreams (#105168)

* Propagate ?master_timeout query parameter from crr put follow api

* Update docs/changelog/105168.yaml

* fix sily mistake

* spotless

* fix 2

* Add ?master_timeout query param to apis which use it

* Update rest api specs + yaml tests

* Add master_timeout (+timeout) to remaining api endpoints

* Update 105168.yaml

Correct message

* Enable randomly ?master_timeout param to ccr IT tests

* Add timeout param to RestCcrStatsAction

* propagate master_timeout param between put_follow -> resume_follow calls

* Propagate master_timeout down to persistent task layer

* Add transport version for ccr stats request object change

* Add BwC test for CcrStatsAction.Request obj
This commit is contained in:
Volodymyr Krasnikov 2024-04-02 13:39:01 -07:00 committed by GitHub
parent 412f2f5617
commit 1e253a04fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
56 changed files with 368 additions and 17 deletions

View file

@ -54,6 +54,13 @@ This API deletes a configured collection of
`<auto_follow_pattern_name>`::
(Required, string) Specifies the auto-follow pattern collection to delete.
[[ccr-delete-auto-follow-pattern-query-params]]
==== {api-query-parms-title}
`master_timeout`::
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
a connection to the master node. If no response is received before the timeout
expires, the request fails and returns an error. Defaults to `30s`.
[[ccr-delete-auto-follow-pattern-examples]]
==== {api-examples-title}

View file

@ -72,6 +72,14 @@ This API will return the specified auto-follow pattern collection.
to retrieve. If you do not specify a name, the API returns information for all
collections.
[[ccr-get-auto-follow-pattern-query-params]]
==== {api-query-parms-title}
`master_timeout`::
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
a connection to the master node. If no response is received before the timeout
expires, the request fails and returns an error. Defaults to `30s`.
[[ccr-get-auto-follow-pattern-examples]]
==== {api-examples-title}

View file

@ -40,6 +40,13 @@ meantime.
`<auto_follow_pattern_name>`::
(Required, string) Name of the auto-follow pattern to pause.
[[ccr-pause-auto-follow-pattern-query-params]]
==== {api-query-parms-title}
`master_timeout`::
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
a connection to the master node. If no response is received before the timeout
expires, the request fails and returns an error. Defaults to `30s`.
[[ccr-pause-auto-follow-pattern-examples]]
==== {api-examples-title}

View file

@ -71,6 +71,14 @@ the new patterns.
`<auto_follow_pattern_name>`::
(Required, string) The name of the collection of auto-follow patterns.
[[ccr-put-auto-follow-pattern-query-params]]
==== {api-query-parms-title}
`master_timeout`::
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
a connection to the master node. If no response is received before the timeout
expires, the request fails and returns an error. Defaults to `30s`.
[[ccr-put-auto-follow-pattern-request-body]]
==== {api-request-body-title}

View file

@ -35,6 +35,13 @@ have been deleted or closed in the meantime.
`<auto_follow_pattern_name>`::
(Required, string) Specifies the name of the auto-follow pattern to resume.
[[ccr-resume-auto-follow-pattern-query-params]]
==== {api-query-parms-title}
`master_timeout`::
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
a connection to the master node. If no response is received before the timeout
expires, the request fails and returns an error. Defaults to `30s`.
[[ccr-resume-auto-follow-pattern-examples]]
==== {api-examples-title}

View file

@ -49,6 +49,14 @@ replication options and whether the follower indices are active or paused.
`<index>`::
(Required, string) A comma-delimited list of follower index patterns.
[[ccr-get-follow-info-query-params]]
==== {api-query-parms-title}
`master_timeout`::
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
a connection to the master node. If no response is received before the timeout
expires, the request fails and returns an error. Defaults to `30s`.
[role="child_attributes"]
[[ccr-get-follow-info-response-body]]
==== {api-response-body-title}

View file

@ -56,6 +56,12 @@ following tasks associated with each shard for the specified indices.
`<index>`::
(Required, string) A comma-delimited list of index patterns.
[[ccr-get-follow-stats-query-params]]
==== {api-query-parms-title}
`timeout`::
(Optional, time) Controls the amount of time to wait for results. Defaults to unlimited.
[role="child_attributes"]
[[ccr-get-follow-stats-response-body]]
==== {api-response-body-title}

View file

@ -100,6 +100,12 @@ the <<ccr-post-unfollow,unfollow API>> is invoked.
`<leader_index>`::
(Required, string) The name of the leader index.
[[ccr-post-forget-follower-query-params]]
==== {api-query-parms-title}
`timeout`::
(Optional, time) Controls the amount of time to wait for results. Defaults to unlimited.
[[ccr-post-forget-follower-request-body]]
==== {api-request-body-title}

View file

@ -53,6 +53,14 @@ following task.
`<follower_index>`::
(Required, string) The name of the follower index.
[[ccr-post-pause-follow-query-params]]
==== {api-query-parms-title}
`master_timeout`::
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
a connection to the master node. If no response is received before the timeout
expires, the request fails and returns an error. Defaults to `30s`.
[[ccr-post-pause-follow-examples]]
==== {api-examples-title}

View file

@ -66,6 +66,14 @@ returns, the follower index will resume fetching operations from the leader inde
`<follower_index>`::
(Required, string) The name of the follower index.
[[ccr-post-resume-follow-query-params]]
==== {api-query-parms-title}
`master_timeout`::
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
a connection to the master node. If no response is received before the timeout
expires, the request fails and returns an error. Defaults to `30s`.
[[ccr-post-resume-follow-request-body]]
==== {api-request-body-title}
include::../follow-request-body.asciidoc[tag=ccr-resume-follow-request-body]

View file

@ -38,9 +38,9 @@ POST /<follower_index>/_ccr/unfollow
[[ccr-post-unfollow-prereqs]]
==== {api-prereq-title}
* If the {es} {security-features} are enabled, you must have `manage_follow_index`
* If the {es} {security-features} are enabled, you must have `manage_follow_index`
index privileges for the follower index. For more information, see
<<security-privileges>>.
<<security-privileges>>.
[[ccr-post-unfollow-desc]]
==== {api-description-title}
@ -60,6 +60,14 @@ irreversible operation.
`<follower_index>`::
(Required, string) The name of the follower index.
[[ccr-post-unfollow-query-params]]
==== {api-query-parms-title}
`master_timeout`::
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
a connection to the master node. If no response is received before the timeout
expires, the request fails and returns an error. Defaults to `30s`.
[[ccr-post-unfollow-examples]]
==== {api-examples-title}

View file

@ -65,6 +65,11 @@ referenced leader index. When this API returns, the follower index exists, and
follower shard requires transferring all the remote Lucene segment files to
the follower index.
`master_timeout`::
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
a connection to the master node. If no response is received before the timeout
expires, the request fails and returns an error. Defaults to `30s`.
[[ccr-put-follow-request-body]]
==== {api-request-body-title}

View file

@ -50,6 +50,17 @@ This API gets {ccr} stats. This API will return all stats related to {ccr}. In
particular, this API returns stats about auto-following, and returns the same
shard-level stats as in the <<ccr-get-follow-stats,get follower stats API>>.
[[ccr-get-stats-query-params]]
==== {api-query-parms-title}
`timeout`::
(Optional, time) Controls the amount of time to wait for results. Defaults to unlimited.
`master_timeout`::
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
a connection to the master node. If no response is received before the timeout
expires, the request fails and returns an error. Defaults to `30s`.
[role="child_attributes"]
[[ccr-get-stats-response-body]]
==== {api-response-body-title}