From ce8c28d1c15faec60636839d752c83bcdc155f5f Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Fri, 28 Sep 2018 23:19:04 -0400 Subject: [PATCH 01/12] Introduce cross-cluster replication API docs This commit is our first introduction to cross-cluster replication docs. In this commit, we introduce the cross-cluster replication API docs. We also add skelton docs for additional content that will be added in a series of follow-up commits. --- docs/build.gradle | 18 +- .../delete-auto-follow-pattern.asciidoc | 67 +++++ .../get-auto-follow-pattern.asciidoc | 91 +++++++ .../get-auto-follow-stats.asciidoc | 48 ++++ .../put-auto-follow-pattern.asciidoc | 98 +++++++ docs/reference/ccr/apis/ccr-apis.asciidoc | 38 +++ .../ccr/apis/follow-request-body.asciidoc | 30 +++ .../ccr/apis/follow/get-follow-stats.asciidoc | 245 ++++++++++++++++++ .../apis/follow/post-pause-follow.asciidoc | 65 +++++ .../apis/follow/post-resume-follow.asciidoc | 93 +++++++ .../ccr/apis/follow/post-unfollow.asciidoc | 73 ++++++ .../ccr/apis/follow/put-follow.asciidoc | 85 ++++++ docs/reference/ccr/getting-started.asciidoc | 6 + docs/reference/ccr/index.asciidoc | 15 ++ docs/reference/ccr/overview.asciidoc | 6 + docs/reference/index.asciidoc | 2 + docs/reference/rest-api/index.asciidoc | 2 + .../test/rest/ESRestTestCase.java | 6 + 18 files changed, 987 insertions(+), 1 deletion(-) create mode 100644 docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc create mode 100644 docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc create mode 100644 docs/reference/ccr/apis/auto-follow/get-auto-follow-stats.asciidoc create mode 100644 docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc create mode 100644 docs/reference/ccr/apis/ccr-apis.asciidoc create mode 100644 docs/reference/ccr/apis/follow-request-body.asciidoc create mode 100644 docs/reference/ccr/apis/follow/get-follow-stats.asciidoc create mode 100644 docs/reference/ccr/apis/follow/post-pause-follow.asciidoc create mode 100644 docs/reference/ccr/apis/follow/post-resume-follow.asciidoc create mode 100644 docs/reference/ccr/apis/follow/post-unfollow.asciidoc create mode 100644 docs/reference/ccr/apis/follow/put-follow.asciidoc create mode 100644 docs/reference/ccr/getting-started.asciidoc create mode 100644 docs/reference/ccr/index.asciidoc create mode 100644 docs/reference/ccr/overview.asciidoc diff --git a/docs/build.gradle b/docs/build.gradle index dd1846dc0459c..0463d6bf22305 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -149,7 +149,6 @@ buildRestTests.setups['host'] = ''' - do: nodes.info: metric: [ http, transport ] - - is_true: nodes.$master.http.publish_address - set: {nodes.$master.http.publish_address: host} - set: {nodes.$master.transport.publish_address: transport_host} ''' @@ -1093,4 +1092,21 @@ buildRestTests.setups['calendar_outages_addevent'] = buildRestTests.setups['cale ]} ''' +buildRestTests.setups['leader_cluster'] = buildRestTests.setups['host'] + ''' + - do: + cluster.put_settings: + body: + persistent: + cluster.remote.leader_cluster.seeds: $transport_host +''' +buildRestTests.setups['leader_cluster_and_leader_index'] = buildRestTests.setups['leader_cluster'] + ''' + - do: + indices.create: + index: leader_index + body: + settings: + index.number_of_replicas: 0 + index.number_of_shards: 1 + index.soft_deletes.enabled: true +''' diff --git a/docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc b/docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc new file mode 100644 index 0000000000000..897751a02e8ea --- /dev/null +++ b/docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc @@ -0,0 +1,67 @@ +[role="xpack"] +[testenv="platinum"] +[[ccr-delete-auto-follow-pattern]] +=== Delete Auto-Follow Pattern API +++++ +Delete Auto-Follow Pattern +++++ + +Delete auto-follow patterns. + +==== Description + +This API deletes configured auto-follow patterns. + +==== Request + +////////////////////////// + +[source,js] +-------------------------------------------------- +PUT /_ccr/auto_follow/leader_cluster +{ + "leader_cluster" : "leader_cluster", + "leader_index_patterns" : + [ + "leader_index" + ], + "follow_index_pattern" : "{{leader_index}}-follower" +} +-------------------------------------------------- +// CONSOLE +// TEST[setup:leader_cluster] +// TESTSETUP + +////////////////////////// + +[source,js] +-------------------------------------------------- +DELETE /_ccr/auto_follow/ +-------------------------------------------------- +// CONSOLE +// TEST[s//leader_cluster/] + +Here, the auto-follow patterns associated with the +<> specified by `` +will be deleted. + +==== Example + +The following is an example of using the delete auto-follow pattern API. + +[source,js] +-------------------------------------------------- +DELETE /_ccr/auto_follow/leader_cluster +-------------------------------------------------- +// CONSOLE +// TEST[setup:leader_cluster] + +The API returns the following result: + +[source,js] +-------------------------------------------------- +{ + "acknowledged" : true +} +-------------------------------------------------- +// TESTRESPONSE diff --git a/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc b/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc new file mode 100644 index 0000000000000..efea619d4daad --- /dev/null +++ b/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc @@ -0,0 +1,91 @@ +[role="xpack"] +[testenv="platinum"] +[[ccr-get-auto-follow-pattern]] +=== Get Auto-Follow Pattern API +++++ +Get Auto-Follow Pattern +++++ + +Get auto-follow patterns. + +==== Description + +This API gets configured auto-follow patterns. This API will return the +configured auto-follow patterns on a per-cluster basis. + +==== Request + +////////////////////////// + +[source,js] +-------------------------------------------------- +PUT /_ccr/auto_follow/leader_cluster +{ + "leader_cluster" : "leader_cluster", + "leader_index_patterns" : + [ + "leader_index*" + ], + "follow_index_pattern" : "{{leader_index}}-follower" +} +-------------------------------------------------- +// CONSOLE +// TEST[setup:leader_cluster] +// TESTSETUP + +[source,js] +-------------------------------------------------- +DELETE /_ccr/auto_follow/leader_cluster +-------------------------------------------------- +// CONSOLE +// TEST +// TEARDOWN + +////////////////////////// + +[source,js] +-------------------------------------------------- +GET /_ccr/auto_follow/ +-------------------------------------------------- +// CONSOLE + +Here, all auto-follow patterns will be returned. + +[source,js] +-------------------------------------------------- +GET /_ccr/auto_follow/ +-------------------------------------------------- +// CONSOLE +// TEST[s//leader_cluster/] + +Here, all auto-follow patterns configured for the +<> specified by `` +will be returned. + +==== Example + +The following is an example of using the get auto-follow pattern API. + +[source,js] +-------------------------------------------------- +GET /_ccr/auto_follow/leader_cluster +-------------------------------------------------- +// CONSOLE +// TEST[setup:leader_cluster] + +The API returns the following result: + +[source,js] +-------------------------------------------------- +{ + "leader_cluster" : + { + "leader_index_patterns" : + [ + "leader_index*" + ], + "follow_index_pattern" : "{{leader_index}}-follower" + } +} +-------------------------------------------------- +// TESTRESPONSE diff --git a/docs/reference/ccr/apis/auto-follow/get-auto-follow-stats.asciidoc b/docs/reference/ccr/apis/auto-follow/get-auto-follow-stats.asciidoc new file mode 100644 index 0000000000000..f9bba00a1cde6 --- /dev/null +++ b/docs/reference/ccr/apis/auto-follow/get-auto-follow-stats.asciidoc @@ -0,0 +1,48 @@ +[role="xpack"] +[testenv="platinum"] +[[ccr-get-auto-follow-stats]] +=== Get Auto-Follow Stats API +++++ +Get Auto-Follow Stats +++++ + +Get auto-follow stats. + +==== Description + +This API gets stats about auto-follow patterns. + +==== Request + +[source,js] +-------------------------------------------------- +GET /_ccr/auto_follow/stats +-------------------------------------------------- +// CONSOLE +// TEST + +Here, stats about auto-follow patterns will be returned. + +==== Example + +The following is an example of using the get auto-follow stats API. + +[source,js] +-------------------------------------------------- +GET /_ccr/auto_follow/stats +-------------------------------------------------- +// CONSOLE +// TEST + +The API returns the following result: + +[source,js] +-------------------------------------------------- +{ + "number_of_successful_follow_indices" : 16, + "number_of_failed_follow_indices" : 0, + "number_of_failed_remote_cluster_state_requests" : 0, + "recent_auto_follow_errors" : [ ] +} +-------------------------------------------------- +// TESTRESPONSE[s/"number_of_successful_follow_indices" : 16/"number_of_successful_follow_indices" : $body.number_of_successful_follow_indices/] diff --git a/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc b/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc new file mode 100644 index 0000000000000..04eb2283f2c87 --- /dev/null +++ b/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc @@ -0,0 +1,98 @@ +[role="xpack"] +[testenv="platinum"] +[[ccr-put-auto-follow-pattern]] +=== Create Auto-Follow Pattern API +++++ +Create Auto-Follow Pattern +++++ + +Creates an auto-follow pattern. + +==== Description + +This API creates a new collection of auto-follow patterns against the specified +remote cluster. Newly created indices on the remote cluster matching any of the specified +patterns will be automatically configured as follower indices. + +==== Request + +[source,js] +-------------------------------------------------- +PUT /_ccr/auto_follow/ +{ + "leader_cluster" : "", + "leader_index_patterns" : + [ + "" + ], + "follow_index_pattern" : "" +} +-------------------------------------------------- +// CONSOLE +// TEST[setup:leader_cluster] +// TEST[s//leader_cluster/] +// TEST[s//leader_index*/] +// TEST[s//{{leader_index}}-follower/] + +Here, `` is the <> +containing the leader indices to match against, `` is a +simple index pattern to match against indices in the remote cluster, and +`` is the pattern to use to name the resulting follower +indices. The `` can use the template `{{leader_index}}` to +refer to the name of the leader index being followed. + +==== Request Body +`leader_cluster`:: + (required string) the <> containing the + leader indices to match against + +`leader_index_patterns`:: + (array) an array of simple index patterns to match against indices in the + remote cluster specified by the `leader_cluster` field + +`follow_index_pattern`:: + (string) the name of follower index; the template `{{leader_index}}` can be + used to derive the name of the follower index from the name of the leader + index + +include::../follow-request-body.asciidoc[] + +==== Example + +The following is an example of using the create auto-follow pattern API. + +[source,js] +-------------------------------------------------- +PUT /_ccr/auto_follow/leader_cluster +{ + "leader_cluster" : "leader_cluster", + "leader_index_patterns" : + [ + "leader_index*" + ], + "follow_index_pattern" : "{{leader_index}}-follower" +} +-------------------------------------------------- +// CONSOLE +// TEST[setup:leader_cluster] + +The API returns the following result: + +[source,js] +-------------------------------------------------- +{ + "acknowledged" : true +} +-------------------------------------------------- +// TESTRESPONSE + +////////////////////////// + +[source,js] +-------------------------------------------------- +DELETE /_ccr/auto_follow/leader_cluster +-------------------------------------------------- +// CONSOLE +// TEST[continued] + +////////////////////////// diff --git a/docs/reference/ccr/apis/ccr-apis.asciidoc b/docs/reference/ccr/apis/ccr-apis.asciidoc new file mode 100644 index 0000000000000..d4a45bab6ed61 --- /dev/null +++ b/docs/reference/ccr/apis/ccr-apis.asciidoc @@ -0,0 +1,38 @@ +[role="xpack"] +[testenv="platinum"] +[[ccr-apis]] +== Cross-cluster replication APIs + +You can use the following APIs to perform {ccr} operations. + +[float] +[[ccr-api-follow]] +=== Follow + +* <> +* <> +* <> +* <> +* <> + +[float] +[[ccr-api-auto-follow]] +=== Auto-follow + +* <> +* <> +* <> +* <> + +// follow +include::follow/put-follow.asciidoc[] +include::follow/post-pause-follow.asciidoc[] +include::follow/post-resume-follow.asciidoc[] +include::follow/post-unfollow.asciidoc[] +include::follow/get-follow-stats.asciidoc[] + +// auto-follow +include::auto-follow/put-auto-follow-pattern.asciidoc[] +include::auto-follow/delete-auto-follow-pattern.asciidoc[] +include::auto-follow/get-auto-follow-pattern.asciidoc[] +include::auto-follow/get-auto-follow-stats.asciidoc[] diff --git a/docs/reference/ccr/apis/follow-request-body.asciidoc b/docs/reference/ccr/apis/follow-request-body.asciidoc new file mode 100644 index 0000000000000..ad98ce25e576e --- /dev/null +++ b/docs/reference/ccr/apis/follow-request-body.asciidoc @@ -0,0 +1,30 @@ +`max_batch_operation_count`:: + (integer) the maximum number of operations to pull per fetch from the remote + cluster + +`max_concurrent_read_batches`:: + (long) the maximum number of concurrent fetches from the remote cluster + +`max_batch_size`:: + (<>) the maximum size in bytes of batches pulled per + fetch from the remote cluster + +`max_concurrent_write_batches`:: + (integer) the maximum number of concurrent writes on the following index + +`max_write_buffer_size`:: + (integer) the maximum number of operations that can be queued for writing; + when this limit is reached, fetches from the remote cluster will be + deferred until the number of queued operations goes below the limit + +`max_retry_delay`:: + (<>) the maximum time to wait before retrying an + operation that failed exceptionally; an exponential backoff strategy is + employed when retrying + +`poll_timeout`:: + (<>) the maximum time to wait for new operations on the + remote cluster when the follower index is synchronized with the leader index; + when the timeout has elapsed, the poll for operations will return to the + follower so that it can update some statistics, and then the follower will + immediately attempt to fetch from the leader again \ No newline at end of file diff --git a/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc b/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc new file mode 100644 index 0000000000000..65ba1510d6b12 --- /dev/null +++ b/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc @@ -0,0 +1,245 @@ +[role="xpack"] +[testenv="platinum"] +[[ccr-get-follow-stats]] +=== Get Follower Stats API +++++ +Get Follower Stats +++++ + +Get follower stats. + +==== Description + +This API gets follower stats. This API will return shard-level stats about the +following tasks associated with each shard for the specified indices. + +==== Request + +////////////////////////// + +[source,js] +-------------------------------------------------- +PUT /follower_index/_ccr/follow +{ + "leader_cluster" : "leader_cluster", + "leader_index" : "leader_index" +} +-------------------------------------------------- +// CONSOLE +// TESTSETUP +// TEST[setup:leader_cluster_and_leader_index] + +[source,js] +-------------------------------------------------- +POST /follower_index/_ccr/pause_follow +-------------------------------------------------- +// CONSOLE +// TEARDOWN + +////////////////////////// + +[source,js] +-------------------------------------------------- +GET /_ccr/stats +-------------------------------------------------- +// CONSOLE +// TEST + +Here, all follower indices will have their follower stats returned. + +[source,js] +-------------------------------------------------- +GET //_ccr/stats +-------------------------------------------------- +// CONSOLE +// TEST[s//follower_index/] + +Here, `` is a comma-delimited list of index patterns that will be matched +against follower indices to retrieve follower stats for. + +==== Results + +This API returns the following information: + +`indices`:: + (array) an array of follower index statistics + +The `indices` array consists of objects containing two fields: + +`indices[].index`:: + (string) the name of the follower index + +`indices[].shards`:: + (array) an array of shard-level following task statistics + +The `shards` array consists of objects containing the following fields: + +`indices[].shards[].leader_cluster`:: + (string) the > containing the leader + index + +`indices[].shards[].leader_index`:: + (string) the name of the index in the leader cluster being followed + +`indices[].shards[].follower_index`:: + (string) the name of the follower index + +`indices[].shards[].shard_id`:: + (integer) the numerical shard ID, with values from 0 to one less than the + number of replicas + +`indices[].shards[].leader_global_checkpoint`:: + (long) the current global checkpoint on the leader known to the follower task + +`indices[].shards[].leader_max_seq_no`:: + (long) the current maximum sequence number on the leader known to the follower + task + +`indices[].shards[].follower_global_checkpoint`:: + (long) the current global checkpoint on the follower; the difference between the + `leader_global_checkpoint` and the `follower_global_checkpoint` is an + indication of how much the follower is lagging the leader + +`indices[].shards[].follower_max_seq_no`:: + (long) the current maximum sequence number on the follower + +`indices[].shards[].last_requested_seq_no`:: + (long) the starting sequence number of the last batch of operations requested + from the leader + +`indices[].shards[].number_of_concurrent_reads`:: + (integer) the number of active fetches + +`indices[].shards[].number_of_concurrent_writes`:: + (integer) the number of active writes + +`indices[].shards[].number_of_queued_writes`:: + (integer) the number of write operations queued on the follower + +`indices[].shards[].mapping_version`:: + (long) the mapping version on the follower + +`indices[].shards[].total_fetch_time_millis`:: + (long) the total time fetches were outstanding, measured from the time a fetch + was sent to the leader to the time a reply was returned to the follower + +`indices[].shards[].number_of_successful_fetches`:: + (long) the number of successful fetches + +`indices[].shards[].number_of_failed_fetches`:: + (long) the number of failed fetches + +`indices[].shards[].operations_received`:: + (long) the total number of operations received from the leader + +`indices[].shards[].total_transferred_bytes`:: + (long) the total of transferred bytes received from the leader (note this is + only an estimate and does not account for compression if enabled) + +`indices[].shards[].total_index_time_millis`:: + (long) the total time spent indexing on the follower + +`indices[].shards[].number_of_successful_bulk_operations`:: + (long) the number of bulk operations executed on the follower + +`indices[].shards[].number_of_failed_bulk_operations`:: + (long) the number of failed operations executed on the follower + +`indices[].shards[].number_of_operations_indexed`:: + (long) the number of operations indexed on the follower + +`indices[].shards[].fetch_exceptions`:: + (array) an array of objects representing failed fetches + +The `fetch_exceptions` array consists of objects containing the following +fields: + +`indices[].shards[].fetch_exceptions[].from_seq_no`:: + (long) the starting sequence number of the batch requested from the leader + +`indices[].shards[].fetch_exceptions[].retries`:: + (integer) the number of times the batch has been retried + +`indices[].shards[].fetch_exceptions[].exception`:: + (object) represents the exception that caused the fetch to fail + +Continuing with the fields from `shards`: + +`indices[].shards[].time_since_last_fetch_millis`:: + (long) the number of milliseconds since a fetch request was sent to the + leader; note that when the follower is caught up to the leader, this number + will increase up to the configured `poll_timeout` at which point another fetch + request will be sent to the leader + +`indices[].fatal_exception`:: + (object) an object representing a fatal exception that cancelled the following + task; in this situation, the following task must be resumed manually with the + <> + +==== Example + +[source,js] +-------------------------------------------------- +GET /_ccr/stats +-------------------------------------------------- +// CONSOLE +// TEST + +The API returns the following results: +[source,js] +-------------------------------------------------- +{ + "indices" : [ + { + "index" : "follower_index", + "shards" : [ + { + "leader_cluster" : "leader_cluster", + "leader_index" : "leader_index", + "follower_index" : "follower_index", + "shard_id" : 0, + "leader_global_checkpoint" : 1024, + "leader_max_seq_no" : 1536, + "follower_global_checkpoint" : 768, + "follower_max_seq_no" : 896, + "last_requested_seq_no" : 897, + "number_of_concurrent_reads" : 8, + "number_of_concurrent_writes" : 2, + "number_of_queued_writes" : 64, + "mapping_version" : 4, + "total_fetch_time_millis" : 17415, + "number_of_successful_fetches" : 32, + "number_of_failed_fetches" : 0, + "operations_received" : 896, + "total_transferred_bytes" : 32768, + "total_index_time_millis" : 16384, + "number_of_successful_bulk_operations" : 16, + "number_of_failed_bulk_operations" : 0, + "number_of_operations_indexed" : 832, + "fetch_exceptions" : [ ], + "time_since_last_fetch_millis" : 8 + } + ] + } + ] +} +-------------------------------------------------- +// TESTRESPONSE[s/"leader_global_checkpoint" : 1024/"leader_global_checkpoint" : $body.indices.0.shards.0.leader_global_checkpoint/] +// TESTRESPONSE[s/"leader_max_seq_no" : 1536/"leader_max_seq_no" : $body.indices.0.shards.0.leader_max_seq_no/] +// TESTRESPONSE[s/"follower_global_checkpoint" : 768/"follower_global_checkpoint" : $body.indices.0.shards.0.follower_global_checkpoint/] +// TESTRESPONSE[s/"follower_max_seq_no" : 896/"follower_max_seq_no" : $body.indices.0.shards.0.follower_max_seq_no/] +// TESTRESPONSE[s/"last_requested_seq_no" : 897/"last_requested_seq_no" : $body.indices.0.shards.0.last_requested_seq_no/] +// TESTRESPONSE[s/"number_of_concurrent_reads" : 8/"number_of_concurrent_reads" : $body.indices.0.shards.0.number_of_concurrent_reads/] +// TESTRESPONSE[s/"number_of_concurrent_writes" : 2/"number_of_concurrent_writes" : $body.indices.0.shards.0.number_of_concurrent_writes/] +// TESTRESPONSE[s/"number_of_queued_writes" : 64/"number_of_queued_writes" : $body.indices.0.shards.0.number_of_queued_writes/] +// TESTRESPONSE[s/"mapping_version" : 4/"mapping_version" : $body.indices.0.shards.0.mapping_version/] +// TESTRESPONSE[s/"total_fetch_time_millis" : 17415/"total_fetch_time_millis" : $body.indices.0.shards.0.total_fetch_time_millis/] +// TESTRESPONSE[s/"number_of_successful_fetches" : 32/"number_of_successful_fetches" : $body.indices.0.shards.0.number_of_successful_fetches/] +// TESTRESPONSE[s/"number_of_failed_fetches" : 0/"number_of_failed_fetches" : $body.indices.0.shards.0.number_of_failed_fetches/] +// TESTRESPONSE[s/"operations_received" : 896/"operations_received" : $body.indices.0.shards.0.operations_received/] +// TESTRESPONSE[s/"total_transferred_bytes" : 32768/"total_transferred_bytes" : $body.indices.0.shards.0.total_transferred_bytes/] +// TESTRESPONSE[s/"total_index_time_millis" : 16384/"total_index_time_millis" : $body.indices.0.shards.0.total_index_time_millis/] +// TESTRESPONSE[s/"number_of_successful_bulk_operations" : 16/"number_of_successful_bulk_operations" : $body.indices.0.shards.0.number_of_successful_bulk_operations/] +// TESTRESPONSE[s/"number_of_failed_bulk_operations" : 0/"number_of_failed_bulk_operations" : $body.indices.0.shards.0.number_of_failed_bulk_operations/] +// TESTRESPONSE[s/"number_of_operations_indexed" : 832/"number_of_operations_indexed" : $body.indices.0.shards.0.number_of_operations_indexed/] +// TESTRESPONSE[s/"time_since_last_fetch_millis" : 8/"time_since_last_fetch_millis" : $body.indices.0.shards.0.time_since_last_fetch_millis/] diff --git a/docs/reference/ccr/apis/follow/post-pause-follow.asciidoc b/docs/reference/ccr/apis/follow/post-pause-follow.asciidoc new file mode 100644 index 0000000000000..92061adecdf68 --- /dev/null +++ b/docs/reference/ccr/apis/follow/post-pause-follow.asciidoc @@ -0,0 +1,65 @@ +[role="xpack"] +[testenv="platinum"] +[[ccr-post-pause-follow]] +=== Pause Follower API +++++ +Pause Follower +++++ + +Pauses a follower index. + +==== Description + +This API pauses a follower index. When this API returns, the follower index will +not fetch any additional operations from the leader index. You can resume +following with the <>. Pausing and +resuming a follower index can be used to change the configuration of the +following task. + +==== Request + +////////////////////////// + +[source,js] +-------------------------------------------------- +PUT /follower_index/_ccr/follow +{ + "leader_cluster" : "leader_cluster", + "leader_index" : "leader_index" +} +-------------------------------------------------- +// CONSOLE +// TESTSETUP +// TEST[setup:leader_cluster_and_leader_index] + +////////////////////////// + +[source,js] +-------------------------------------------------- +POST //_ccr/pause_follow +-------------------------------------------------- +// CONSOLE +// TEST[s//follower_index/] + +Here, `` is the name of the follower index to pause. + +==== Example + +The following is an example of using the pause follower API. + +[source,js] +-------------------------------------------------- +POST /follower_index/_ccr/pause_follow +-------------------------------------------------- +// CONSOLE +// TEST + +The API returns the following result: + +[source,js] +-------------------------------------------------- +{ + "acknowledged" : true +} +-------------------------------------------------- +// TESTRESPONSE diff --git a/docs/reference/ccr/apis/follow/post-resume-follow.asciidoc b/docs/reference/ccr/apis/follow/post-resume-follow.asciidoc new file mode 100644 index 0000000000000..ccf2140b8918b --- /dev/null +++ b/docs/reference/ccr/apis/follow/post-resume-follow.asciidoc @@ -0,0 +1,93 @@ +[role="xpack"] +[testenv="platinum"] +[[ccr-post-resume-follow]] +=== Resume Follower API +++++ +Resume Follower +++++ + +Resumes a follower index. + +==== Description + +This API resumes a follower index that has been paused either explicitly with +the <> or implicitly due to +execution that can not be retried due to failure during following. When this API +returns, the follower index will resume fetching operations from the leader index. + +==== Request + +////////////////////////// + +[source,js] +-------------------------------------------------- +PUT /follower_index/_ccr/follow +{ + "leader_cluster" : "leader_cluster", + "leader_index" : "leader_index" +} + +POST /follower_index/_ccr/pause_follow +-------------------------------------------------- +// CONSOLE +// TESTSETUP +// TEST[setup:leader_cluster_and_leader_index] + +[source,js] +-------------------------------------------------- +POST /follower_index/_ccr/pause_follow +-------------------------------------------------- +// CONSOLE +// TEARDOWN + +////////////////////////// + +[source,js] +-------------------------------------------------- +POST //_ccr/resume_follow +{ + "leader_cluster" : "", + "leader_index" : "" +} +-------------------------------------------------- +// CONSOLE +// TEST[s//follower_index/] +// TEST[s//leader_cluster/] +// TEST[s//leader_index/] + +Here, `` is the name of the follower index to resume. + +==== Request Body +`leader_cluster`:: + (required string) the <> containing the leader + index + +`leader_index`:: + (required string) the name of the index in the leader cluster to follow + +include::../follow-request-body.asciidoc[] + +==== Example + +The following is an example of using the resume follower API. + +[source,js] +-------------------------------------------------- +POST /follower_index/_ccr/resume_follow +{ + "leader_cluster" : "leader_cluster", + "leader_index" : "leader_index" +} +-------------------------------------------------- +// CONSOLE +// TEST + +The API returns the following result: + +[source,js] +-------------------------------------------------- +{ + "acknowledged" : true +} +-------------------------------------------------- +// TESTRESPONSE diff --git a/docs/reference/ccr/apis/follow/post-unfollow.asciidoc b/docs/reference/ccr/apis/follow/post-unfollow.asciidoc new file mode 100644 index 0000000000000..0d70def0ddf7c --- /dev/null +++ b/docs/reference/ccr/apis/follow/post-unfollow.asciidoc @@ -0,0 +1,73 @@ +[role="xpack"] +[testenv="platinum"] +[[ccr-post-unfollow]] +=== Unfollow API +++++ +Unfollow +++++ + +Converts a follower index to a regular index. + +==== Description + +This API stops the following task associated with a follower index and removes +index metadata and settings associated with {ccr}. This enables the index to +treated as a regular index. The follower index must be paused and closed before +invoking the unfollow API. + +NOTE: Currently {ccr} does not support converting an existing regular index to a +follower index. Converting a follower index to a regular index is an +irreversible operation. + +==== Request + +////////////////////////// + +[source,js] +-------------------------------------------------- +PUT /follower_index/_ccr/follow +{ + "leader_cluster" : "leader_cluster", + "leader_index" : "leader_index" +} + +POST /follower_index/_ccr/pause_follow + +POST /follower_index/_close +-------------------------------------------------- +// CONSOLE +// TESTSETUP +// TEST[setup:leader_cluster_and_leader_index] + +////////////////////////// + +[source,js] +-------------------------------------------------- +POST //_ccr/unfollow +-------------------------------------------------- +// CONSOLE +// TEST[s//follower_index/] + +Here, `` is the name of the follower index to convert to a +regular index. + +==== Example + +The following is an example of using the unfollow API. + +[source,js] +-------------------------------------------------- +POST /follower_index/_ccr/unfollow +-------------------------------------------------- +// CONSOLE +// TEST + +The API returns the following result: + +[source,js] +-------------------------------------------------- +{ + "acknowledged" : true +} +-------------------------------------------------- +// TESTRESPONSE diff --git a/docs/reference/ccr/apis/follow/put-follow.asciidoc b/docs/reference/ccr/apis/follow/put-follow.asciidoc new file mode 100644 index 0000000000000..bf34517254dac --- /dev/null +++ b/docs/reference/ccr/apis/follow/put-follow.asciidoc @@ -0,0 +1,85 @@ +[role="xpack"] +[testenv="platinum"] +[[ccr-put-follow]] +=== Create Follower API +++++ +Create Follower +++++ + +Creates a follower index. + +==== Description + +This API creates a new follower index that is configured to follow the +referenced leader index. When this API returns, the follower index exists, and +{ccr} will start replicating operations from the leader index to the follower +index. + +==== Request + +////////////////////////// + +[source,js] +-------------------------------------------------- +POST /follower_index/_ccr/pause_follow +-------------------------------------------------- +// CONSOLE +// TEARDOWN + +////////////////////////// + +[source,js] +-------------------------------------------------- +PUT //_ccr/follow +{ + "leader_cluster" : "", + "leader_index" : "" +} +-------------------------------------------------- +// CONSOLE +// TEST[setup:leader_cluster_and_leader_index] +// TEST[s//follower_index/] +// TEST[s//leader_cluster/] +// TEST[s//leader_index/] + +Here, `` is the name of the follower index to create, +`` is the name of the +< containing the leader index, and +`` is the name of the leader index in that remote cluster. + +==== Request Body +`leader_cluster`:: + (required string) the <> containing the leader + index + +`leader_index`:: + (required string) the name of the index in the leader cluster to follow + +include::../follow-request-body.asciidoc[] + +==== Example + +The following is an example of using the create follower API. + +[source,js] +-------------------------------------------------- +PUT /follower_index/_ccr/follow +{ + "leader_cluster" : "leader_cluster", + "leader_index" : "leader_index" +} +-------------------------------------------------- +// CONSOLE +// TEST[setup:leader_cluster_and_leader_index] + +The API returns the following result: + +[source,js] +-------------------------------------------------- +{ + "follow_index_created" : true, + "follow_index_shards_acked" : true, + "index_following_started" : true +} +-------------------------------------------------- +// TESTRESPONSE diff --git a/docs/reference/ccr/getting-started.asciidoc b/docs/reference/ccr/getting-started.asciidoc new file mode 100644 index 0000000000000..daa6f298e5ff7 --- /dev/null +++ b/docs/reference/ccr/getting-started.asciidoc @@ -0,0 +1,6 @@ +[role="xpack"] +[testenv="platinum"] +[[ccr-getting-started]] +== Getting Started + +This is the getting started section of the {ccr} docs. \ No newline at end of file diff --git a/docs/reference/ccr/index.asciidoc b/docs/reference/ccr/index.asciidoc new file mode 100644 index 0000000000000..1d5e9445a7b1d --- /dev/null +++ b/docs/reference/ccr/index.asciidoc @@ -0,0 +1,15 @@ +[role="xpack"] +[testenv="platinum"] +[[xpack-ccr]] += Cross-cluster replication + +[partintro] +-- + +* <> +* <> + +-- + +include::overview.asciidoc[] +include::getting-started.asciidoc[] diff --git a/docs/reference/ccr/overview.asciidoc b/docs/reference/ccr/overview.asciidoc new file mode 100644 index 0000000000000..648a981bc5bdb --- /dev/null +++ b/docs/reference/ccr/overview.asciidoc @@ -0,0 +1,6 @@ +[role="xpack"] +[testenv="platinum"] +[[ccr-overview]] +== Overview + +This is the overview section of the {ccr} docs. diff --git a/docs/reference/index.asciidoc b/docs/reference/index.asciidoc index 216983bc6f01d..dd841fccda761 100644 --- a/docs/reference/index.asciidoc +++ b/docs/reference/index.asciidoc @@ -55,6 +55,8 @@ include::index-modules.asciidoc[] include::ingest.asciidoc[] +include::ccr/index.asciidoc[] + include::sql/index.asciidoc[] include::monitoring/index.asciidoc[] diff --git a/docs/reference/rest-api/index.asciidoc b/docs/reference/rest-api/index.asciidoc index c6243ab25981b..5aef27e127500 100644 --- a/docs/reference/rest-api/index.asciidoc +++ b/docs/reference/rest-api/index.asciidoc @@ -8,6 +8,7 @@ directly to configure and access {xpack} features. * <> +* <> * <> * <> * <> @@ -19,6 +20,7 @@ directly to configure and access {xpack} features. include::info.asciidoc[] +include::{es-repo-dir}/ccr/apis/ccr-apis.asciidoc[] include::{es-repo-dir}/graph/explore.asciidoc[] include::{es-repo-dir}/licensing/index.asciidoc[] include::{es-repo-dir}/migration/migration.asciidoc[] diff --git a/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java index 8c7cb27101096..f80012c75e37b 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java @@ -52,6 +52,7 @@ import org.junit.After; import org.junit.AfterClass; import org.junit.Before; +import org.mockito.internal.stubbing.answers.Returns; import javax.net.ssl.SSLContext; @@ -387,6 +388,7 @@ private void wipeCluster() throws Exception { wipeRollupJobs(); waitForPendingRollupTasks(); } + } /** @@ -474,6 +476,10 @@ private void waitForPendingRollupTasks() throws Exception { waitForPendingTasks(adminClient(), taskName -> taskName.startsWith("xpack/rollup/job") == false); } + private void waitForPendingCcrTasks() { + //waitForPendingTasks(adminClient(), taskName -> taskName.startsWith("")); + } + /** * Logs a message if there are still running tasks. The reasoning is that any tasks still running are state the is trying to bleed into * other tests. From d8fd650ee1f3077324d5d6ed209804dcd21d9d81 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Mon, 22 Oct 2018 20:15:42 -0400 Subject: [PATCH 02/12] Remove unused method --- .../main/java/org/elasticsearch/test/rest/ESRestTestCase.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java index f80012c75e37b..f8e689f732b27 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java @@ -476,10 +476,6 @@ private void waitForPendingRollupTasks() throws Exception { waitForPendingTasks(adminClient(), taskName -> taskName.startsWith("xpack/rollup/job") == false); } - private void waitForPendingCcrTasks() { - //waitForPendingTasks(adminClient(), taskName -> taskName.startsWith("")); - } - /** * Logs a message if there are still running tasks. The reasoning is that any tasks still running are state the is trying to bleed into * other tests. From a43ee461a6b2b73667d73fe8e90e0d3fb76c6daa Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Mon, 22 Oct 2018 20:15:57 -0400 Subject: [PATCH 03/12] Remove unused import --- .../main/java/org/elasticsearch/test/rest/ESRestTestCase.java | 1 - 1 file changed, 1 deletion(-) diff --git a/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java index f8e689f732b27..21f64c7ebac26 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java @@ -52,7 +52,6 @@ import org.junit.After; import org.junit.AfterClass; import org.junit.Before; -import org.mockito.internal.stubbing.answers.Returns; import javax.net.ssl.SSLContext; From 5b1fcbf26adfa901e7e244ac607ca308408d431c Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Mon, 22 Oct 2018 20:16:22 -0400 Subject: [PATCH 04/12] Revert whitespace change --- .../main/java/org/elasticsearch/test/rest/ESRestTestCase.java | 1 - 1 file changed, 1 deletion(-) diff --git a/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java index 21f64c7ebac26..8c7cb27101096 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java @@ -387,7 +387,6 @@ private void wipeCluster() throws Exception { wipeRollupJobs(); waitForPendingRollupTasks(); } - } /** From bcfcb88af1dbab7dde2e4e9cdbe39201bda88ce4 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Tue, 23 Oct 2018 14:25:48 -0400 Subject: [PATCH 05/12] Adjust to API changes --- .../delete-auto-follow-pattern.asciidoc | 8 ++-- .../get-auto-follow-pattern.asciidoc | 20 +++++----- .../put-auto-follow-pattern.asciidoc | 39 +++++++++++++------ .../ccr/apis/follow/get-follow-stats.asciidoc | 6 ++- 4 files changed, 45 insertions(+), 28 deletions(-) diff --git a/docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc b/docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc index 897751a02e8ea..a04b2ab810d4f 100644 --- a/docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc +++ b/docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc @@ -18,7 +18,7 @@ This API deletes configured auto-follow patterns. [source,js] -------------------------------------------------- -PUT /_ccr/auto_follow/leader_cluster +PUT /_ccr/auto_follow/my_auto_follow_pattern { "leader_cluster" : "leader_cluster", "leader_index_patterns" : @@ -36,10 +36,10 @@ PUT /_ccr/auto_follow/leader_cluster [source,js] -------------------------------------------------- -DELETE /_ccr/auto_follow/ +DELETE /_ccr/auto_follow/ -------------------------------------------------- // CONSOLE -// TEST[s//leader_cluster/] +// TEST[s//my_auto_follow_pattern/] Here, the auto-follow patterns associated with the <> specified by `` @@ -51,7 +51,7 @@ The following is an example of using the delete auto-follow pattern API. [source,js] -------------------------------------------------- -DELETE /_ccr/auto_follow/leader_cluster +DELETE /_ccr/auto_follow/my_auto_follow_pattern -------------------------------------------------- // CONSOLE // TEST[setup:leader_cluster] diff --git a/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc b/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc index efea619d4daad..5611b9e6999db 100644 --- a/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc +++ b/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc @@ -11,7 +11,7 @@ Get auto-follow patterns. ==== Description This API gets configured auto-follow patterns. This API will return the -configured auto-follow patterns on a per-cluster basis. +specified auto-follow pattern collection. ==== Request @@ -19,7 +19,7 @@ configured auto-follow patterns on a per-cluster basis. [source,js] -------------------------------------------------- -PUT /_ccr/auto_follow/leader_cluster +PUT /_ccr/auto_follow/my_auto_follow_pattern { "leader_cluster" : "leader_cluster", "leader_index_patterns" : @@ -35,7 +35,7 @@ PUT /_ccr/auto_follow/leader_cluster [source,js] -------------------------------------------------- -DELETE /_ccr/auto_follow/leader_cluster +DELETE /_ccr/auto_follow/my_auto_follow_pattern -------------------------------------------------- // CONSOLE // TEST @@ -53,14 +53,13 @@ Here, all auto-follow patterns will be returned. [source,js] -------------------------------------------------- -GET /_ccr/auto_follow/ +GET /_ccr/auto_follow/ -------------------------------------------------- // CONSOLE -// TEST[s//leader_cluster/] +// TEST[s//my_auto_follow_pattern/] -Here, all auto-follow patterns configured for the -<> specified by `` -will be returned. +Here, the named auto-follow pattern collection specified by +`` will be returned. ==== Example @@ -68,7 +67,7 @@ The following is an example of using the get auto-follow pattern API. [source,js] -------------------------------------------------- -GET /_ccr/auto_follow/leader_cluster +GET /_ccr/auto_follow/my_auto_follow_pattern -------------------------------------------------- // CONSOLE // TEST[setup:leader_cluster] @@ -78,8 +77,9 @@ The API returns the following result: [source,js] -------------------------------------------------- { - "leader_cluster" : + "my_auto_follow_pattern" : { + "leader_cluster" : "leader_cluster", "leader_index_patterns" : [ "leader_index*" diff --git a/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc b/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc index 04eb2283f2c87..b778482f0b066 100644 --- a/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc +++ b/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc @@ -10,15 +10,16 @@ Creates an auto-follow pattern. ==== Description -This API creates a new collection of auto-follow patterns against the specified -remote cluster. Newly created indices on the remote cluster matching any of the specified -patterns will be automatically configured as follower indices. +This API creates a new named collection of auto-follow patterns against the +remote cluster specified in the request body. Newly created indices on the +remote cluster matching any of the specified patterns will be automatically +configured as follower indices. ==== Request [source,js] -------------------------------------------------- -PUT /_ccr/auto_follow/ +PUT /_ccr/auto_follow/ { "leader_cluster" : "", "leader_index_patterns" : @@ -30,16 +31,30 @@ PUT /_ccr/auto_follow/ -------------------------------------------------- // CONSOLE // TEST[setup:leader_cluster] +// TEST[s//auto_follow_pattern_name/] // TEST[s//leader_cluster/] // TEST[s//leader_index*/] // TEST[s//{{leader_index}}-follower/] -Here, `` is the <> -containing the leader indices to match against, `` is a -simple index pattern to match against indices in the remote cluster, and -`` is the pattern to use to name the resulting follower -indices. The `` can use the template `{{leader_index}}` to -refer to the name of the leader index being followed. +////////////////////////// + +[source,js] +-------------------------------------------------- +DELETE /_ccr/auto_follow/auto_follow_pattern_name +-------------------------------------------------- +// CONSOLE +// TEST[continued] + +////////////////////////// + +Here, `` is a user-chosen name for the collection of +auto-follow patterns being created, `` is the +<> containing the leader indices to +match against, `` is a simple index pattern to match +against indices in the remote cluster, and `` is the +pattern to use to name the resulting follower indices. The +`` can use the template `{{leader_index}}` to refer to the +name of the leader index being followed. ==== Request Body `leader_cluster`:: @@ -63,7 +78,7 @@ The following is an example of using the create auto-follow pattern API. [source,js] -------------------------------------------------- -PUT /_ccr/auto_follow/leader_cluster +PUT /_ccr/auto_follow/my_auto_follow_pattern { "leader_cluster" : "leader_cluster", "leader_index_patterns" : @@ -90,7 +105,7 @@ The API returns the following result: [source,js] -------------------------------------------------- -DELETE /_ccr/auto_follow/leader_cluster +DELETE /_ccr/auto_follow/my_auto_follow_pattern -------------------------------------------------- // CONSOLE // TEST[continued] diff --git a/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc b/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc index 65ba1510d6b12..4947fe0f91d32 100644 --- a/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc +++ b/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc @@ -207,7 +207,8 @@ The API returns the following results: "number_of_concurrent_writes" : 2, "number_of_queued_writes" : 64, "mapping_version" : 4, - "total_fetch_time_millis" : 17415, + "total_fetch_time_millis" : 32768, + "total_fetch_leader_time_millis" : 16384, "number_of_successful_fetches" : 32, "number_of_failed_fetches" : 0, "operations_received" : 896, @@ -233,7 +234,8 @@ The API returns the following results: // TESTRESPONSE[s/"number_of_concurrent_writes" : 2/"number_of_concurrent_writes" : $body.indices.0.shards.0.number_of_concurrent_writes/] // TESTRESPONSE[s/"number_of_queued_writes" : 64/"number_of_queued_writes" : $body.indices.0.shards.0.number_of_queued_writes/] // TESTRESPONSE[s/"mapping_version" : 4/"mapping_version" : $body.indices.0.shards.0.mapping_version/] -// TESTRESPONSE[s/"total_fetch_time_millis" : 17415/"total_fetch_time_millis" : $body.indices.0.shards.0.total_fetch_time_millis/] +// TESTRESPONSE[s/"total_fetch_time_millis" : 32768/"total_fetch_time_millis" : $body.indices.0.shards.0.total_fetch_time_millis/] +// TESTRESPONSE[s/"total_fetch_leader_time_millis" : 16384/"total_fetch_leader_time_millis" : $body.indices.0.shards.0.total_fetch_leader_time_millis/] // TESTRESPONSE[s/"number_of_successful_fetches" : 32/"number_of_successful_fetches" : $body.indices.0.shards.0.number_of_successful_fetches/] // TESTRESPONSE[s/"number_of_failed_fetches" : 0/"number_of_failed_fetches" : $body.indices.0.shards.0.number_of_failed_fetches/] // TESTRESPONSE[s/"operations_received" : 896/"operations_received" : $body.indices.0.shards.0.operations_received/] From c3c86a48a50e2e7a83e226a2c5dbc25686463a70 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Tue, 23 Oct 2018 16:24:55 -0400 Subject: [PATCH 06/12] Add definition --- docs/reference/ccr/apis/follow/get-follow-stats.asciidoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc b/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc index 4947fe0f91d32..8b70fe0fe3b68 100644 --- a/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc +++ b/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc @@ -123,6 +123,9 @@ The `shards` array consists of objects containing the following fields: (long) the total time fetches were outstanding, measured from the time a fetch was sent to the leader to the time a reply was returned to the follower +`indices[].shards[].total_fetch_leader_time_millis`:: + (long) the total time fetches spent executing on the remote cluster + `indices[].shards[].number_of_successful_fetches`:: (long) the number of successful fetches From 6fbe1cdb9a863d276a67814a88d71c635eb38d09 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Thu, 25 Oct 2018 17:39:52 -0400 Subject: [PATCH 07/12] Apply feedback --- .../delete-auto-follow-pattern.asciidoc | 11 +++++----- .../get-auto-follow-pattern.asciidoc | 12 ++++++----- .../get-auto-follow-stats.asciidoc | 4 +--- .../put-auto-follow-pattern.asciidoc | 13 ++++-------- .../ccr/apis/follow/get-follow-stats.asciidoc | 11 +++++----- .../apis/follow/post-pause-follow.asciidoc | 7 +++++-- .../apis/follow/post-resume-follow.asciidoc | 15 +++++++------ .../ccr/apis/follow/post-unfollow.asciidoc | 8 ++++--- .../ccr/apis/follow/put-follow.asciidoc | 21 +++++++++---------- 9 files changed, 52 insertions(+), 50 deletions(-) diff --git a/docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc b/docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc index a04b2ab810d4f..c4bf8b34866ee 100644 --- a/docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc +++ b/docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc @@ -10,7 +10,7 @@ Delete auto-follow patterns. ==== Description -This API deletes configured auto-follow patterns. +This API deletes a configured auto-follow pattern collection. ==== Request @@ -41,13 +41,14 @@ DELETE /_ccr/auto_follow/ // CONSOLE // TEST[s//my_auto_follow_pattern/] -Here, the auto-follow patterns associated with the -<> specified by `` -will be deleted. +==== Path Components +`auto_follow_pattern_name` (required):: + (string) specifies the auto-follow pattern collection to delete ==== Example -The following is an example of using the delete auto-follow pattern API. +This example deletes an auto-follow pattern collection named +`my_auto_follow_pattern`: [source,js] -------------------------------------------------- diff --git a/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc b/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc index 5611b9e6999db..0905e86dd6bd0 100644 --- a/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc +++ b/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc @@ -49,8 +49,6 @@ GET /_ccr/auto_follow/ -------------------------------------------------- // CONSOLE -Here, all auto-follow patterns will be returned. - [source,js] -------------------------------------------------- GET /_ccr/auto_follow/ @@ -58,12 +56,16 @@ GET /_ccr/auto_follow/ // CONSOLE // TEST[s//my_auto_follow_pattern/] -Here, the named auto-follow pattern collection specified by -`` will be returned. +==== Path Components +`auto_follow_pattern_name`:: + (string) specifies the auto-follow pattern collection that you want to + retrieve; if you do not specify a name, the API returns information for all + collections ==== Example -The following is an example of using the get auto-follow pattern API. +This example retrieves information about an auto-follow pattern collection +named `my_auto_follow_pattern`: [source,js] -------------------------------------------------- diff --git a/docs/reference/ccr/apis/auto-follow/get-auto-follow-stats.asciidoc b/docs/reference/ccr/apis/auto-follow/get-auto-follow-stats.asciidoc index f9bba00a1cde6..85c6775af1cab 100644 --- a/docs/reference/ccr/apis/auto-follow/get-auto-follow-stats.asciidoc +++ b/docs/reference/ccr/apis/auto-follow/get-auto-follow-stats.asciidoc @@ -21,11 +21,9 @@ GET /_ccr/auto_follow/stats // CONSOLE // TEST -Here, stats about auto-follow patterns will be returned. - ==== Example -The following is an example of using the get auto-follow stats API. +This example retrieves stats about auto-follow patterns: [source,js] -------------------------------------------------- diff --git a/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc b/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc index b778482f0b066..736302ad8049c 100644 --- a/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc +++ b/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc @@ -47,14 +47,9 @@ DELETE /_ccr/auto_follow/auto_follow_pattern_name ////////////////////////// -Here, `` is a user-chosen name for the collection of -auto-follow patterns being created, `` is the -<> containing the leader indices to -match against, `` is a simple index pattern to match -against indices in the remote cluster, and `` is the -pattern to use to name the resulting follower indices. The -`` can use the template `{{leader_index}}` to refer to the -name of the leader index being followed. +==== Path Components +`auto_follow_pattern_name` (required):: + (string) name of the collection of auto-follow patterns ==== Request Body `leader_cluster`:: @@ -74,7 +69,7 @@ include::../follow-request-body.asciidoc[] ==== Example -The following is an example of using the create auto-follow pattern API. +This example creates an auto-follow pattern named `my_auto_follow_pattern`: [source,js] -------------------------------------------------- diff --git a/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc b/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc index 8b70fe0fe3b68..77558c4b7170c 100644 --- a/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc +++ b/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc @@ -43,9 +43,6 @@ POST /follower_index/_ccr/pause_follow GET /_ccr/stats -------------------------------------------------- // CONSOLE -// TEST - -Here, all follower indices will have their follower stats returned. [source,js] -------------------------------------------------- @@ -54,8 +51,9 @@ GET //_ccr/stats // CONSOLE // TEST[s//follower_index/] -Here, `` is a comma-delimited list of index patterns that will be matched -against follower indices to retrieve follower stats for. +==== Path Components +`index` :: + (string) a comma-delimited list of index patterns ==== Results @@ -181,12 +179,13 @@ Continuing with the fields from `shards`: ==== Example +This example retrieves follower stats: + [source,js] -------------------------------------------------- GET /_ccr/stats -------------------------------------------------- // CONSOLE -// TEST The API returns the following results: [source,js] diff --git a/docs/reference/ccr/apis/follow/post-pause-follow.asciidoc b/docs/reference/ccr/apis/follow/post-pause-follow.asciidoc index 92061adecdf68..dcd03e669d33b 100644 --- a/docs/reference/ccr/apis/follow/post-pause-follow.asciidoc +++ b/docs/reference/ccr/apis/follow/post-pause-follow.asciidoc @@ -41,11 +41,14 @@ POST //_ccr/pause_follow // CONSOLE // TEST[s//follower_index/] -Here, `` is the name of the follower index to pause. +==== Path Components + +`follower_index` (required):: + (string) the name of the follower index ==== Example -The following is an example of using the pause follower API. +This example pauses a follower index named `follower_index`: [source,js] -------------------------------------------------- diff --git a/docs/reference/ccr/apis/follow/post-resume-follow.asciidoc b/docs/reference/ccr/apis/follow/post-resume-follow.asciidoc index ccf2140b8918b..fe1e5f6f50351 100644 --- a/docs/reference/ccr/apis/follow/post-resume-follow.asciidoc +++ b/docs/reference/ccr/apis/follow/post-resume-follow.asciidoc @@ -55,21 +55,24 @@ POST //_ccr/resume_follow // TEST[s//leader_cluster/] // TEST[s//leader_index/] -Here, `` is the name of the follower index to resume. +==== Path Components + +`follower_index` (required):: + (string) the name of the follower index ==== Request Body -`leader_cluster`:: - (required string) the <> containing the leader +`leader_cluster` (required):: + (string) the <> containing the leader index -`leader_index`:: - (required string) the name of the index in the leader cluster to follow +`leader_index` (required):: + (string) the name of the index in the leader cluster to follow include::../follow-request-body.asciidoc[] ==== Example -The following is an example of using the resume follower API. +This example resumes a follower index named `follower_index`: [source,js] -------------------------------------------------- diff --git a/docs/reference/ccr/apis/follow/post-unfollow.asciidoc b/docs/reference/ccr/apis/follow/post-unfollow.asciidoc index 0d70def0ddf7c..936afcf115957 100644 --- a/docs/reference/ccr/apis/follow/post-unfollow.asciidoc +++ b/docs/reference/ccr/apis/follow/post-unfollow.asciidoc @@ -48,12 +48,14 @@ POST //_ccr/unfollow // CONSOLE // TEST[s//follower_index/] -Here, `` is the name of the follower index to convert to a -regular index. +==== Path Components + +`follower_index` (required):: + (string) the name of the follower index ==== Example -The following is an example of using the unfollow API. +This example converts `follower_index` from a follower index to a regular index: [source,js] -------------------------------------------------- diff --git a/docs/reference/ccr/apis/follow/put-follow.asciidoc b/docs/reference/ccr/apis/follow/put-follow.asciidoc index bf34517254dac..9caa235fa10f0 100644 --- a/docs/reference/ccr/apis/follow/put-follow.asciidoc +++ b/docs/reference/ccr/apis/follow/put-follow.asciidoc @@ -12,8 +12,7 @@ Creates a follower index. This API creates a new follower index that is configured to follow the referenced leader index. When this API returns, the follower index exists, and -{ccr} will start replicating operations from the leader index to the follower -index. +{ccr} starts replicating operations from the leader index to the follower index. ==== Request @@ -42,24 +41,24 @@ PUT //_ccr/follow // TEST[s//leader_cluster/] // TEST[s//leader_index/] -Here, `` is the name of the follower index to create, -`` is the name of the -< containing the leader index, and -`` is the name of the leader index in that remote cluster. +==== Path Components + +`follower_index` (required):: + (string) the name of the follower index ==== Request Body -`leader_cluster`:: - (required string) the <> containing the leader +`leader_cluster` (required):: + (string) the <> containing the leader index -`leader_index`:: - (required string) the name of the index in the leader cluster to follow +`leader_index` (required):: + (string) the name of the index in the leader cluster to follow include::../follow-request-body.asciidoc[] ==== Example -The following is an example of using the create follower API. +This example creates a follower index named `follower_index`: [source,js] -------------------------------------------------- From caf996ef0e24828f622ee70ecdb3b6b17b2eb88b Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Thu, 25 Oct 2018 21:55:51 -0400 Subject: [PATCH 08/12] Fixing docs tests after API changes --- docs/build.gradle | 6 +- .../delete-auto-follow-pattern.asciidoc | 6 +- .../get-auto-follow-pattern.asciidoc | 8 +- .../put-auto-follow-pattern.asciidoc | 14 +- .../ccr/apis/follow-request-body.asciidoc | 42 +++-- .../ccr/apis/follow/get-follow-stats.asciidoc | 151 +++++++++--------- .../apis/follow/post-pause-follow.asciidoc | 4 +- .../apis/follow/post-resume-follow.asciidoc | 28 ++-- .../ccr/apis/follow/post-unfollow.asciidoc | 4 +- .../ccr/apis/follow/put-follow.asciidoc | 12 +- 10 files changed, 146 insertions(+), 129 deletions(-) diff --git a/docs/build.gradle b/docs/build.gradle index 580e3a64ada97..99f82d95b585f 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -1082,15 +1082,15 @@ buildRestTests.setups['calendar_outages_addevent'] = buildRestTests.setups['cale ]} ''' -buildRestTests.setups['leader_cluster'] = buildRestTests.setups['host'] + ''' +buildRestTests.setups['remote_cluster'] = buildRestTests.setups['host'] + ''' - do: cluster.put_settings: body: persistent: - cluster.remote.leader_cluster.seeds: $transport_host + cluster.remote.remote_cluster.seeds: $transport_host ''' -buildRestTests.setups['leader_cluster_and_leader_index'] = buildRestTests.setups['leader_cluster'] + ''' +buildRestTests.setups['remote_cluster_and_leader_index'] = buildRestTests.setups['remote_cluster'] + ''' - do: indices.create: index: leader_index diff --git a/docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc b/docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc index c4bf8b34866ee..11b69b25164c8 100644 --- a/docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc +++ b/docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc @@ -20,7 +20,7 @@ This API deletes a configured auto-follow pattern collection. -------------------------------------------------- PUT /_ccr/auto_follow/my_auto_follow_pattern { - "leader_cluster" : "leader_cluster", + "remote_cluster" : "remote_cluster", "leader_index_patterns" : [ "leader_index" @@ -29,7 +29,7 @@ PUT /_ccr/auto_follow/my_auto_follow_pattern } -------------------------------------------------- // CONSOLE -// TEST[setup:leader_cluster] +// TEST[setup:remote_cluster] // TESTSETUP ////////////////////////// @@ -55,7 +55,7 @@ This example deletes an auto-follow pattern collection named DELETE /_ccr/auto_follow/my_auto_follow_pattern -------------------------------------------------- // CONSOLE -// TEST[setup:leader_cluster] +// TEST[setup:remote_cluster] The API returns the following result: diff --git a/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc b/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc index 0905e86dd6bd0..66ba5a819da26 100644 --- a/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc +++ b/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc @@ -21,7 +21,7 @@ specified auto-follow pattern collection. -------------------------------------------------- PUT /_ccr/auto_follow/my_auto_follow_pattern { - "leader_cluster" : "leader_cluster", + "remote_cluster" : "remote_cluster", "leader_index_patterns" : [ "leader_index*" @@ -30,7 +30,7 @@ PUT /_ccr/auto_follow/my_auto_follow_pattern } -------------------------------------------------- // CONSOLE -// TEST[setup:leader_cluster] +// TEST[setup:remote_cluster] // TESTSETUP [source,js] @@ -72,7 +72,7 @@ named `my_auto_follow_pattern`: GET /_ccr/auto_follow/my_auto_follow_pattern -------------------------------------------------- // CONSOLE -// TEST[setup:leader_cluster] +// TEST[setup:remote_cluster] The API returns the following result: @@ -81,7 +81,7 @@ The API returns the following result: { "my_auto_follow_pattern" : { - "leader_cluster" : "leader_cluster", + "remote_cluster" : "remote_cluster", "leader_index_patterns" : [ "leader_index*" diff --git a/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc b/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc index 736302ad8049c..8cda8238e613c 100644 --- a/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc +++ b/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc @@ -21,7 +21,7 @@ configured as follower indices. -------------------------------------------------- PUT /_ccr/auto_follow/ { - "leader_cluster" : "", + "remote_cluster" : "", "leader_index_patterns" : [ "" @@ -30,9 +30,9 @@ PUT /_ccr/auto_follow/ } -------------------------------------------------- // CONSOLE -// TEST[setup:leader_cluster] +// TEST[setup:remote_cluster] // TEST[s//auto_follow_pattern_name/] -// TEST[s//leader_cluster/] +// TEST[s//remote_cluster/] // TEST[s//leader_index*/] // TEST[s//{{leader_index}}-follower/] @@ -52,13 +52,13 @@ DELETE /_ccr/auto_follow/auto_follow_pattern_name (string) name of the collection of auto-follow patterns ==== Request Body -`leader_cluster`:: +`remote_cluster`:: (required string) the <> containing the leader indices to match against `leader_index_patterns`:: (array) an array of simple index patterns to match against indices in the - remote cluster specified by the `leader_cluster` field + remote cluster specified by the `remote_cluster` field `follow_index_pattern`:: (string) the name of follower index; the template `{{leader_index}}` can be @@ -75,7 +75,7 @@ This example creates an auto-follow pattern named `my_auto_follow_pattern`: -------------------------------------------------- PUT /_ccr/auto_follow/my_auto_follow_pattern { - "leader_cluster" : "leader_cluster", + "remote_cluster" : "remote_cluster", "leader_index_patterns" : [ "leader_index*" @@ -84,7 +84,7 @@ PUT /_ccr/auto_follow/my_auto_follow_pattern } -------------------------------------------------- // CONSOLE -// TEST[setup:leader_cluster] +// TEST[setup:remote_cluster] The API returns the following result: diff --git a/docs/reference/ccr/apis/follow-request-body.asciidoc b/docs/reference/ccr/apis/follow-request-body.asciidoc index ad98ce25e576e..90f743bf3fb16 100644 --- a/docs/reference/ccr/apis/follow-request-body.asciidoc +++ b/docs/reference/ccr/apis/follow-request-body.asciidoc @@ -1,30 +1,44 @@ -`max_batch_operation_count`:: - (integer) the maximum number of operations to pull per fetch from the remote +`max_read_request_operation_count`:: + (integer) the maximum number of operations to pull per read from the remote cluster -`max_concurrent_read_batches`:: - (long) the maximum number of concurrent fetches from the remote cluster +`max_outstanding_read_requests`:: + (long) the maximum number of outstanding reads requests from the remote + cluster -`max_batch_size`:: - (<>) the maximum size in bytes of batches pulled per - fetch from the remote cluster +`max_read_request_size`:: + (<>) the maximum size in bytes of per read of a batch + of operations pulled from the remote cluster -`max_concurrent_write_batches`:: - (integer) the maximum number of concurrent writes on the following index +`max_write_request_operation_count`:: + (integer) the maximum number of operations per bulk write request executed on + the follower -`max_write_buffer_size`:: +`max_write_request_size`:: + (integer) the maximum total bytes of operations per bulk write request + executed on the follower + +`max_outstanding_write_requests`:: + (integer) the maximum number of outstanding write requests on the follower + +`max_write_buffer_count`:: (integer) the maximum number of operations that can be queued for writing; - when this limit is reached, fetches from the remote cluster will be - deferred until the number of queued operations goes below the limit + when this limit is reached, reads from the remote cluster will be deferred + until the number of queued operations goes below the limit + +`max_write_buffer_size`:: + (integer) the maximum total bytes of operations that can be queued for + writing; when this limit is reached, reads from the remote cluster will be + deferred until the total bytes of queued operations goes below the limit `max_retry_delay`:: (<>) the maximum time to wait before retrying an operation that failed exceptionally; an exponential backoff strategy is employed when retrying -`poll_timeout`:: +`read_poll_timeout`:: (<>) the maximum time to wait for new operations on the remote cluster when the follower index is synchronized with the leader index; when the timeout has elapsed, the poll for operations will return to the follower so that it can update some statistics, and then the follower will - immediately attempt to fetch from the leader again \ No newline at end of file + immediately attempt to read from the leader again \ No newline at end of file diff --git a/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc b/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc index 77558c4b7170c..f338a851c9abc 100644 --- a/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc +++ b/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc @@ -21,13 +21,13 @@ following tasks associated with each shard for the specified indices. -------------------------------------------------- PUT /follower_index/_ccr/follow { - "leader_cluster" : "leader_cluster", + "remote_cluster" : "remote_cluster", "leader_index" : "leader_index" } -------------------------------------------------- // CONSOLE // TESTSETUP -// TEST[setup:leader_cluster_and_leader_index] +// TEST[setup:remote_cluster_and_leader_index] [source,js] -------------------------------------------------- @@ -72,7 +72,7 @@ The `indices` array consists of objects containing two fields: The `shards` array consists of objects containing the following fields: -`indices[].shards[].leader_cluster`:: +`indices[].shards[].remote_cluster`:: (string) the > containing the leader index @@ -105,71 +105,74 @@ The `shards` array consists of objects containing the following fields: (long) the starting sequence number of the last batch of operations requested from the leader -`indices[].shards[].number_of_concurrent_reads`:: - (integer) the number of active fetches +`indices[].shards[].outstanding_read_requests`:: + (integer) the number of active read requests from the follower -`indices[].shards[].number_of_concurrent_writes`:: - (integer) the number of active writes +`indices[].shards[].outstanding_write_requests`:: + (integer) the number of active bulk write requests on the follower -`indices[].shards[].number_of_queued_writes`:: +`indices[].shards[].write_buffer_operation_count`:: (integer) the number of write operations queued on the follower -`indices[].shards[].mapping_version`:: - (long) the mapping version on the follower +`indices[].shards[].follower_mapping_version`:: + (long) the mapping version the follower is synced up to -`indices[].shards[].total_fetch_time_millis`:: - (long) the total time fetches were outstanding, measured from the time a fetch +`indices[].shards[].total_read_time_millis`:: + (long) the total time reads were outstanding, measured from the time a read was sent to the leader to the time a reply was returned to the follower -`indices[].shards[].total_fetch_leader_time_millis`:: - (long) the total time fetches spent executing on the remote cluster +`indices[].shards[].total_read_remote_exec_time_millis`:: + (long) the total time reads spent executing on the remote cluster -`indices[].shards[].number_of_successful_fetches`:: +`indices[].shards[].successful_read_requests`:: (long) the number of successful fetches -`indices[].shards[].number_of_failed_fetches`:: - (long) the number of failed fetches +`indices[].shards[].failed_read_requests`:: + (long) the number of failed reads -`indices[].shards[].operations_received`:: - (long) the total number of operations received from the leader +`indices[].shards[].operations_read`:: + (long) the total number of operations read from the leader -`indices[].shards[].total_transferred_bytes`:: - (long) the total of transferred bytes received from the leader (note this is - only an estimate and does not account for compression if enabled) +`indices[].shards[].bytes_read`:: + (long) the total of transferred bytes read from the leader (note this is only + an estimate, and does not account for compression if enabled) -`indices[].shards[].total_index_time_millis`:: - (long) the total time spent indexing on the follower +`indices[].shards[].total_write_time_millis`:: + (long) the total time spent writing on the follower -`indices[].shards[].number_of_successful_bulk_operations`:: - (long) the number of bulk operations executed on the follower +`indices[].shards[].write_buffer_size_in_bytes`:: + (long) the total number of bytes of operations currently queued for writing -`indices[].shards[].number_of_failed_bulk_operations`:: - (long) the number of failed operations executed on the follower +`indices[].shards[].successful_write_requests`:: + (long) the number of bulk write requests executed on the follower -`indices[].shards[].number_of_operations_indexed`:: - (long) the number of operations indexed on the follower +`indices[].shards[].failed_write_requests`:: + (long) the number of failed bulk write requests executed on the follower -`indices[].shards[].fetch_exceptions`:: - (array) an array of objects representing failed fetches +`indices[].shards[].operations_written`:: + (long) the number of operations written on the follower -The `fetch_exceptions` array consists of objects containing the following +`indices[].shards[].read_exceptions`:: + (array) an array of objects representing failed reads + +The `read_exceptions` array consists of objects containing the following fields: -`indices[].shards[].fetch_exceptions[].from_seq_no`:: +`indices[].shards[].read_exceptions[].from_seq_no`:: (long) the starting sequence number of the batch requested from the leader -`indices[].shards[].fetch_exceptions[].retries`:: +`indices[].shards[].read_exceptions[].retries`:: (integer) the number of times the batch has been retried -`indices[].shards[].fetch_exceptions[].exception`:: - (object) represents the exception that caused the fetch to fail +`indices[].shards[].read_exceptions[].exception`:: + (object) represents the exception that caused the read to fail Continuing with the fields from `shards`: -`indices[].shards[].time_since_last_fetch_millis`:: - (long) the number of milliseconds since a fetch request was sent to the - leader; note that when the follower is caught up to the leader, this number - will increase up to the configured `poll_timeout` at which point another fetch +`indices[].shards[].time_since_last_read_millis`:: + (long) the number of milliseconds since a read request was sent to the leader; + note that when the follower is caught up to the leader, this number will + increase up to the configured `read_poll_timeout` at which point another read request will be sent to the leader `indices[].fatal_exception`:: @@ -196,7 +199,7 @@ The API returns the following results: "index" : "follower_index", "shards" : [ { - "leader_cluster" : "leader_cluster", + "remote_cluster" : "remote_cluster", "leader_index" : "leader_index", "follower_index" : "follower_index", "shard_id" : 0, @@ -205,22 +208,23 @@ The API returns the following results: "follower_global_checkpoint" : 768, "follower_max_seq_no" : 896, "last_requested_seq_no" : 897, - "number_of_concurrent_reads" : 8, - "number_of_concurrent_writes" : 2, - "number_of_queued_writes" : 64, - "mapping_version" : 4, - "total_fetch_time_millis" : 32768, - "total_fetch_leader_time_millis" : 16384, - "number_of_successful_fetches" : 32, - "number_of_failed_fetches" : 0, - "operations_received" : 896, - "total_transferred_bytes" : 32768, - "total_index_time_millis" : 16384, - "number_of_successful_bulk_operations" : 16, - "number_of_failed_bulk_operations" : 0, - "number_of_operations_indexed" : 832, - "fetch_exceptions" : [ ], - "time_since_last_fetch_millis" : 8 + "outstanding_read_requests" : 8, + "outstanding_write_requests" : 2, + "write_buffer_operation_count" : 64, + "follower_mapping_version" : 4, + "total_read_time_millis" : 32768, + "total_read_remote_exec_time_millis" : 16384, + "successful_read_requests" : 32, + "failed_read_requests" : 0, + "operations_read" : 896, + "bytes_read" : 32768, + "total_write_time_millis" : 16384, + "write_buffer_size_in_bytes" : 1536, + "successful_write_requests" : 16, + "failed_write_requests" : 0, + "operations_written" : 832, + "read_exceptions" : [ ], + "time_since_last_read_millis" : 8 } ] } @@ -232,18 +236,19 @@ The API returns the following results: // TESTRESPONSE[s/"follower_global_checkpoint" : 768/"follower_global_checkpoint" : $body.indices.0.shards.0.follower_global_checkpoint/] // TESTRESPONSE[s/"follower_max_seq_no" : 896/"follower_max_seq_no" : $body.indices.0.shards.0.follower_max_seq_no/] // TESTRESPONSE[s/"last_requested_seq_no" : 897/"last_requested_seq_no" : $body.indices.0.shards.0.last_requested_seq_no/] -// TESTRESPONSE[s/"number_of_concurrent_reads" : 8/"number_of_concurrent_reads" : $body.indices.0.shards.0.number_of_concurrent_reads/] -// TESTRESPONSE[s/"number_of_concurrent_writes" : 2/"number_of_concurrent_writes" : $body.indices.0.shards.0.number_of_concurrent_writes/] -// TESTRESPONSE[s/"number_of_queued_writes" : 64/"number_of_queued_writes" : $body.indices.0.shards.0.number_of_queued_writes/] -// TESTRESPONSE[s/"mapping_version" : 4/"mapping_version" : $body.indices.0.shards.0.mapping_version/] -// TESTRESPONSE[s/"total_fetch_time_millis" : 32768/"total_fetch_time_millis" : $body.indices.0.shards.0.total_fetch_time_millis/] -// TESTRESPONSE[s/"total_fetch_leader_time_millis" : 16384/"total_fetch_leader_time_millis" : $body.indices.0.shards.0.total_fetch_leader_time_millis/] -// TESTRESPONSE[s/"number_of_successful_fetches" : 32/"number_of_successful_fetches" : $body.indices.0.shards.0.number_of_successful_fetches/] -// TESTRESPONSE[s/"number_of_failed_fetches" : 0/"number_of_failed_fetches" : $body.indices.0.shards.0.number_of_failed_fetches/] -// TESTRESPONSE[s/"operations_received" : 896/"operations_received" : $body.indices.0.shards.0.operations_received/] -// TESTRESPONSE[s/"total_transferred_bytes" : 32768/"total_transferred_bytes" : $body.indices.0.shards.0.total_transferred_bytes/] -// TESTRESPONSE[s/"total_index_time_millis" : 16384/"total_index_time_millis" : $body.indices.0.shards.0.total_index_time_millis/] -// TESTRESPONSE[s/"number_of_successful_bulk_operations" : 16/"number_of_successful_bulk_operations" : $body.indices.0.shards.0.number_of_successful_bulk_operations/] -// TESTRESPONSE[s/"number_of_failed_bulk_operations" : 0/"number_of_failed_bulk_operations" : $body.indices.0.shards.0.number_of_failed_bulk_operations/] -// TESTRESPONSE[s/"number_of_operations_indexed" : 832/"number_of_operations_indexed" : $body.indices.0.shards.0.number_of_operations_indexed/] -// TESTRESPONSE[s/"time_since_last_fetch_millis" : 8/"time_since_last_fetch_millis" : $body.indices.0.shards.0.time_since_last_fetch_millis/] +// TESTRESPONSE[s/"outstanding_read_requests" : 8/"outstanding_read_requests" : $body.indices.0.shards.0.outstanding_read_requests/] +// TESTRESPONSE[s/"outstanding_write_requests" : 2/"outstanding_write_requests" : $body.indices.0.shards.0.outstanding_write_requests/] +// TESTRESPONSE[s/"write_buffer_operation_count" : 64/"write_buffer_operation_count" : $body.indices.0.shards.0.write_buffer_operation_count/] +// TESTRESPONSE[s/"follower_mapping_version" : 4/"follower_mapping_version" : $body.indices.0.shards.0.follower_mapping_version/] +// TESTRESPONSE[s/"total_read_time_millis" : 32768/"total_read_time_millis" : $body.indices.0.shards.0.total_read_time_millis/] +// TESTRESPONSE[s/"total_read_remote_exec_time_millis" : 16384/"total_read_remote_exec_time_millis" : $body.indices.0.shards.0.total_read_remote_exec_time_millis/] +// TESTRESPONSE[s/"successful_read_requests" : 32/"successful_read_requests" : $body.indices.0.shards.0.successful_read_requests/] +// TESTRESPONSE[s/"failed_read_requests" : 0/"failed_read_requests" : $body.indices.0.shards.0.failed_read_requests/] +// TESTRESPONSE[s/"operations_read" : 896/"operations_read" : $body.indices.0.shards.0.operations_read/] +// TESTRESPONSE[s/"bytes_read" : 32768/"bytes_read" : $body.indices.0.shards.0.bytes_read/] +// TESTRESPONSE[s/"total_write_time_millis" : 16384/"total_write_time_millis" : $body.indices.0.shards.0.total_write_time_millis/] +// TESTRESPONSE[s/"write_buffer_size_in_bytes" : 1536/"write_buffer_size_in_bytes" : $body.indices.0.shards.0.write_buffer_size_in_bytes/] +// TESTRESPONSE[s/"successful_write_requests" : 16/"successful_write_requests" : $body.indices.0.shards.0.successful_write_requests/] +// TESTRESPONSE[s/"failed_write_requests" : 0/"failed_write_requests" : $body.indices.0.shards.0.failed_write_requests/] +// TESTRESPONSE[s/"operations_written" : 832/"operations_written" : $body.indices.0.shards.0.operations_written/] +// TESTRESPONSE[s/"time_since_last_read_millis" : 8/"time_since_last_read_millis" : $body.indices.0.shards.0.time_since_last_read_millis/] diff --git a/docs/reference/ccr/apis/follow/post-pause-follow.asciidoc b/docs/reference/ccr/apis/follow/post-pause-follow.asciidoc index dcd03e669d33b..546cf2ded2ba3 100644 --- a/docs/reference/ccr/apis/follow/post-pause-follow.asciidoc +++ b/docs/reference/ccr/apis/follow/post-pause-follow.asciidoc @@ -24,13 +24,13 @@ following task. -------------------------------------------------- PUT /follower_index/_ccr/follow { - "leader_cluster" : "leader_cluster", + "remote_cluster" : "remote_cluster", "leader_index" : "leader_index" } -------------------------------------------------- // CONSOLE // TESTSETUP -// TEST[setup:leader_cluster_and_leader_index] +// TEST[setup:remote_cluster_and_leader_index] ////////////////////////// diff --git a/docs/reference/ccr/apis/follow/post-resume-follow.asciidoc b/docs/reference/ccr/apis/follow/post-resume-follow.asciidoc index fe1e5f6f50351..b2d354203e45d 100644 --- a/docs/reference/ccr/apis/follow/post-resume-follow.asciidoc +++ b/docs/reference/ccr/apis/follow/post-resume-follow.asciidoc @@ -23,7 +23,7 @@ returns, the follower index will resume fetching operations from the leader inde -------------------------------------------------- PUT /follower_index/_ccr/follow { - "leader_cluster" : "leader_cluster", + "remote_cluster" : "remote_cluster", "leader_index" : "leader_index" } @@ -31,7 +31,7 @@ POST /follower_index/_ccr/pause_follow -------------------------------------------------- // CONSOLE // TESTSETUP -// TEST[setup:leader_cluster_and_leader_index] +// TEST[setup:remote_cluster_and_leader_index] [source,js] -------------------------------------------------- @@ -46,13 +46,11 @@ POST /follower_index/_ccr/pause_follow -------------------------------------------------- POST //_ccr/resume_follow { - "leader_cluster" : "", - "leader_index" : "" } -------------------------------------------------- // CONSOLE // TEST[s//follower_index/] -// TEST[s//leader_cluster/] +// TEST[s//remote_cluster/] // TEST[s//leader_index/] ==== Path Components @@ -61,13 +59,6 @@ POST //_ccr/resume_follow (string) the name of the follower index ==== Request Body -`leader_cluster` (required):: - (string) the <> containing the leader - index - -`leader_index` (required):: - (string) the name of the index in the leader cluster to follow - include::../follow-request-body.asciidoc[] ==== Example @@ -78,12 +69,19 @@ This example resumes a follower index named `follower_index`: -------------------------------------------------- POST /follower_index/_ccr/resume_follow { - "leader_cluster" : "leader_cluster", - "leader_index" : "leader_index" + "max_read_request_operation_count" : 1024, + "max_outstanding_read_requests" : 16, + "max_read_request_size" : "1024k", + "max_write_request_operation_count" : 32768, + "max_write_request_size" : "16k", + "max_outstanding_write_requests" : 8, + "max_write_buffer_count" : 512, + "max_write_buffer_size" : "512k", + "max_retry_delay" : "10s", + "read_poll_timeout" : "30s" } -------------------------------------------------- // CONSOLE -// TEST The API returns the following result: diff --git a/docs/reference/ccr/apis/follow/post-unfollow.asciidoc b/docs/reference/ccr/apis/follow/post-unfollow.asciidoc index 936afcf115957..fa3260ab64573 100644 --- a/docs/reference/ccr/apis/follow/post-unfollow.asciidoc +++ b/docs/reference/ccr/apis/follow/post-unfollow.asciidoc @@ -27,7 +27,7 @@ irreversible operation. -------------------------------------------------- PUT /follower_index/_ccr/follow { - "leader_cluster" : "leader_cluster", + "remote_cluster" : "remote_cluster", "leader_index" : "leader_index" } @@ -37,7 +37,7 @@ POST /follower_index/_close -------------------------------------------------- // CONSOLE // TESTSETUP -// TEST[setup:leader_cluster_and_leader_index] +// TEST[setup:remote_cluster_and_leader_index] ////////////////////////// diff --git a/docs/reference/ccr/apis/follow/put-follow.asciidoc b/docs/reference/ccr/apis/follow/put-follow.asciidoc index 9caa235fa10f0..ac843dcfe23b9 100644 --- a/docs/reference/ccr/apis/follow/put-follow.asciidoc +++ b/docs/reference/ccr/apis/follow/put-follow.asciidoc @@ -31,14 +31,14 @@ POST /follower_index/_ccr/pause_follow -------------------------------------------------- PUT //_ccr/follow { - "leader_cluster" : "", + "remote_cluster" : "", "leader_index" : "" } -------------------------------------------------- // CONSOLE -// TEST[setup:leader_cluster_and_leader_index] +// TEST[setup:remote_cluster_and_leader_index] // TEST[s//follower_index/] -// TEST[s//leader_cluster/] +// TEST[s//remote_cluster/] // TEST[s//leader_index/] ==== Path Components @@ -47,7 +47,7 @@ PUT //_ccr/follow (string) the name of the follower index ==== Request Body -`leader_cluster` (required):: +`remote_cluster` (required):: (string) the <> containing the leader index @@ -64,12 +64,12 @@ This example creates a follower index named `follower_index`: -------------------------------------------------- PUT /follower_index/_ccr/follow { - "leader_cluster" : "leader_cluster", + "remote_cluster" : "remote_cluster", "leader_index" : "leader_index" } -------------------------------------------------- // CONSOLE -// TEST[setup:leader_cluster_and_leader_index] +// TEST[setup:remote_cluster_and_leader_index] The API returns the following result: From 6337e6eb0ccaf67a01e119ff31739adb3027a905 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Fri, 26 Oct 2018 10:48:25 -0400 Subject: [PATCH 09/12] Fix --- docs/reference/ccr/apis/follow/put-follow.asciidoc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/reference/ccr/apis/follow/put-follow.asciidoc b/docs/reference/ccr/apis/follow/put-follow.asciidoc index ac843dcfe23b9..9919c59a21ac4 100644 --- a/docs/reference/ccr/apis/follow/put-follow.asciidoc +++ b/docs/reference/ccr/apis/follow/put-follow.asciidoc @@ -65,7 +65,17 @@ This example creates a follower index named `follower_index`: PUT /follower_index/_ccr/follow { "remote_cluster" : "remote_cluster", - "leader_index" : "leader_index" + "leader_index" : "leader_index", + "max_read_request_operation_count" : 1024, + "max_outstanding_read_requests" : 16, + "max_read_request_size" : "1024k", + "max_write_request_operation_count" : 32768, + "max_write_request_size" : "16k", + "max_outstanding_write_requests" : 8, + "max_write_buffer_count" : 512, + "max_write_buffer_size" : "512k", + "max_retry_delay" : "10s", + "read_poll_timeout" : "30s" } -------------------------------------------------- // CONSOLE From dd51c2cff034047b44e8c94973e56990ef32745f Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Fri, 26 Oct 2018 10:53:48 -0400 Subject: [PATCH 10/12] Fix put/resume follow request parsing This commit adds some fields that were missing from put follow, and fixes a bug in resume follow. --- .../xpack/ccr/action/ShardFollowTask.java | 10 ++++++---- .../xpack/core/ccr/action/PutFollowAction.java | 10 +++++++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/ShardFollowTask.java b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/ShardFollowTask.java index f22fe0d2238ac..dc7194aa4e0e5 100644 --- a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/ShardFollowTask.java +++ b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/ShardFollowTask.java @@ -73,14 +73,16 @@ public class ShardFollowTask implements XPackPlugin.XPackPersistentTaskParams { PARSER.declareInt(ConstructingObjectParser.constructorArg(), MAX_READ_REQUEST_OPERATION_COUNT); PARSER.declareField( ConstructingObjectParser.constructorArg(), - (p, c) -> ByteSizeValue.parseBytesSizeValue(p.text(), MAX_READ_REQUEST_SIZE.getPreferredName()), MAX_READ_REQUEST_SIZE, + (p, c) -> ByteSizeValue.parseBytesSizeValue(p.text(), MAX_READ_REQUEST_SIZE.getPreferredName()), + MAX_READ_REQUEST_SIZE, ObjectParser.ValueType.STRING); PARSER.declareInt(ConstructingObjectParser.constructorArg(), MAX_OUTSTANDING_READ_REQUESTS); PARSER.declareInt(ConstructingObjectParser.constructorArg(), MAX_WRITE_REQUEST_OPERATION_COUNT); PARSER.declareField( - ConstructingObjectParser.constructorArg(), - (p, c) -> ByteSizeValue.parseBytesSizeValue(p.text(), MAX_WRITE_BUFFER_SIZE.getPreferredName()), MAX_WRITE_REQUEST_SIZE, - ObjectParser.ValueType.STRING); + ConstructingObjectParser.constructorArg(), + (p, c) -> ByteSizeValue.parseBytesSizeValue(p.text(), MAX_WRITE_REQUEST_SIZE.getPreferredName()), + MAX_WRITE_REQUEST_SIZE, + ObjectParser.ValueType.STRING); PARSER.declareInt(ConstructingObjectParser.constructorArg(), MAX_OUTSTANDING_WRITE_REQUESTS); PARSER.declareInt(ConstructingObjectParser.constructorArg(), MAX_WRITE_BUFFER_COUNT); PARSER.declareField( diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/action/PutFollowAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/action/PutFollowAction.java index b242b8cc8ec4c..5273ee036554e 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/action/PutFollowAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/action/PutFollowAction.java @@ -34,6 +34,8 @@ import static org.elasticsearch.xpack.core.ccr.action.ResumeFollowAction.Request.MAX_RETRY_DELAY_FIELD; import static org.elasticsearch.xpack.core.ccr.action.ResumeFollowAction.Request.MAX_WRITE_BUFFER_COUNT; import static org.elasticsearch.xpack.core.ccr.action.ResumeFollowAction.Request.MAX_WRITE_BUFFER_SIZE; +import static org.elasticsearch.xpack.core.ccr.action.ResumeFollowAction.Request.MAX_WRITE_REQUEST_OPERATION_COUNT; +import static org.elasticsearch.xpack.core.ccr.action.ResumeFollowAction.Request.MAX_WRITE_REQUEST_SIZE; import static org.elasticsearch.xpack.core.ccr.action.ResumeFollowAction.Request.READ_POLL_TIMEOUT; public final class PutFollowAction extends Action { @@ -66,12 +68,18 @@ public static class Request extends AcknowledgedRequest implements Indi PARSER.declareString(Request::setLeaderIndex, LEADER_INDEX_FIELD); PARSER.declareString((req, val) -> req.followRequest.setFollowerIndex(val), FOLLOWER_INDEX_FIELD); PARSER.declareInt((req, val) -> req.followRequest.setMaxReadRequestOperationCount(val), MAX_READ_REQUEST_OPERATION_COUNT); - PARSER.declareInt((req, val) -> req.followRequest.setMaxOutstandingReadRequests(val), MAX_OUTSTANDING_READ_REQUESTS); PARSER.declareField( (req, val) -> req.followRequest.setMaxReadRequestSize(val), (p, c) -> ByteSizeValue.parseBytesSizeValue(p.text(), MAX_READ_REQUEST_SIZE.getPreferredName()), MAX_READ_REQUEST_SIZE, ObjectParser.ValueType.STRING); + PARSER.declareInt((req, val) -> req.followRequest.setMaxOutstandingReadRequests(val), MAX_OUTSTANDING_READ_REQUESTS); + PARSER.declareInt((req, val) -> req.followRequest.setMaxWriteRequestOperationCount(val), MAX_WRITE_REQUEST_OPERATION_COUNT); + PARSER.declareField( + (req, val) -> req.followRequest.setMaxWriteRequestSize(val), + (p, c) -> ByteSizeValue.parseBytesSizeValue(p.text(), MAX_WRITE_REQUEST_SIZE.getPreferredName()), + MAX_WRITE_REQUEST_SIZE, + ObjectParser.ValueType.STRING); PARSER.declareInt((req, val) -> req.followRequest.setMaxOutstandingWriteRequests(val), MAX_OUTSTANDING_WRITE_REQUESTS); PARSER.declareInt((req, val) -> req.followRequest.setMaxWriteBufferCount(val), MAX_WRITE_BUFFER_COUNT); PARSER.declareField( From 7df57e6c74ebbeb6a9683a826243c349f88592f7 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Fri, 26 Oct 2018 11:07:26 -0400 Subject: [PATCH 11/12] Add auto-follow completeness --- .../auto-follow/put-auto-follow-pattern.asciidoc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc b/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc index 8cda8238e613c..2ae0f471b055c 100644 --- a/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc +++ b/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc @@ -80,7 +80,17 @@ PUT /_ccr/auto_follow/my_auto_follow_pattern [ "leader_index*" ], - "follow_index_pattern" : "{{leader_index}}-follower" + "follow_index_pattern" : "{{leader_index}}-follower", + "max_read_request_operation_count" : 1024, + "max_outstanding_read_requests" : 16, + "max_read_request_size" : "1024k", + "max_write_request_operation_count" : 32768, + "max_write_request_size" : "16k", + "max_outstanding_write_requests" : 8, + "max_write_buffer_count" : 512, + "max_write_buffer_size" : "512k", + "max_retry_delay" : "10s", + "read_poll_timeout" : "30s" } -------------------------------------------------- // CONSOLE From 822c85048366515ff27595a816f06f42cc653ffc Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Fri, 26 Oct 2018 11:19:22 -0400 Subject: [PATCH 12/12] Tweaks --- .../ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc | 2 +- .../ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc | 2 +- .../ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc | 2 +- docs/reference/ccr/apis/follow-request-body.asciidoc | 4 ++-- docs/reference/ccr/apis/follow/get-follow-stats.asciidoc | 2 +- docs/reference/ccr/apis/follow/post-pause-follow.asciidoc | 2 +- docs/reference/ccr/apis/follow/post-resume-follow.asciidoc | 2 +- docs/reference/ccr/apis/follow/post-unfollow.asciidoc | 2 +- docs/reference/ccr/apis/follow/put-follow.asciidoc | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc b/docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc index 11b69b25164c8..301c7f7da4998 100644 --- a/docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc +++ b/docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc @@ -41,7 +41,7 @@ DELETE /_ccr/auto_follow/ // CONSOLE // TEST[s//my_auto_follow_pattern/] -==== Path Components +==== Path Parameters `auto_follow_pattern_name` (required):: (string) specifies the auto-follow pattern collection to delete diff --git a/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc b/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc index 66ba5a819da26..1ff9c9943c9df 100644 --- a/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc +++ b/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc @@ -56,7 +56,7 @@ GET /_ccr/auto_follow/ // CONSOLE // TEST[s//my_auto_follow_pattern/] -==== Path Components +==== Path Parameters `auto_follow_pattern_name`:: (string) specifies the auto-follow pattern collection that you want to retrieve; if you do not specify a name, the API returns information for all diff --git a/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc b/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc index 2ae0f471b055c..e18b69579d303 100644 --- a/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc +++ b/docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc @@ -47,7 +47,7 @@ DELETE /_ccr/auto_follow/auto_follow_pattern_name ////////////////////////// -==== Path Components +==== Path Parameters `auto_follow_pattern_name` (required):: (string) name of the collection of auto-follow patterns diff --git a/docs/reference/ccr/apis/follow-request-body.asciidoc b/docs/reference/ccr/apis/follow-request-body.asciidoc index 90f743bf3fb16..7215cc01302a1 100644 --- a/docs/reference/ccr/apis/follow-request-body.asciidoc +++ b/docs/reference/ccr/apis/follow-request-body.asciidoc @@ -15,7 +15,7 @@ the follower `max_write_request_size`:: - (integer) the maximum total bytes of operations per bulk write request + (<>) the maximum total bytes of operations per bulk write request executed on the follower `max_outstanding_write_requests`:: @@ -27,7 +27,7 @@ until the number of queued operations goes below the limit `max_write_buffer_size`:: - (integer) the maximum total bytes of operations that can be queued for + (<>) the maximum total bytes of operations that can be queued for writing; when this limit is reached, reads from the remote cluster will be deferred until the total bytes of queued operations goes below the limit diff --git a/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc b/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc index f338a851c9abc..efbaeecb712d5 100644 --- a/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc +++ b/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc @@ -51,7 +51,7 @@ GET //_ccr/stats // CONSOLE // TEST[s//follower_index/] -==== Path Components +==== Path Parmeters `index` :: (string) a comma-delimited list of index patterns diff --git a/docs/reference/ccr/apis/follow/post-pause-follow.asciidoc b/docs/reference/ccr/apis/follow/post-pause-follow.asciidoc index 546cf2ded2ba3..7fa4dbdd45591 100644 --- a/docs/reference/ccr/apis/follow/post-pause-follow.asciidoc +++ b/docs/reference/ccr/apis/follow/post-pause-follow.asciidoc @@ -41,7 +41,7 @@ POST //_ccr/pause_follow // CONSOLE // TEST[s//follower_index/] -==== Path Components +==== Path Parameters `follower_index` (required):: (string) the name of the follower index diff --git a/docs/reference/ccr/apis/follow/post-resume-follow.asciidoc b/docs/reference/ccr/apis/follow/post-resume-follow.asciidoc index b2d354203e45d..eb19050961be7 100644 --- a/docs/reference/ccr/apis/follow/post-resume-follow.asciidoc +++ b/docs/reference/ccr/apis/follow/post-resume-follow.asciidoc @@ -53,7 +53,7 @@ POST //_ccr/resume_follow // TEST[s//remote_cluster/] // TEST[s//leader_index/] -==== Path Components +==== Path Parameters `follower_index` (required):: (string) the name of the follower index diff --git a/docs/reference/ccr/apis/follow/post-unfollow.asciidoc b/docs/reference/ccr/apis/follow/post-unfollow.asciidoc index fa3260ab64573..d84f170417998 100644 --- a/docs/reference/ccr/apis/follow/post-unfollow.asciidoc +++ b/docs/reference/ccr/apis/follow/post-unfollow.asciidoc @@ -48,7 +48,7 @@ POST //_ccr/unfollow // CONSOLE // TEST[s//follower_index/] -==== Path Components +==== Path Parmeters `follower_index` (required):: (string) the name of the follower index diff --git a/docs/reference/ccr/apis/follow/put-follow.asciidoc b/docs/reference/ccr/apis/follow/put-follow.asciidoc index 9919c59a21ac4..db0005fe3c983 100644 --- a/docs/reference/ccr/apis/follow/put-follow.asciidoc +++ b/docs/reference/ccr/apis/follow/put-follow.asciidoc @@ -41,7 +41,7 @@ PUT //_ccr/follow // TEST[s//remote_cluster/] // TEST[s//leader_index/] -==== Path Components +==== Path Parameters `follower_index` (required):: (string) the name of the follower index