mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
Fix support for infinite ?master_timeout
(#107050)
Specifying `?master_timeout=-1` on an API which performs a cluster state update means that the cluster state update task will never time out while waiting in the pending tasks queue. However this parameter is also re-used in a few places where a timeout of `-1` means something else, typically to timeout immediately. This commit fixes those places so that `?master_timeout=-1` consistently means to wait forever.
This commit is contained in:
parent
1587dada58
commit
ccbb5badce
32 changed files with 133 additions and 97 deletions
|
@ -57,10 +57,7 @@ This API deletes a configured collection of
|
|||
[[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`.
|
||||
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
||||
|
||||
[[ccr-delete-auto-follow-pattern-examples]]
|
||||
==== {api-examples-title}
|
||||
|
|
|
@ -75,10 +75,7 @@ This API will return the specified auto-follow pattern collection.
|
|||
[[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`.
|
||||
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
||||
|
||||
[[ccr-get-auto-follow-pattern-examples]]
|
||||
==== {api-examples-title}
|
||||
|
|
|
@ -43,10 +43,7 @@ meantime.
|
|||
[[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`.
|
||||
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
||||
|
||||
[[ccr-pause-auto-follow-pattern-examples]]
|
||||
==== {api-examples-title}
|
||||
|
|
|
@ -74,10 +74,7 @@ the new 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`.
|
||||
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
||||
|
||||
[[ccr-put-auto-follow-pattern-request-body]]
|
||||
==== {api-request-body-title}
|
||||
|
|
|
@ -38,10 +38,7 @@ have been deleted or closed in the meantime.
|
|||
[[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`.
|
||||
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
||||
|
||||
[[ccr-resume-auto-follow-pattern-examples]]
|
||||
==== {api-examples-title}
|
||||
|
|
|
@ -52,10 +52,7 @@ replication options and whether the follower indices are active or paused.
|
|||
[[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`.
|
||||
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
||||
|
||||
[role="child_attributes"]
|
||||
[[ccr-get-follow-info-response-body]]
|
||||
|
|
|
@ -56,10 +56,7 @@ following task.
|
|||
[[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`.
|
||||
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
||||
|
||||
[[ccr-post-pause-follow-examples]]
|
||||
==== {api-examples-title}
|
||||
|
|
|
@ -69,10 +69,7 @@ returns, the follower index will resume fetching operations from the leader inde
|
|||
[[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`.
|
||||
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
||||
|
||||
[[ccr-post-resume-follow-request-body]]
|
||||
==== {api-request-body-title}
|
||||
|
|
|
@ -63,10 +63,7 @@ irreversible operation.
|
|||
[[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`.
|
||||
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
||||
|
||||
[[ccr-post-unfollow-examples]]
|
||||
==== {api-examples-title}
|
||||
|
|
|
@ -65,11 +65,7 @@ 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`.
|
||||
|
||||
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
||||
|
||||
[[ccr-put-follow-request-body]]
|
||||
==== {api-request-body-title}
|
||||
|
|
|
@ -56,10 +56,7 @@ shard-level stats as in the <<ccr-get-follow-stats,get follower stats API>>.
|
|||
`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`.
|
||||
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
||||
|
||||
[role="child_attributes"]
|
||||
[[ccr-get-stats-response-body]]
|
||||
|
|
|
@ -1218,9 +1218,9 @@ tag::timeoutparms[]
|
|||
tag::master-timeout[]
|
||||
`master_timeout`::
|
||||
(Optional, <<time-units, time units>>)
|
||||
Period 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`.
|
||||
Period to wait for the master node. If the master node is not available before
|
||||
the timeout expires, the request fails and returns an error. Defaults to `30s`.
|
||||
Can also be set to `-1` to indicate that the request should never timeout.
|
||||
end::master-timeout[]
|
||||
|
||||
tag::timeout[]
|
||||
|
|
|
@ -27,10 +27,7 @@ information, see <<security-privileges>>.
|
|||
[[watcher-api-start-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`.
|
||||
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
||||
|
||||
//[[watcher-api-start-request-body]]
|
||||
//==== {api-request-body-title}
|
||||
|
|
|
@ -27,10 +27,7 @@ information, see <<security-privileges>>.
|
|||
[[watcher-api-stop-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`.
|
||||
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
||||
|
||||
//[[watcher-api-stop-request-body]]
|
||||
//==== {api-request-body-title}
|
||||
|
|
|
@ -42,10 +42,7 @@ Name of the snapshot repository that both source and target snapshot belong to.
|
|||
[[clone-snapshot-api-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`.
|
||||
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
||||
|
||||
`timeout`::
|
||||
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
|
||||
|
@ -55,4 +52,4 @@ fails and returns an error. Defaults to `30s`.
|
|||
`indices`::
|
||||
(Required, string)
|
||||
A comma-separated list of indices to include in the snapshot.
|
||||
<<api-multi-index,multi-target syntax>> is supported.
|
||||
<<api-multi-index,multi-target syntax>> is supported.
|
||||
|
|
|
@ -51,10 +51,7 @@ supported.
|
|||
[[delete-snapshot-repo-api-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`.
|
||||
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
||||
|
||||
`timeout`::
|
||||
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
|
||||
|
|
|
@ -59,10 +59,7 @@ cluster, omit this parameter or use `*` or `_all`.
|
|||
only. If `false`, the request gets information from the master node. Defaults to
|
||||
`false`.
|
||||
|
||||
`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`.
|
||||
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
||||
|
||||
[role="child_attributes"]
|
||||
[[get-snapshot-repo-api-response-body]]
|
||||
|
|
|
@ -52,10 +52,7 @@ IMPORTANT: Several options for this API can be specified using a query parameter
|
|||
or a request body parameter. If both parameters are specified, only the query
|
||||
parameter is used.
|
||||
|
||||
`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`.
|
||||
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
||||
|
||||
`timeout`::
|
||||
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
|
||||
|
|
|
@ -47,10 +47,7 @@ Name of the snapshot repository to verify.
|
|||
[[verify-snapshot-repo-api-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`.
|
||||
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
||||
|
||||
`timeout`::
|
||||
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue