-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit modifies the follow stats API response structure to more clearly highlight meaning of the higher level fields. In particular, previously the response had a top-level key for each index. Instead, we nest the indices under an "indices" field which is now an array. The values in this array are objects containing two fields: "index" which is the name of the follower index, and "shards" which is an array where each value in the array is the follower stats for that shard. That is, we have gone from: { "bar": [ { "shard_id": 0... }... ]... } to { "indices": [ { "index": "bar", "shards": [ { "shard_id": 0... }... ] }... }
- Loading branch information
1 parent
7478167
commit 7d57bdb
Showing
3 changed files
with
74 additions
and
63 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/follow_stats.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
"Test stats": | ||
- do: | ||
indices.create: | ||
index: foo | ||
body: | ||
settings: | ||
index: | ||
soft_deletes: | ||
enabled: true | ||
mappings: | ||
doc: | ||
properties: | ||
field: | ||
type: keyword | ||
|
||
- do: | ||
ccr.follow: | ||
index: bar | ||
body: | ||
leader_index: foo | ||
- is_true: follow_index_created | ||
- is_true: follow_index_shards_acked | ||
- is_true: index_following_started | ||
|
||
# we can not reliably wait for replication to occur so we test the endpoint without indexing any documents | ||
- do: | ||
ccr.stats: | ||
index: bar | ||
- match: { indices.0.index: "bar" } | ||
- match: { indices.0.shards.0.leader_index: "foo" } | ||
- match: { indices.0.shards.0.follower_index: "bar" } | ||
- match: { indices.0.shards.0.shard_id: 0 } | ||
- gte: { indices.0.shards.0.leader_global_checkpoint: -1 } | ||
- gte: { indices.0.shards.0.leader_max_seq_no: -1 } | ||
- gte: { indices.0.shards.0.follower_global_checkpoint: -1 } | ||
- gte: { indices.0.shards.0.follower_max_seq_no: -1 } | ||
- gte: { indices.0.shards.0.last_requested_seq_no: -1 } | ||
- gte: { indices.0.shards.0.number_of_concurrent_reads: 0 } | ||
- match: { indices.0.shards.0.number_of_concurrent_writes: 0 } | ||
- match: { indices.0.shards.0.number_of_queued_writes: 0 } | ||
- gte: { indices.0.shards.0.mapping_version: 0 } | ||
- gte: { indices.0.shards.0.total_fetch_time_millis: 0 } | ||
- gte: { indices.0.shards.0.number_of_successful_fetches: 0 } | ||
- gte: { indices.0.shards.0.number_of_failed_fetches: 0 } | ||
- match: { indices.0.shards.0.operations_received: 0 } | ||
- match: { indices.0.shards.0.total_transferred_bytes: 0 } | ||
- match: { indices.0.shards.0.total_index_time_millis: 0 } | ||
- match: { indices.0.shards.0.number_of_successful_bulk_operations: 0 } | ||
- match: { indices.0.shards.0.number_of_failed_bulk_operations: 0 } | ||
- match: { indices.0.shards.0.number_of_operations_indexed: 0 } | ||
- length: { indices.0.shards.0.fetch_exceptions: 0 } | ||
- gte: { indices.0.shards.0.time_since_last_fetch_millis: -1 } | ||
|
||
- do: | ||
ccr.pause_follow: | ||
index: bar | ||
- is_true: acknowledged | ||
|
57 changes: 0 additions & 57 deletions
57
x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/stats.yml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters