-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Segment Replication] Introduce new API to fetch existing metrics related to segment replication. #4554
Comments
These are the 4 api changes (updates/additions) we need to fetch metrics related to segment replication:
|
Thanks @Poojita-Raj for putting up the design. I started working on point '1.' of creating a -> Instead of persisting data of each segment replication event in a shard we will be storing only the latest segment replication event happened on the shard. So the result of -> We will use Replication id which will help us to identify segment replication event on a shard. For now these two are only changes made during implementation. Rest of design is same as mentioned here. With Completion of point "1." in comment by PR the result of
|
@Rishikesh1159 This looks good, can we also add total bytes? |
-> In latest commit of PR, I have added total bytes transfered in a single segment replication event metric. -> First two points of the initial design proposal have been implemented. -> Sample output/response of segment_replication API:
Testing of this new API and implementation of final two points in design are still pending. I will add these in upcoming commits to the PR |
Can you consider using Random number as seed for "replication_id", it give a better feel for security. How is the backward compatibility handled if a new variable is required in future. |
More detailed description of segment Replication API: from PR : Detailed description of API : Overview:The purpose of the this API is to return metric information about ongoing and latest completed segment replication events on replica shards. This API returns metric per shard level and this API should only be called on Indices with segment replication enabled. Paths:
If you want to get information for more than one index, separate the indices with commas:
Description:→ cat segment_replication API returns metric information about ongoing and latest completed segment replication events.
Query Parameters:
Metric Fields:
All metrics mentioned below will present in response only when query parameter detailed=true
Example Response of API:→ Sample response with no ongoing segment replication events:
→ Sample response with query parameter shards=0, which limits response to only specific shards with ID as 0:
→ Sample response with query parameter detailed=true, which gives more detailed information each stage of segment replication event:
|
@Rishikesh1159 Thanks for writing this up! A few nits:
Not sure what you mean here by default=true?
nit - replication |
@mch2 initially default is false for few metrics start_time, start_time_millis, stop_time, stop_time_millis. So these metrics don't show up in response. If we put default=true in query parameters of API call then only we get these metrics. It is similar to having detailed=true. For Yes I will clarify in documentation that this API returns only the most recently completed event. |
@Rishikesh1159 Closing this issue, lets cut smaller issues to track enhancements to this API. |
Updated above comment with latest additional changes to API. |
Is your feature request related to a problem? Please describe.
Currently we just log all the metrics related to segment replication. Instead we need to create an API to fetch all relevant segment replication metrics, so that we can just call the API from opensearch-benchmarks to get the metrics and include them in the results of a benchmark run.
The text was updated successfully, but these errors were encountered: