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

Segment Replication - Recover all translog ops when flipping to able engine #6352

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

mch2
Copy link
Member

@mch2 mch2 commented Feb 17, 2023

Description

Similar to #6314, when we flip to a writeable engine with SR we do not want to limit to the global checkpoint and rather recover all ops.

Issues Resolved

Related to flaky tests, these tests are still muted until WAIT_UNTIL issue has been fixed.
#6065
#5946
#5669

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.

@@ -4314,7 +4314,7 @@ public void close() throws IOException {

// When the new engine is created, translogs are synced from remote store onto local. Since remote store is the source
// of truth for translog, we play all translogs that exists locally. Otherwise, the recoverUpto happens upto global checkpoint.
long recoverUpto = this.isRemoteTranslogEnabled() ? Long.MAX_VALUE : globalCheckpoint;
long recoverUpto = this.isRemoteTranslogEnabled() || indexSettings().isSegRepEnabled() ? Long.MAX_VALUE : globalCheckpoint;
Copy link
Member

Choose a reason for hiding this comment

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

nit: Update comment providing details around why change is needed for segment replication ?

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2023

Codecov Report

Merging #6352 (3af9016) into main (7914c04) will increase coverage by 0.03%.
The diff coverage is 33.33%.

📣 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    #6352      +/-   ##
============================================
+ Coverage     70.73%   70.77%   +0.03%     
- Complexity    59024    59049      +25     
============================================
  Files          4800     4799       -1     
  Lines        282453   282421      -32     
  Branches      40718    40717       -1     
============================================
+ Hits         199799   199889      +90     
+ Misses        66259    66133     -126     
- Partials      16395    16399       +4     
Impacted Files Coverage Δ
...in/java/org/opensearch/index/shard/IndexShard.java 70.45% <0.00%> (+0.29%) ⬆️
...tore/remote/directory/RemoteSnapshotDirectory.java 3.12% <0.00%> (ø)
...arch/index/store/remote/utils/TransferManager.java 3.03% <ø> (ø)
...dex/store/remote/file/OnDemandBlockIndexInput.java 73.01% <100.00%> (ø)
.../java/org/opensearch/node/NodeClosedException.java 50.00% <0.00%> (-50.00%) ⬇️
...ch/transport/ReceiveTimeoutTransportException.java 50.00% <0.00%> (-50.00%) ⬇️
.../opensearch/client/indices/CloseIndexResponse.java 42.50% <0.00%> (-48.75%) ⬇️
...cluster/coordination/PublishClusterStateStats.java 33.33% <0.00%> (-37.51%) ⬇️
...ion/admin/cluster/node/info/PluginsAndModules.java 53.12% <0.00%> (-34.38%) ⬇️
...regations/metrics/AbstractHyperLogLogPlusPlus.java 63.79% <0.00%> (-32.76%) ⬇️
... and 495 more

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

…able engine.

Signed-off-by: Marc Handalian <handalm@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.SearchWeightedRoutingIT.testShardRoutingWithNetworkDisruption_FailOpenEnabled

@dreamer-89 dreamer-89 merged commit c772596 into opensearch-project:main Feb 17, 2023
@dreamer-89 dreamer-89 added the backport 2.x Backport to 2.x branch label Feb 17, 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-6352-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 c772596398d1646b48217214e3bc5904001413df
# Push it to GitHub
git push --set-upstream origin backport/backport-6352-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-6352-to-2.x.

@mch2 mch2 deleted the resetEngine branch February 17, 2023 16:48
dreamer-89 pushed a commit to dreamer-89/OpenSearch that referenced this pull request Feb 18, 2023
…able engine. (opensearch-project#6352)

Signed-off-by: Marc Handalian <handalm@amazon.com>
dreamer-89 added a commit that referenced this pull request Feb 18, 2023
…able engine. (#6352) (#6371)

Signed-off-by: Marc Handalian <handalm@amazon.com>
Co-authored-by: Marc Handalian <handalm@amazon.com>
mch2 added a commit to mch2/OpenSearch that referenced this pull request Mar 4, 2023
…able engine. (opensearch-project#6352)

Signed-off-by: Marc Handalian <handalm@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