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

[Remote Store] Get SeqNo from Segment Info and integ tests for restore flow #6067

Merged
merged 2 commits into from
Feb 3, 2023

Conversation

sachinpkale
Copy link
Member

@sachinpkale sachinpkale commented Jan 30, 2023

Description

  • Add integration tests for remote store restore flow.
  • Few changes discovered as part of integ test runs.

Issues Resolved

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.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

assert indexShard.getEngine() instanceof InternalEngine : "Expected shard with InternalEngine, got: "
+ indexShard.getEngine().getClass();
final long lastRefreshedCheckpoint = ((InternalEngine) indexShard.getEngine()).lastRefreshedCheckpoint();
final long lastRefreshedCheckpoint = indexShard.getEngine().getMaxSeqNoFromSegmentInfos(segmentInfosSnapshot);
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should rename lastRefreshedCheckpoint to maxSeqNoFromSegmentIfnos ?

ensureYellowAndNoInitializingShards(INDEX_NAME);
ensureGreen(INDEX_NAME);

Map<String, Long> indexStats = indexData();
Copy link
Collaborator

Choose a reason for hiding this comment

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

how do we sure that remote segment store is up to date here ? Should we check the local fs , in case we don't have any stats.

Copy link
Member Author

Choose a reason for hiding this comment

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

We trigger explicit refresh/flush which calls RemoteStoreRefreshListener in the same flow. So, if remote store is available, the segments should be uploaded. Test failure means some problem with the code and we need to fix it.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2023

Gradle Check (Jenkins) Run Completed with:

Sachin Kale added 2 commits February 3, 2023 10:00
Signed-off-by: Sachin Kale <kalsac@amazon.com>
Signed-off-by: Sachin Kale <kalsac@amazon.com>
@sachinpkale
Copy link
Member Author

Gradle Check (Jenkins) Run Completed with:

* **RESULT:** FAILURE ❌

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

* **CommitID:** [6888f87](https://github.com/opensearch-project/OpenSearch/commit/6888f87bb146f2ed512e20e5383fa5e0a5cdcd9e)
  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?

org.opensearch.remotestore.RemoteStoreIT.testRemoteTranslogRestore test was flaky due to the bug in #5845. After merge of #6086, rebased the changes, should be fine now.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.geo.search.aggregations.bucket.GeoTileGridIT.testGeoShapes

@codecov-commenter
Copy link

Codecov Report

Merging #6067 (96a1678) into main (54ce423) will decrease coverage by 0.16%.
The diff coverage is 42.85%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##               main    #6067      +/-   ##
============================================
- Coverage     70.90%   70.74%   -0.16%     
+ Complexity    58904    58799     -105     
============================================
  Files          4778     4778              
  Lines        281149   281150       +1     
  Branches      40622    40622              
============================================
- Hits         199346   198906     -440     
- Misses        65480    65881     +401     
- Partials      16323    16363      +40     
Impacted Files Coverage Δ
...uster/routing/allocation/IndexMetadataUpdater.java 86.39% <0.00%> (ø)
...a/org/opensearch/test/OpenSearchIntegTestCase.java 55.33% <0.00%> (-1.59%) ⬇️
...search/index/shard/RemoteStoreRefreshListener.java 81.30% <100.00%> (+1.49%) ⬆️
...search/indices/recovery/RecoveryTargetHandler.java 0.00% <0.00%> (-100.00%) ⬇️
...adonly/AddIndexBlockClusterStateUpdateRequest.java 0.00% <0.00%> (-75.00%) ⬇️
...a/org/opensearch/client/cluster/ProxyModeInfo.java 0.00% <0.00%> (-60.00%) ⬇️
...ava/org/opensearch/action/NoSuchNodeException.java 0.00% <0.00%> (-50.00%) ⬇️
...ch/transport/ReceiveTimeoutTransportException.java 50.00% <0.00%> (-50.00%) ⬇️
...main/java/org/opensearch/ingest/ProcessorInfo.java 21.05% <0.00%> (-47.37%) ⬇️
...rc/main/java/org/opensearch/ingest/IngestInfo.java 34.48% <0.00%> (-44.83%) ⬇️
... and 499 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@gbbafna gbbafna changed the title [Remote Store] Add integ tests for restore flow from remote store [Remote Store] Get SeqNo from Segment Info and integ tests for restore flow Feb 3, 2023
@gbbafna gbbafna merged commit f01d3d2 into opensearch-project:main Feb 3, 2023
@gbbafna gbbafna added the backport 2.x Backport to 2.x branch label Feb 3, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 3, 2023
…e flow (#6067)

*  Get SeqNo from Segment Info and add integ tests for restore flow from remote store
Signed-off-by: Sachin Kale <kalsac@amazon.com>
(cherry picked from commit f01d3d2)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
kotwanikunal pushed a commit that referenced this pull request Feb 3, 2023
…e flow (#6067)

*  Get SeqNo from Segment Info and add integ tests for restore flow from remote store
Signed-off-by: Sachin Kale <kalsac@amazon.com>
(cherry picked from commit f01d3d2)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
kotwanikunal pushed a commit that referenced this pull request Feb 3, 2023
…e flow (#6067) (#6171)

*  Get SeqNo from Segment Info and add integ tests for restore flow from remote store
Signed-off-by: Sachin Kale <kalsac@amazon.com>
(cherry picked from commit f01d3d2)
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>
mch2 pushed a commit to mch2/OpenSearch that referenced this pull request Mar 4, 2023
…e flow (opensearch-project#6067)

*  Get SeqNo from Segment Info and add integ tests for restore flow from remote store
Signed-off-by: Sachin Kale <kalsac@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 skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants