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 unclosed store references with SearchOnlyReplicaIT #16435

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport 267c68e from #16106.

… is unknown. (#16106)

This PR fixes a bug with node-node pull based replication where if the replica does not know
the DiscoveryNode of its primary we would fail after constructing a
SegmentReplicationTarget that holds a store reference.  Only after replication
is started would a failure occur because the source node is null, and the target would not get cleaned up.
Push based replication already handled this case by catching any error and closing the target.
This update ensures the validation is done before constructing our PrimaryShardReplicationSource, before
any target object is created in both cases push and pull.

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

❌ Gradle check result for 2eb3e49: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

✅ Gradle check result for 2eb3e49: SUCCESS

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 71.81%. Comparing base (5617340) to head (2eb3e49).
Report is 9 commits behind head on 2.x.

Files with missing lines Patch % Lines
...ces/replication/PrimaryShardReplicationSource.java 0.00% 0 Missing and 2 partials ⚠️
...s/replication/SegmentReplicationSourceFactory.java 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                2.x   #16435      +/-   ##
============================================
+ Coverage     71.75%   71.81%   +0.05%     
- Complexity    65231    65344     +113     
============================================
  Files          5312     5312              
  Lines        304646   304913     +267     
  Branches      44324    44423      +99     
============================================
+ Hits         218604   218969     +365     
+ Misses        67796    67708      -88     
+ Partials      18246    18236      -10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dbwiddis dbwiddis merged commit 3312eda into 2.x Oct 22, 2024
63 of 65 checks passed
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.

3 participants