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

[Backport 2.x] Fix SegmentReplicationIT.testReplicaHasDiffFilesThanPrimary for node-node replication #8936

Merged
merged 1 commit into from
Jul 27, 2023

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport 4ad4182 from #8912.

…node replication (#8912)

* Fix SegmentReplicationIT.testReplicahasDiffFilesThanPrimary

This test is now failing for node-node replication. On the primary shard the prepareSegmentReplication method should cancel any ongoing replication if it is running and start a new sync.  Thisis incorrectly using Map.compute which will not replace the existing handler entry in the allocationIdToHandlers map. It will only cancel the existing source handler. As a result this can leave the copyState map with an entry and hold an index commit while the test is cleaning up.  The copyState is only cleared when a handler is cancelled directly or from a cluster state update.

Signed-off-by: Marc Handalian <[email protected]>

* PR feedback.

Signed-off-by: Marc Handalian <[email protected]>

---------

Signed-off-by: Marc Handalian <[email protected]>
(cherry picked from commit 4ad4182)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.action.admin.cluster.node.tasks.ResourceAwareTasksTests.testTaskResourceTrackingDuringTaskCancellation

@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Merging #8936 (fb758e4) into 2.x (212dba4) will increase coverage by 0.12%.
The diff coverage is 81.81%.

@@             Coverage Diff              @@
##                2.x    #8936      +/-   ##
============================================
+ Coverage     70.74%   70.87%   +0.12%     
- Complexity    57284    57353      +69     
============================================
  Files          4745     4745              
  Lines        271064   271070       +6     
  Branches      39981    39984       +3     
============================================
+ Hits         191768   192116     +348     
+ Misses        62873    62460     -413     
- Partials      16423    16494      +71     
Files Changed Coverage Δ
...ndices/replication/OngoingSegmentReplications.java 90.47% <81.81%> (-1.84%) ⬇️

... and 460 files with indirect coverage changes

@mch2 mch2 merged commit 5164fe2 into 2.x Jul 27, 2023
@mch2 mch2 deleted the backport/backport-8912-to-2.x branch July 27, 2023 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant