-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ccr follow info api #37408
Add ccr follow info api #37408
Conversation
This api returns all follower indices and per follower index the provided parameters at put follow / resume follow time and whether index following is paused or active. Closes elastic#37127
Pinging @elastic/es-distributed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @martijnvg. This looks good. I left some minor comments.
...k/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/TransportFollowInfoAction.java
Show resolved
Hide resolved
} | ||
} | ||
|
||
public static class FollowParameters implements Writeable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe do a follow-up to make FollowParameters a separate class then re-use in ShardFollowTask?
`follower_indices`:: | ||
(array) an array of follower index statistics | ||
|
||
The `indices` array consists of objects containing two fields: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: here we are returning more than two fields.
(string) the <modules-remote-clusters,remote cluster>> containing the leader | ||
index | ||
|
||
`indices[].leader_cluster`:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: leader_cluster -> leader_index
cluster | ||
|
||
`indices[].parameters.max_outstanding_read_requests`:: | ||
(long) the configured maximum number of outstanding reads requests from the remote |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reads requests -> read requests.
(integer) the configured maximum number of outstanding write requests on the follower | ||
|
||
`indices[].parameters.max_write_buffer_count`:: | ||
(integer) th configurede maximum number of operations that can be queued for writing; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
th configurede -> the configured
@lcawl Would you please have a look at the doc? Thank you! |
Thanks @dnhatn! I've updated the PR. |
The `parameters` contains the following fields: | ||
|
||
`indices[].parameters.max_read_request_operation_count`:: | ||
(integer) The configured maximum number of operations to pull per read from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what the purpose of "configured" is here and in other descriptions. Does this mean it only contains that information if you've explicitly set it (i.e. it doesn't appear if you're using default values)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, if a parameter has not been configured then the default value is returned.
So maybe 'configured' should be removed.
@elasticmachine run gradle build tests 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
This api returns all follower indices and per follower index the provided parameters at put follow / resume follow time and whether index following is paused or active. Closes #37127
This api returns all or requested follower indices and per follower index
the provided parameters at put follow / resume follow time and
whether index following is paused or active.
This api is useful for the UI. Figuring out which index is a follower index,
what the active parameters are for a follower index and
whether index follow is active or paused, isn't straightforward and
requires internal ccr knowledge. Having this logic in the UI is the wrong place.
Closes #37127