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 2 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?

…shots

Signed-off-by: Lakshya Taragi <lakshya.taragi@gmail.com>
Signed-off-by: Lakshya Taragi <lakshya.taragi@gmail.com>
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 50.98039% with 25 lines in your changes missing coverage. Please review.

Project coverage is 71.90%. Comparing base (41ba00a) to head (002abda).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...in/java/org/opensearch/snapshots/SnapshotInfo.java 47.36% 7 Missing and 3 partials ⚠️
...admin/cluster/snapshots/status/SnapshotStatus.java 41.66% 6 Missing and 1 partial ⚠️
.../main/java/org/opensearch/cluster/ClusterInfo.java 55.55% 2 Missing and 2 partials ⚠️
...apshots/status/TransportSnapshotsStatusAction.java 0.00% 3 Missing ⚠️
...ava/org/opensearch/snapshots/SnapshotsService.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #15573      +/-   ##
============================================
- Coverage     71.91%   71.90%   -0.01%     
+ Complexity    63864    63817      -47     
============================================
  Files          5251     5252       +1     
  Lines        298375   298491     +116     
  Branches      43146    43174      +28     
============================================
+ Hits         214572   214639      +67     
- Misses        66158    66162       +4     
- Partials      17645    17690      +45     

☔ 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'

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.

2 participants