Skip to content
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

Added Point In Time Node Stats API ServiceLayer Changes #4030

Merged
merged 6 commits into from
Aug 8, 2022

Conversation

ajaymovva
Copy link
Contributor

@ajaymovva ajaymovva commented Jul 27, 2022

Signed-off-by: Ajay Kumar Movva movvaam@amazon.com

Description

This PR has service layer changes for the point in time stats in node stats api.

point_in_time_current : No of open pit contexts.
point_in_time_time_in_millis: Time pit contexts held open.
point_in_time_total: Completed pit contexts.

Sample Output.

  1. Index Creation: localhost:9200/my-index-000001/_doc/.
  2. Creation PIT with keep-alive as 1m,2m,3m.
  3. Node Stats API output PIT's
when the pit requests are triggered.

"search": {
    "open_contexts": 3,
    "query_total": 0,
    "query_time_in_millis": 0,
    "query_current": 0,
    "fetch_total": 0,
    "fetch_time_in_millis": 0,
    "fetch_current": 0,
    "scroll_total": 0,
    "scroll_time_in_millis": 0,
    "scroll_current": 0,
    "point_in_time_total": 0,
    "point_in_time_time_in_millis": 0,
    "point_in_time_current": 3,
    "suggest_total": 0,
    "suggest_time_in_millis": 0,
    "suggest_current": 0
},

 when the 1m interval completed.

"search": {
    "open_contexts": 2,
    "query_total": 0,
    "query_time_in_millis": 0,
    "query_current": 0,
    "fetch_total": 0,
    "fetch_time_in_millis": 0,
    "fetch_current": 0,
    "scroll_total": 0,
    "scroll_time_in_millis": 0,
    "scroll_current": 0,
    "point_in_time_total": 1,
    "point_in_time_time_in_millis": 99516,
    "point_in_time_current": 2,
    "suggest_total": 0,
    "suggest_time_in_millis": 0,
    "suggest_current": 0
},
 when the 2m interval completed.

"search": {
    "open_contexts": 1,
    "query_total": 0,
    "query_time_in_millis": 0,
    "query_current": 0,
    "fetch_total": 0,
    "fetch_time_in_millis": 0,
    "fetch_current": 0,
    "scroll_total": 0,
    "scroll_time_in_millis": 0,
    "scroll_current": 0,
    "point_in_time_total": 2,
    "point_in_time_time_in_millis": 255747,
    "point_in_time_current": 1,
    "suggest_total": 0,
    "suggest_time_in_millis": 0,
    "suggest_current": 0
},
 when the 3m interval completed.

"search": {
    "open_contexts": 0,
    "query_total": 0,
    "query_time_in_millis": 0,
    "query_current": 0,
    "fetch_total": 0,
    "fetch_time_in_millis": 0,
    "fetch_current": 0,
    "scroll_total": 0,
    "scroll_time_in_millis": 0,
    "scroll_current": 0,
    "point_in_time_total": 3,
    "point_in_time_time_in_millis": 469004,
    "point_in_time_current": 0,
    "suggest_total": 0,
    "suggest_time_in_millis": 0,
    "suggest_current": 0
},

Issues Resolved

#1147

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Ajay Kumar Movva <movvaam@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@ajaymovva ajaymovva marked this pull request as ready for review August 2, 2022 13:30
@ajaymovva ajaymovva requested review from a team and reta as code owners August 2, 2022 13:30
@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2022

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2022

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2022

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2022

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2022

Gradle Check (Jenkins) Run Completed with:

…eature/pit_stats

Signed-off-by: Ajay Kumar Movva <movvaam@amazon.com>
@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2022

Gradle Check (Jenkins) Run Completed with:

@ajaymovva ajaymovva changed the title Added Node Stats api changes for the Point in time Added ServiceLayer Node Stats changes for the Point in time Aug 3, 2022
@ajaymovva ajaymovva changed the title Added ServiceLayer Node Stats changes for the Point in time Point In Time Node Stats API Service Layer Changes Aug 3, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2022

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2022

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2022

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2022

Gradle Check (Jenkins) Run Completed with:

@sachinpkale
Copy link
Member

Please add a sample output of node stats API in the PR description. I am not sure if I understand what each metric provides just by looking at the name. For example, from PR description, pit_total: Completed pit contexts, does it mean active PIT contexts are not counted under total? If so, why don't we name it as pit_completed?

@ajaymovva
Copy link
Contributor Author

ajaymovva commented Aug 4, 2022

Please add a sample output of node stats API in the PR description. I am not sure if I understand what each metric provides just by looking at the name. For example, from PR description, pit_total: Completed pit contexts, does it mean active PIT contexts are not counted under total? If so, why don't we name it as pit_completed?

Added the Sample Output in the PR Description.
I agree that some of the stats can be modified into better naming. The reason why we used this format is to make sure we are inline with the other search related stats. All the other search stats are using the same format to emit the node stats response.

Reference: 

"search": {
    "open_contexts": 2,
    "query_total": 0,
    "query_time_in_millis": 0,
    "query_current": 0,
    "fetch_total": 0,
    "fetch_time_in_millis": 0,
    "fetch_current": 0,
    "scroll_total": 0,
    "scroll_time_in_millis": 0,
    "scroll_current": 0,
    "point_in_time_total": 1,
    "point_in_time_time_in_millis": 99516,
    "point_in_time_current": 2,
    "suggest_total": 0,
    "suggest_time_in_millis": 0,
    "suggest_current": 0
},

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2022

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Ajay Kumar Movva <movvaam@amazon.com>
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2022

Gradle Check (Jenkins) Run Completed with:

@ajaymovva ajaymovva requested a review from reta August 4, 2022 14:31
@reta
Copy link
Collaborator

reta commented Aug 4, 2022

@ajaymovva
Copy link
Contributor Author

ajaymovva commented Aug 4, 2022

@ajaymovva could you please:

  • update api specs [1]
  • create a followup documentation issue [2] to document the payload changes

[1] https://github.com/opensearch-project/OpenSearch/blob/main/rest-api-spec/src/main/resources/rest-api-spec/test/cat.shards/10_basic.yml#L11 [2] https://github.com/opensearch-project/documentation-website/

This PR is only for the service layer changes related to node stats.

  • we will have the follow up rest layer PR which will have the change of update api specs.
  • we already have the documentation issue created for the pit changes. #674

@sachinpkale
Copy link
Member

We use squash and merge policy while merging PRs. That means PR title becomes commit message for the merged PR. Please use imperative mood while writing PR title.

@ajaymovva ajaymovva changed the title Point In Time Node Stats API Service Layer Changes Added Point In time Node Stats API ServiceLayer Changes Aug 8, 2022
@ajaymovva ajaymovva changed the title Added Point In time Node Stats API ServiceLayer Changes Added Point In Time Node Stats API ServiceLayer Changes Aug 8, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2022

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Ajay Kumar Movva <movvaam@amazon.com>
@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2022

Gradle Check (Jenkins) Run Completed with:

@codecov-commenter
Copy link

Codecov Report

Merging #4030 (7879a6b) into main (c665e7c) will decrease coverage by 0.20%.
The diff coverage is 91.42%.

@@             Coverage Diff              @@
##               main    #4030      +/-   ##
============================================
- Coverage     70.62%   70.41%   -0.21%     
+ Complexity    57073    56967     -106     
============================================
  Files          4603     4603              
  Lines        274500   274535      +35     
  Branches      40206    40209       +3     
============================================
- Hits         193856   193319     -537     
- Misses        64393    64949     +556     
- Partials      16251    16267      +16     
Impacted Files Coverage Δ
...pensearch/index/search/stats/ShardSearchStats.java 60.55% <90.90%> (+3.40%) ⬆️
...org/opensearch/index/search/stats/SearchStats.java 84.74% <91.66%> (+1.73%) ⬆️
...java/org/opensearch/client/indices/DataStream.java 0.00% <0.00%> (-76.09%) ⬇️
.../opensearch/client/indices/CloseIndexResponse.java 17.50% <0.00%> (-60.00%) ⬇️
.../action/admin/indices/flush/ShardFlushRequest.java 50.00% <0.00%> (-50.00%) ⬇️
...cluster/coordination/PendingClusterStateStats.java 20.00% <0.00%> (-48.00%) ⬇️
...search/aggregations/pipeline/HoltWintersModel.java 21.47% <0.00%> (-44.97%) ⬇️
...regations/metrics/AbstractHyperLogLogPlusPlus.java 51.72% <0.00%> (-44.83%) ⬇️
.../java/org/opensearch/search/dfs/AggregatedDfs.java 54.83% <0.00%> (-41.94%) ⬇️
...pensearch/action/ingest/DeletePipelineRequest.java 31.25% <0.00%> (-37.50%) ⬇️
... and 475 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants