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

[Segment Replication] Adding segment replication statistics rolled up at index, node and cluster level #9709

Merged
merged 10 commits into from
Sep 4, 2023

Conversation

Poojita-Raj
Copy link
Contributor

Description

Surfaces existing segment replication statistics -
(1) maxBytesBehind
(2) totalBytesBehind and
(3) maxReplicationLag
at an index, node and cluster level.

Related Issues

Resolves #9417

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
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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.

@Poojita-Raj Poojita-Raj changed the title Adding segment replication statistics rolled up at index, node and cluster level [Segment Replication] Adding segment replication statistics rolled up at index, node and cluster level Sep 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2023

Compatibility status:

Checks if related components are compatible with change 3bef3a3

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/reporting.git]

@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2023

Compatibility status:

Checks if related components are compatible with change c0c20a2

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git]

Signed-off-by: Poojita Raj <poojiraj@amazon.com>
@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2023

Compatibility status:

Checks if related components are compatible with change 01d4dfe

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git]

@mch2
Copy link
Member

mch2 commented Sep 3, 2023

@Poojita-Raj Bwc tests are failing because of wire compatibility of the new field. We need to PR here with 3_0_0, then on the backport to 2.x flip it to 2_10_0, then make another PR to main to flip to 2_10_0.

Signed-off-by: Poojita Raj <poojiraj@amazon.com>
@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

Compatibility status:

Checks if related components are compatible with change 0e64471

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git]

@Poojita-Raj
Copy link
Contributor Author

Gradle Check (Jenkins) Run Completed with:

* **RESULT:** FAILURE ❌

* **URL:** https://build.ci.opensearch.org/job/gradle-check/24302/

* **CommitID:** [0e64471](https://github.com/opensearch-project/OpenSearch/commit/0e6447118f9a98ca3f1c21f7c92c7c6e2650c775)
  Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green.
  Is the failure [a flaky test](https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#flaky-tests) unrelated to your change?

Flaky:
#9688
#7934

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.snapshots.CloneSnapshotIT.testCloneAfterRepoShallowSettingDisabled

@codecov
Copy link

codecov bot commented Sep 4, 2023

Codecov Report

Merging #9709 (7ad9831) into main (63ce832) will decrease coverage by 0.04%.
Report is 1 commits behind head on main.
The diff coverage is 66.07%.

@@             Coverage Diff              @@
##               main    #9709      +/-   ##
============================================
- Coverage     71.07%   71.04%   -0.04%     
- Complexity    57814    57858      +44     
============================================
  Files          4815     4816       +1     
  Lines        272709   272763      +54     
  Branches      39792    39795       +3     
============================================
- Hits         193839   193794      -45     
- Misses        62622    62690      +68     
- Partials      16248    16279      +31     
Files Changed Coverage Δ
...in/java/org/opensearch/index/shard/IndexShard.java 69.03% <25.00%> (-0.44%) ⬇️
...ava/org/opensearch/index/engine/SegmentsStats.java 72.46% <72.72%> (+0.02%) ⬆️
...in/java/org/opensearch/index/ReplicationStats.java 77.41% <77.41%> (ø)
...earch/index/SegmentReplicationPressureService.java 76.69% <100.00%> (ø)
...ensearch/index/SegmentReplicationStatsTracker.java 95.45% <100.00%> (ø)

... and 450 files with indirect coverage changes

Signed-off-by: Rishikesh Pasham <62345295+Rishikesh1159@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

Compatibility status:

Checks if related components are compatible with change 7ad9831

Incompatible components

Incompatible components: [https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/neural-search.git]

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git]

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

Gradle Check (Jenkins) Run Completed with:

@mch2
Copy link
Member

mch2 commented Sep 4, 2023

Gradle Check (Jenkins) Run Completed with:

#9688

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.SearchWeightedRoutingIT.testSearchAggregationWithNetworkDisruption_FailOpenEnabled

@mch2 mch2 merged commit aa83670 into opensearch-project:main Sep 4, 2023
11 of 12 checks passed
@mch2 mch2 added the backport 2.x Backport to 2.x branch label Sep 4, 2023
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-9709-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 aa8367027cddd727cb7da4563187ecfc59dc6ad8
# Push it to GitHub
git push --set-upstream origin backport/backport-9709-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-9709-to-2.x.

@dreamer-89
Copy link
Member

@Poojita-Raj @mch2 : Seems like we need manual backport for this change.

dreamer-89 pushed a commit to dreamer-89/OpenSearch that referenced this pull request Sep 4, 2023
… at index, node and cluster level (opensearch-project#9709)

* add node stats for segrep

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* comment removal

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* changelog

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* address review comments

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* move segrep stats to segments

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* fix failures

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* uniform response for docrep and segrep segment stats

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* remove pri check

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* version 3.0

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

---------

Signed-off-by: Poojita Raj <poojiraj@amazon.com>
Signed-off-by: Rishikesh Pasham <62345295+Rishikesh1159@users.noreply.github.com>
Co-authored-by: Rishikesh Pasham <62345295+Rishikesh1159@users.noreply.github.com>
mch2 pushed a commit that referenced this pull request Sep 4, 2023
… at index, node and cluster level (#9709) (#9741)

* [Segment Replication] Adding segment replication statistics rolled up at index, node and cluster level (#9709)

* add node stats for segrep

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* comment removal

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* changelog

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* address review comments

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* move segrep stats to segments

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* fix failures

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* uniform response for docrep and segrep segment stats

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* remove pri check

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* version 3.0

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

---------

Signed-off-by: Poojita Raj <poojiraj@amazon.com>
Signed-off-by: Rishikesh Pasham <62345295+Rishikesh1159@users.noreply.github.com>
Co-authored-by: Rishikesh Pasham <62345295+Rishikesh1159@users.noreply.github.com>

* Change bwc version to 2.10 from 3.0

Signed-off-by: Suraj Singh <surajrider@gmail.com>

---------

Signed-off-by: Poojita Raj <poojiraj@amazon.com>
Signed-off-by: Rishikesh Pasham <62345295+Rishikesh1159@users.noreply.github.com>
Signed-off-by: Suraj Singh <surajrider@gmail.com>
Co-authored-by: Poojita Raj <poojiraj@amazon.com>
Co-authored-by: Rishikesh Pasham <62345295+Rishikesh1159@users.noreply.github.com>
* compatible open source license.
*/

package org.opensearch.index;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry didn't catch this - lets move this to indices.replication package?

kaushalmahi12 pushed a commit to kaushalmahi12/OpenSearch that referenced this pull request Sep 12, 2023
… at index, node and cluster level (opensearch-project#9709)

* add node stats for segrep

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* comment removal

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* changelog

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* address review comments

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* move segrep stats to segments

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* fix failures

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* uniform response for docrep and segrep segment stats

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* remove pri check

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* version 3.0

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

---------

Signed-off-by: Poojita Raj <poojiraj@amazon.com>
Signed-off-by: Rishikesh Pasham <62345295+Rishikesh1159@users.noreply.github.com>
Co-authored-by: Rishikesh Pasham <62345295+Rishikesh1159@users.noreply.github.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
brusic pushed a commit to brusic/OpenSearch that referenced this pull request Sep 25, 2023
… at index, node and cluster level (opensearch-project#9709)

* add node stats for segrep

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* comment removal

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* changelog

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* address review comments

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* move segrep stats to segments

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* fix failures

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* uniform response for docrep and segrep segment stats

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* remove pri check

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* version 3.0

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

---------

Signed-off-by: Poojita Raj <poojiraj@amazon.com>
Signed-off-by: Rishikesh Pasham <62345295+Rishikesh1159@users.noreply.github.com>
Co-authored-by: Rishikesh Pasham <62345295+Rishikesh1159@users.noreply.github.com>
Signed-off-by: Ivan Brusic <ivan.brusic@flocksafety.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
… at index, node and cluster level (opensearch-project#9709)

* add node stats for segrep

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* comment removal

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* changelog

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* address review comments

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* move segrep stats to segments

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* fix failures

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* uniform response for docrep and segrep segment stats

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* remove pri check

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* version 3.0

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

---------

Signed-off-by: Poojita Raj <poojiraj@amazon.com>
Signed-off-by: Rishikesh Pasham <62345295+Rishikesh1159@users.noreply.github.com>
Co-authored-by: Rishikesh Pasham <62345295+Rishikesh1159@users.noreply.github.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.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 backport-failed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Segment Replication stats in /_nodes/stats and _cluster/stats APIs
4 participants