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

Integrate remote translog download on failover #5699

Merged
merged 13 commits into from
Jan 9, 2023

Conversation

ashking94
Copy link
Member

@ashking94 ashking94 commented Jan 4, 2023

Signed-off-by: Ashish Singh ssashish@amazon.com

Description

Solves #5637

Issues Resolved

Solves #5637

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.

@ashking94
Copy link
Member Author

#5670 for writing integrations tests since much of the change is on integration.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2023

Gradle Check (Jenkins) Run Completed with:

@codecov-commenter
Copy link

codecov-commenter commented Jan 4, 2023

Codecov Report

Merging #5699 (aa4aee8) into main (01a5842) will decrease coverage by 0.06%.
The diff coverage is 93.18%.

@@             Coverage Diff              @@
##               main    #5699      +/-   ##
============================================
- Coverage     71.12%   71.05%   -0.07%     
+ Complexity    58844    58729     -115     
============================================
  Files          4767     4767              
  Lines        280162   280176      +14     
  Branches      40441    40440       -1     
============================================
- Hits         199261   199090     -171     
- Misses        64698    64813     +115     
- Partials      16203    16273      +70     
Impacted Files Coverage Δ
...rc/main/java/org/opensearch/index/IndexModule.java 82.28% <ø> (ø)
...rg/opensearch/index/translog/RemoteFsTranslog.java 70.08% <ø> (-3.65%) ⬇️
...in/java/org/opensearch/indices/IndicesService.java 68.50% <62.50%> (-3.19%) ⬇️
...c/main/java/org/opensearch/index/IndexService.java 74.54% <100.00%> (+0.44%) ⬆️
...in/java/org/opensearch/index/shard/IndexShard.java 70.40% <100.00%> (+0.37%) ⬆️
...h/index/translog/transfer/FileTransferTracker.java 93.75% <100.00%> (+9.37%) ⬆️
...dex/translog/transfer/TranslogTransferManager.java 81.39% <100.00%> (-0.22%) ⬇️
...org/opensearch/index/shard/IndexShardTestCase.java 93.69% <100.00%> (+0.21%) ⬆️
...rch/test/junit/listeners/ReproduceInfoPrinter.java 9.52% <0.00%> (-66.67%) ⬇️
...port/ResponseHandlerFailureTransportException.java 0.00% <0.00%> (-60.00%) ⬇️
... and 479 more

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2023

Gradle Check (Jenkins) Run Completed with:

@sachinpkale
Copy link
Member

#5670 for writing integrations tests since much of the change is on integration.

One unit test can be added to IndexShardTests. We create a shard with remote translog settings and verify class of the translog factory in the EngineConfig.

@ankitkala
Copy link
Member

Just for my understanding, for failover, do we not need any changes in recovery path except having RemoteStoreTranslogRepository initialised properly? Or are you planning to do follow up changes?

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.indices.replication.SegmentReplicationIT.testCancelPrimaryAllocation

Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.snapshots.DedicatedClusterSnapshotRestoreIT.testIndexDeletionDuringSnapshotCreationInQueue

@Bukhtawar Bukhtawar merged commit 32b0e61 into opensearch-project:main Jan 9, 2023
@ashking94 ashking94 added the backport 2.x Backport to 2.x branch label Jan 9, 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:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-5699-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 32b0e618fdb3dd9bb6c83edf3498891199a43dbe
# Push it to GitHub
git push --set-upstream origin backport/backport-5699-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x

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

gbbafna pushed a commit to gbbafna/OpenSearch that referenced this pull request Jan 9, 2023
* Integrate remote translog download on failover

Signed-off-by: Ashish Singh <ssashish@amazon.com>
gbbafna pushed a commit to gbbafna/OpenSearch that referenced this pull request Jan 9, 2023
* Integrate remote translog download on failover

Signed-off-by: Ashish Singh <ssashish@amazon.com>
gbbafna pushed a commit to gbbafna/OpenSearch that referenced this pull request Jan 9, 2023
* Integrate remote translog download on failover

Signed-off-by: Ashish Singh <ssashish@amazon.com>
gbbafna pushed a commit to gbbafna/OpenSearch that referenced this pull request Jan 9, 2023
* Integrate remote translog download on failover

Signed-off-by: Ashish Singh <ssashish@amazon.com>
gbbafna pushed a commit to gbbafna/OpenSearch that referenced this pull request Jan 9, 2023
* Integrate remote translog download on failover

Signed-off-by: Ashish Singh <ssashish@amazon.com>
gbbafna added a commit that referenced this pull request Jan 9, 2023
…hanges (#5757)

* Introduce TranslogFactory for Local/Remote Translog support (#4172)

* Introduce TranslogFactory for Local/Remote Translog support

Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>

* [Remote Translog] Introduce remote translog with upload functionality (#5392)

* Introduce remote translog with upload functionality 

Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Co-authored-by: Bukhtawar Khan <bukhtawa@amazon.com>

* Enable creation of indices using Remote Translog    (#5638)

* Enable creation of indices using Remote Translog behind a setting and feature flag
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>

* [Remote Translog] Add support for downloading files from remote translog (#5649)

* Add support to download translog from remote store during recovery

Signed-off-by: Sachin Kale <kalsac@amazon.com>

* Integrate remote translog download on failover (#5699)

* Integrate remote translog download on failover

Signed-off-by: Ashish Singh <ssashish@amazon.com>

Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Signed-off-by: Sachin Kale <kalsac@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
sachinpkale pushed a commit to sachinpkale/OpenSearch that referenced this pull request Jan 10, 2023
…hanges (opensearch-project#5757)

* Introduce TranslogFactory for Local/Remote Translog support (opensearch-project#4172)

* Introduce TranslogFactory for Local/Remote Translog support

Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>

* [Remote Translog] Introduce remote translog with upload functionality (opensearch-project#5392)

* Introduce remote translog with upload functionality 

Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Co-authored-by: Bukhtawar Khan <bukhtawa@amazon.com>

* Enable creation of indices using Remote Translog    (opensearch-project#5638)

* Enable creation of indices using Remote Translog behind a setting and feature flag
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>

* [Remote Translog] Add support for downloading files from remote translog (opensearch-project#5649)

* Add support to download translog from remote store during recovery

Signed-off-by: Sachin Kale <kalsac@amazon.com>

* Integrate remote translog download on failover (opensearch-project#5699)

* Integrate remote translog download on failover

Signed-off-by: Ashish Singh <ssashish@amazon.com>

Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Signed-off-by: Sachin Kale <kalsac@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
gbbafna added a commit that referenced this pull request Jan 10, 2023
* Introduce TranslogFactory for Local/Remote Translog support (#4172)

* Introduce TranslogFactory for Local/Remote Translog support

Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>

* [Remote Translog] Introduce remote translog with upload functionality (#5392)

* Introduce remote translog with upload functionality 

Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Co-authored-by: Bukhtawar Khan <bukhtawa@amazon.com>

* Enable creation of indices using Remote Translog    (#5638)

* Enable creation of indices using Remote Translog behind a setting and feature flag
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>

* [Remote Translog] Add support for downloading files from remote translog (#5649)

* Add support to download translog from remote store during recovery

Signed-off-by: Sachin Kale <kalsac@amazon.com>

* Integrate remote translog download on failover (#5699)

* Integrate remote translog download on failover

Signed-off-by: Ashish Singh <ssashish@amazon.com>

Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Signed-off-by: Sachin Kale <kalsac@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>

Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Signed-off-by: Sachin Kale <kalsac@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Co-authored-by: Gaurav Bafna <85113518+gbbafna@users.noreply.github.com>
kotwanikunal pushed a commit that referenced this pull request Jan 25, 2023
…hanges (#5757)

* Introduce TranslogFactory for Local/Remote Translog support (#4172)

* Introduce TranslogFactory for Local/Remote Translog support

Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>

* [Remote Translog] Introduce remote translog with upload functionality (#5392)

* Introduce remote translog with upload functionality 

Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Co-authored-by: Bukhtawar Khan <bukhtawa@amazon.com>

* Enable creation of indices using Remote Translog    (#5638)

* Enable creation of indices using Remote Translog behind a setting and feature flag
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>

* [Remote Translog] Add support for downloading files from remote translog (#5649)

* Add support to download translog from remote store during recovery

Signed-off-by: Sachin Kale <kalsac@amazon.com>

* Integrate remote translog download on failover (#5699)

* Integrate remote translog download on failover

Signed-off-by: Ashish Singh <ssashish@amazon.com>

Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Signed-off-by: Sachin Kale <kalsac@amazon.com>
Signed-off-by: Ashish Singh <ssashish@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants