[Backport 2.x] [Segment Replication] Refactor file cleanup logic and fix PIT/Scroll with remote store.#9272
Merged
mch2 merged 2 commits intoopensearch-project:2.xfrom Aug 11, 2023
Merged
Conversation
…with remote store. (opensearch-project#9111) * Remove divergent commit logic with segment replication. This change removes divergent commit paths for segrep node-node and remote store. All replicas with segrep enabled will perform local commits and ignore any incoming segments_n file. This changes the recovery sync with remote store to also exclude the segments_n so that only the fetched infos bytes are committed before an engine is opened. This change also updates deletion logic with segment replication to automatically delete when a file is decref'd to 0. Signed-off-by: Marc Handalian <handalm@amazon.com> * Add more NRTReplicationEngineTests. Signed-off-by: Marc Handalian <handalm@amazon.com> * Ensure old commit files are wiped on remote store sync before we commit a new segmentInfos. Signed-off-by: Marc Handalian <handalm@amazon.com> * Add more shard level tests. Signed-off-by: Marc Handalian <handalm@amazon.com> * Add test ensuring commits are cleaned up on replicas. Signed-off-by: Marc Handalian <handalm@amazon.com> * Self review. Signed-off-by: Marc Handalian <handalm@amazon.com> * Use refresh level sync before recovery Signed-off-by: Marc Handalian <handalm@amazon.com> * PR feedback. Signed-off-by: Marc Handalian <handalm@amazon.com> --------- Signed-off-by: Marc Handalian <handalm@amazon.com> (cherry picked from commit c301544)
kotwanikunal
approved these changes
Aug 11, 2023
Contributor
Gradle Check (Jenkins) Run Completed with:
|
Contributor
|
Compatibility status: |
Member
Author
|
fixed conflict here - ActionListener path updated on main with #9082 |
Contributor
Gradle Check (Jenkins) Run Completed with:
|
Contributor
|
Compatibility status: |
This test is specific to remote store and should not be run for node-node replication. Signed-off-by: Marc Handalian <handalm@amazon.com> (cherry picked from commit a33f67e) Signed-off-by: Marc Handalian <handalm@amazon.com>
Contributor
|
Compatibility status: |
Contributor
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## 2.x #9272 +/- ##
============================================
- Coverage 70.85% 70.75% -0.11%
+ Complexity 57499 57443 -56
============================================
Files 4758 4758
Lines 271801 271785 -16
Branches 40090 40087 -3
============================================
- Hits 192590 192296 -294
- Misses 62700 62950 +250
- Partials 16511 16539 +28
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Manual backport of #9111 includes follow up commit to fix flaky #9245.