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 support for search replica to return segrep stats #16678

Merged
merged 17 commits into from
Dec 12, 2024

Conversation

vinaykpud
Copy link
Contributor

Description

In this PR we are adding,

  • Support for search replica to return its segrep stats
  • This doesn't change any of the existing implementation stats calculation for the regular replicas
  • For search replicas we are just calculating the stats using the difference between the computed checkpoint in the shard and latest pulled checkpoint from the remote store. So this stat will help to know if any problematic replications in search replica which is taking longer.

Related Issues

Resolves #15534
Related #15306

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

… replica in shards

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
@github-actions github-actions bot added the v2.19.0 Issues and PRs related to version 2.19.0 label Nov 18, 2024
@vinaykpud vinaykpud force-pushed the stats-search-replica branch from 765852d to 93e48ff Compare November 18, 2024 20:46
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
@vinaykpud vinaykpud force-pushed the stats-search-replica branch from 93e48ff to 39576c3 Compare November 18, 2024 20:50
Copy link
Contributor

❌ Gradle check result for 39576c3: null

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

✅ Gradle check result for 39576c3: SUCCESS

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.14%. Comparing base (5ba909a) to head (70cb875).
Report is 6 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #16678      +/-   ##
============================================
+ Coverage     72.11%   72.14%   +0.03%     
- Complexity    65237    65271      +34     
============================================
  Files          5318     5318              
  Lines        304003   304051      +48     
  Branches      43992    43990       -2     
============================================
+ Hits         219228   219372     +144     
+ Misses        66874    66702     -172     
- Partials      17901    17977      +76     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
Copy link
Contributor

❌ Gradle check result for 803c15b: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@vinaykpud vinaykpud closed this Nov 22, 2024
@vinaykpud vinaykpud reopened this Nov 22, 2024
Copy link
Contributor

❌ Gradle check result for 803c15b: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
Copy link
Contributor

✅ Gradle check result for c6e2c80: SUCCESS

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
Copy link
Contributor

❕ Gradle check result for d3a8a89: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@vinaykpud vinaykpud marked this pull request as ready for review November 26, 2024 00:28
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
Copy link
Contributor

❌ Gradle check result for 6944ce6: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@vinaykpud vinaykpud closed this Dec 11, 2024
@vinaykpud vinaykpud reopened this Dec 11, 2024
Copy link
Contributor

❌ Gradle check result for 6944ce6: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@vinaykpud vinaykpud closed this Dec 11, 2024
@vinaykpud vinaykpud reopened this Dec 11, 2024
Copy link
Contributor

❌ Gradle check result for 6944ce6: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
Copy link
Contributor

❌ Gradle check result for 046e26c: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
Copy link
Contributor

✅ Gradle check result for e09dde8: SUCCESS

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
mch2
mch2 previously approved these changes Dec 12, 2024
@mch2 mch2 added the backport 2.x Backport to 2.x branch label Dec 12, 2024
Copy link
Contributor

❌ Gradle check result for 424ad09: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@mch2 mch2 dismissed their stale review December 12, 2024 22:34

stale

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
Copy link
Contributor

❕ Gradle check result for 70cb875: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.http.SearchRestCancellationIT.testAutomaticCancellationMultiSearchDuringQueryPhase
      1 org.opensearch.http.SearchRestCancellationIT.testAutomaticCancellationDuringQueryPhase
      1 org.opensearch.http.SearchRestCancellationIT.testAutomaticCancellationDuringFetchPhase

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@mch2 mch2 merged commit b67cdf4 into opensearch-project:main Dec 12, 2024
38 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Dec 12, 2024
* Added implementation for the stats calculation for search and regular replica in shards

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Updated changelog

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Added unit tests for TransportSegmentReplicationStatsAction

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* fixed java style after running precommit locally

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* refined the test cases

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* fixed style issues

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Made changes in the bytes to download calculation based on comments

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* added addReplicaStats method to SegmentReplicationPerGroupStats

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* fixed style issues

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Fixed issue with immutable set

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Fixed PR comments and moved the integration tests to separate module

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Fixed failing integ tests

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Fixed failing integ test

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* fixed some comments for PR

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* fixed failing tests

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

---------

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
(cherry picked from commit b67cdf4)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
mingshl pushed a commit to mingshl/OpenSearch-Mingshl that referenced this pull request Dec 16, 2024
…roject#16678)

* Added implementation for the stats calculation for search and regular replica in shards

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Updated changelog

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Added unit tests for TransportSegmentReplicationStatsAction

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* fixed java style after running precommit locally

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* refined the test cases

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* fixed style issues

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Made changes in the bytes to download calculation based on comments

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* added addReplicaStats method to SegmentReplicationPerGroupStats

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* fixed style issues

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Fixed issue with immutable set

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Fixed PR comments and moved the integration tests to separate module

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Fixed failing integ tests

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Fixed failing integ test

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* fixed some comments for PR

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* fixed failing tests

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

---------

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

remove license

Signed-off-by: Mingshi Liu <mingshl@amazon.com>
mingshl pushed a commit to mingshl/OpenSearch-Mingshl that referenced this pull request Dec 16, 2024
…roject#16678)

* Added implementation for the stats calculation for search and regular replica in shards

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Updated changelog

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Added unit tests for TransportSegmentReplicationStatsAction

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* fixed java style after running precommit locally

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* refined the test cases

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* fixed style issues

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Made changes in the bytes to download calculation based on comments

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* added addReplicaStats method to SegmentReplicationPerGroupStats

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* fixed style issues

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Fixed issue with immutable set

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Fixed PR comments and moved the integration tests to separate module

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Fixed failing integ tests

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Fixed failing integ test

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* fixed some comments for PR

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* fixed failing tests

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

---------

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

remove license

Signed-off-by: Mingshi Liu <mingshl@amazon.com>
mch2 pushed a commit that referenced this pull request Dec 16, 2024
)

* Added implementation for the stats calculation for search and regular replica in shards



* Updated changelog



* Added unit tests for TransportSegmentReplicationStatsAction



* fixed java style after running precommit locally



* refined the test cases



* fixed style issues



* Made changes in the bytes to download calculation based on comments



* added addReplicaStats method to SegmentReplicationPerGroupStats



* fixed style issues



* Fixed issue with immutable set



* Fixed PR comments and moved the integration tests to separate module



* Fixed failing integ tests



* Fixed failing integ test



* fixed some comments for PR



* fixed failing tests



---------


(cherry picked from commit b67cdf4)

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch v2.19.0 Issues and PRs related to version 2.19.0
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Update Segment replication stats APIs to support pull based architecture
2 participants