mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 15:17:30 -04:00
Calc follower vs leader indexing lag based on shard global checkpoints (#104015)
* Calc follower vs leader indexing lag baed on shard global checkpoints * code simplify * follow PR comments * spotless * Update docs/reference/ccr/apis/follow/get-follow-stats.asciidoc Co-authored-by: Iraklis Psaroudakis <kingherc@gmail.com> --------- Co-authored-by: Iraklis Psaroudakis <kingherc@gmail.com>
This commit is contained in:
parent
f33122a191
commit
f6f86d11d3
4 changed files with 20 additions and 1 deletions
|
@ -75,6 +75,9 @@ task. In this situation, the following task must be resumed manually with the
|
|||
`index`::
|
||||
(string) The name of the follower index.
|
||||
|
||||
`total_global_checkpoint_lag`::
|
||||
(long) Indication of how much the follower is lagging the leader. This is the sum of the difference between the `leader_global_checkpoint` and the `follower_global_checkpoint` for all shards.
|
||||
|
||||
//Begin shards
|
||||
`shards`::
|
||||
(array) An array of shard-level following task statistics.
|
||||
|
@ -219,6 +222,7 @@ The API returns the following results:
|
|||
"indices" : [
|
||||
{
|
||||
"index" : "follower_index",
|
||||
"total_global_checkpoint_lag" : 256,
|
||||
"shards" : [
|
||||
{
|
||||
"remote_cluster" : "remote_cluster",
|
||||
|
@ -255,6 +259,7 @@ The API returns the following results:
|
|||
]
|
||||
}
|
||||
--------------------------------------------------
|
||||
// TESTRESPONSE[s/"total_global_checkpoint_lag" : 256/"total_global_checkpoint_lag" : 0/]
|
||||
// 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/]
|
||||
|
|
|
@ -112,6 +112,7 @@ The API returns the following results:
|
|||
"indices" : [
|
||||
{
|
||||
"index" : "follower_index",
|
||||
"total_global_checkpoint_lag" : 256,
|
||||
"shards" : [
|
||||
{
|
||||
"remote_cluster" : "remote_cluster",
|
||||
|
@ -149,6 +150,7 @@ The API returns the following results:
|
|||
}
|
||||
}
|
||||
--------------------------------------------------
|
||||
// TESTRESPONSE[s/"total_global_checkpoint_lag" : 256/"total_global_checkpoint_lag" : 0/]
|
||||
// TESTRESPONSE[s/"number_of_failed_follow_indices" : 0/"number_of_failed_follow_indices" : $body.auto_follow_stats.number_of_failed_follow_indices/]
|
||||
// TESTRESPONSE[s/"number_of_failed_remote_cluster_state_requests" : 0/"number_of_failed_remote_cluster_state_requests" : $body.auto_follow_stats.number_of_failed_remote_cluster_state_requests/]
|
||||
// TESTRESPONSE[s/"number_of_successful_follow_indices" : 1/"number_of_successful_follow_indices" : $body.auto_follow_stats.number_of_successful_follow_indices/]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue