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

Return unformatted Segment Replication metrics that take upload time into account for replication lag #10723

Merged
merged 4 commits into from
Oct 20, 2023

Conversation

Poojita-Raj
Copy link
Contributor

Description

This change does 2 things:

  1. Returns segment replication stats metrics in an unformatted raw format unless requested in a human readable format (query parameter of human=true)
  2. The replication lag metric being returned MAX_REPLICATION_LAG now takes into account the total replication lag i.e., it now includes the time taken to upload data to the remote store.

Related Issues

Resolves #10666
Resolves #10722

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)
  • Public documentation issue/PR created

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.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Oct 18, 2023

Compatibility status:

Checks if related components are compatible with change c042c17

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/neural-search.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

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@Poojita-Raj Poojita-Raj force-pushed the stats-segrep branch 2 times, most recently from b7aa214 to f171a97 Compare October 20, 2023 05:19
Signed-off-by: Poojita Raj <poojiraj@amazon.com>
Signed-off-by: Poojita Raj <poojiraj@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.repositories.azure.AzureBlobContainerRetriesTests.testWriteLargeBlob
      1 org.opensearch.index.shard.RemoteStoreRefreshListenerTests.testRefreshSuccessOnSecondAttempt

@codecov
Copy link

codecov bot commented Oct 20, 2023

Codecov Report

Merging #10723 (c042c17) into main (200ad5d) will increase coverage by 0.11%.
Report is 9 commits behind head on main.
The diff coverage is 82.75%.

@@             Coverage Diff              @@
##               main   #10723      +/-   ##
============================================
+ Coverage     71.12%   71.23%   +0.11%     
- Complexity    58545    58606      +61     
============================================
  Files          4859     4859              
  Lines        276252   276269      +17     
  Branches      40191    40193       +2     
============================================
+ Hits         196473   196800     +327     
+ Misses        63347    63035     -312     
- Partials      16432    16434       +2     
Files Coverage Δ
...in/java/org/opensearch/index/ReplicationStats.java 93.54% <100.00%> (+16.12%) ⬆️
...in/java/org/opensearch/index/shard/IndexShard.java 69.50% <100.00%> (-0.11%) ⬇️
.../indices/replication/common/ReplicationTarget.java 80.00% <100.00%> (+1.05%) ⬆️
...nsearch/index/store/RemoteStoreFileDownloader.java 92.15% <84.00%> (-0.87%) ⬇️
...ices/replication/RemoteStoreReplicationSource.java 85.24% <75.00%> (-5.83%) ⬇️

... and 472 files with indirect coverage changes

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Copy link
Member

@ashking94 ashking94 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@ashking94 ashking94 left a comment

Choose a reason for hiding this comment

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

one nit comment, but given this is a field name which is user facing, pls incorporate the same.

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

Gradle Check (Jenkins) Run Completed with:

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

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@dreamer-89 dreamer-89 merged commit 4f8bcff into opensearch-project:main Oct 20, 2023
16 checks passed
@Poojita-Raj Poojita-Raj added the backport 2.x Backport to 2.x branch label Oct 20, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 20, 2023
…into account for replication lag (#10723)

* Return unformatted segrep metrics in stats

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

* Take upload time into account for replication time lag

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

* unformat segrep stats

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

* remove unused field names

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

---------

Signed-off-by: Poojita Raj <poojiraj@amazon.com>
(cherry picked from commit 4f8bcff)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
mch2 pushed a commit that referenced this pull request Oct 21, 2023
…into account for replication lag (#10723) (#10804)

* Return unformatted segrep metrics in stats



* Take upload time into account for replication time lag



* unformat segrep stats



* remove unused field names



---------


(cherry picked from commit 4f8bcff)

Signed-off-by: Poojita Raj <poojiraj@amazon.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>
austintlee pushed a commit to austintlee/OpenSearch that referenced this pull request Oct 23, 2023
…into account for replication lag (opensearch-project#10723)

* Return unformatted segrep metrics in stats

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

* Take upload time into account for replication time lag

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

* unformat segrep stats

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

* remove unused field names

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

---------

Signed-off-by: Poojita Raj <poojiraj@amazon.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…into account for replication lag (opensearch-project#10723)

* Return unformatted segrep metrics in stats

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

* Take upload time into account for replication time lag

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

* unformat segrep stats

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

* remove unused field names

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

---------

Signed-off-by: Poojita Raj <poojiraj@amazon.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 bug Something isn't working Indexing:Replication Issues and PRs related to core replication framework eg segrep skip-changelog
Projects
None yet
4 participants