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

[SnapshotV2] Add snapshot size to status response for shallow V2 snapshots #15573

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ltaragi
Copy link
Contributor

@ltaragi ltaragi commented Sep 2, 2024

Description

  • The primaryStoreSize is calculated at the time of consolidation of shard level info in InternalClusterInfoService.java
  • This primaryStoreSize is further included in ClusterInfo. It also implements getPrimaryStoreSize, which can be called during the snapshot creation to persist this piece of information as the snapshot's size in bytes inside SnapshotInfo
  • This size in bytes value is read from SnapshotInfo and returned for shallow V2 snapshots
  • Use assertBusy to prevent flakiness in org.opensearch.snapshots.SnapshotStatusApisIT.testStatusAPICallForShallowCopySnapshot

Related Issues

Resolves this comment of #15463

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.

Copy link
Contributor

github-actions bot commented Sep 2, 2024

❌ Gradle check result for b2bda82: 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?

Copy link
Contributor

github-actions bot commented Sep 2, 2024

❌ Gradle check result for 39248a5: 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?

Copy link
Contributor

github-actions bot commented Sep 3, 2024

❕ Gradle check result for 002abda: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.smoketest.SmokeTestMultiNodeClientYamlTestSuiteIT.test {yaml=search.aggregation/360_date_histogram/Date histogram aggregation w/ shared field range test}

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

Copy link

codecov bot commented Sep 3, 2024

Codecov Report

Attention: Patch coverage is 52.38095% with 30 lines in your changes missing coverage. Please review.

Project coverage is 72.01%. Comparing base (036f6bc) to head (cefa0bc).
Report is 157 commits behind head on main.

Files with missing lines Patch % Lines
...in/java/org/opensearch/snapshots/SnapshotInfo.java 55.55% 6 Missing and 6 partials ⚠️
...admin/cluster/snapshots/status/SnapshotStatus.java 35.71% 8 Missing and 1 partial ⚠️
.../main/java/org/opensearch/cluster/ClusterInfo.java 45.45% 4 Missing and 2 partials ⚠️
...apshots/status/TransportSnapshotsStatusAction.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #15573      +/-   ##
============================================
+ Coverage     71.92%   72.01%   +0.09%     
- Complexity    64400    64446      +46     
============================================
  Files          5281     5281              
  Lines        300995   301045      +50     
  Branches      43479    43492      +13     
============================================
+ Hits         216491   216802     +311     
+ Misses        66793    66432     -361     
- Partials      17711    17811     +100     

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

@ltaragi
Copy link
Contributor Author

ltaragi commented Sep 3, 2024

❕ Gradle check result for 002abda: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.smoketest.SmokeTestMultiNodeClientYamlTestSuiteIT.test {yaml=search.aggregation/360_date_histogram/Date histogram aggregation w/ shared field range test}

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

Flaky test #14408

@@ -96,7 +99,12 @@ public class SnapshotStatus implements ToXContentObject, Writeable {
includeGlobalState = in.readOptionalBoolean();
final long startTime = in.readLong();
final long time = in.readLong();
updateShardStats(startTime, time);
if (in.getVersion().onOrAfter(Version.CURRENT)) {

Choose a reason for hiding this comment

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

While checking this in 'main', please could you help add a TODO comment with the specific version this needs to be replaced with in the follow-up PR? Applicable for all places we have added 'Version.CURRENT'

Copy link
Contributor

❌ Gradle check result for 8e7af89: 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?

Copy link
Contributor

❕ Gradle check result for cefa0bc: 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.

@@ -115,6 +115,8 @@ public class InternalClusterInfoService implements ClusterInfoService, ClusterSt
private volatile Map<String, FileCacheStats> nodeFileCacheStats;
private volatile IndicesStatsSummary indicesStatsSummary;
// null if this node is not currently the cluster-manager

private volatile long primaryStoreSize;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like we already have final Map<String, Long> shardSizes; , which store shard level sizes. Can we just use this to retrieve shard sizes for v2 ?

@opensearch-trigger-bot
Copy link
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@opensearch-trigger-bot opensearch-trigger-bot bot added stalled Issues that have stalled and removed stalled Issues that have stalled labels Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

3 participants