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] Override segment replication handler for duplicate request from replica #6693

Merged
merged 2 commits into from
Mar 16, 2023

Conversation

dreamer-89
Copy link
Member

@dreamer-89 dreamer-89 commented Mar 15, 2023

Description

Prevent failures on duplicate segrep request from replica.

With #6636, replica shard handles failures from source node gracefully and clears up its local state without failing replica shard. The primary though can still publish a checkpoint, will trigger replica will start a new round of segrep. With this change, primary first cleans up existing state and create a new one based on request parameters.

Issues Resolved

#6578

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.

@dreamer-89 dreamer-89 changed the title [Segment Replication] Override segment replication handler for new request from same replica [Segment Replication] Override segment replication handler for duplicate request from replica Mar 15, 2023
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Suraj Singh <[email protected]>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.http.SearchRestCancellationIT.testAutomaticCancellationMultiSearchDuringQueryPhase
      1 org.opensearch.cluster.routing.allocation.decider.DiskThresholdDeciderIT.testIndexCreateBlockIsRemovedWhenAnyNodesNotExceedHighWatermarkWithAutoReleaseEnabled

@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (main@ad823b6). Click here to learn what that means.
The diff coverage is 100.00%.

📣 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    #6693   +/-   ##
=======================================
  Coverage        ?   70.66%           
  Complexity      ?    59159           
=======================================
  Files           ?     4809           
  Lines           ?   283454           
  Branches        ?    40867           
=======================================
  Hits            ?   200291           
  Misses          ?    66706           
  Partials        ?    16457           
Impacted Files Coverage Δ
...ndices/replication/OngoingSegmentReplications.java 90.36% <100.00%> (ø)

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

@mch2 mch2 merged commit 6bbe31a into opensearch-project:main Mar 16, 2023
@mch2 mch2 added the backport 2.x Backport to 2.x branch label Mar 16, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 16, 2023
…ate request from replica (#6693)

* [Segment Replication] Override segment replication handler for new request from same replica

Signed-off-by: Suraj Singh <[email protected]>

* Spotless and use map.compute

Signed-off-by: Suraj Singh <[email protected]>

---------

Signed-off-by: Suraj Singh <[email protected]>
(cherry picked from commit 6bbe31a)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dreamer-89 pushed a commit that referenced this pull request Mar 16, 2023
…ate request from replica (#6693) (#6699)

* [Segment Replication] Override segment replication handler for new request from same replica



* Spotless and use map.compute



---------


(cherry picked from commit 6bbe31a)

Signed-off-by: Suraj Singh <[email protected]>
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>
mingshl pushed a commit to mingshl/OpenSearch-Mingshl that referenced this pull request Mar 24, 2023
…ate request from replica (opensearch-project#6693)

* [Segment Replication] Override segment replication handler for new request from same replica

Signed-off-by: Suraj Singh <[email protected]>

* Spotless and use map.compute

Signed-off-by: Suraj Singh <[email protected]>

---------

Signed-off-by: Suraj Singh <[email protected]>
Signed-off-by: Mingshi Liu <[email protected]>
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.

4 participants