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

[Remote Translog] Trimming based on Remote Segment Store #7383

Merged
merged 7 commits into from
May 17, 2023

Conversation

gbbafna
Copy link
Collaborator

@gbbafna gbbafna commented May 3, 2023

Description

When remote segment is enabled, the min generation translog retain should just use the seq no upload there instead of using local checkpoint of safe commit , which gets updated only on flush .

Also added Integ tests of failover for Remote Translog .

Related Issues

#7381
#6195
#5670

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.

@github-actions
Copy link
Contributor

github-actions bot commented May 3, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented May 3, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2023

Gradle Check (Jenkins) Run Completed with:

@gbbafna gbbafna changed the title [Remote Translog] Add logs in download path to gain more visibility [Remote Translog] Trimming based on Remote Segment Store May 8, 2023
@gbbafna gbbafna force-pushed the failover-visibility branch 2 times, most recently from 4a35902 to 4d602e2 Compare May 8, 2023 12:45
@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Copy link
Member

@ashking94 ashking94 left a comment

Choose a reason for hiding this comment

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

can we add an IT that checks if the trimming is happening as expected? Validate the number of translog files (tlog/ckp) in the repo? I had done something similar here - https:/opensearch-project/OpenSearch/blob/main/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteStoreRefreshListenerIT.java#L85

@gbbafna
Copy link
Collaborator Author

gbbafna commented May 15, 2023

can we add an IT that checks if the trimming is happening as expected? Validate the number of translog files (tlog/ckp) in the repo? I had done something similar here - https:/opensearch-project/OpenSearch/blob/main/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteStoreRefreshListenerIT.java#L85

I have UTs covering the trimming part comprehensively . IT is testing the failover doesn't cause any data loss .

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.remotestore.SegmentReplicationRemoteStoreIT.testScrollWithOngoingSegmentReplication

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      2 org.opensearch.remotestore.RemoteStoreRefreshListenerIT.testRemoteRefreshRetryOnFailure

@Bukhtawar
Copy link
Collaborator

Did it even run codecov tests this time?

@gbbafna
Copy link
Collaborator Author

gbbafna commented May 16, 2023

Did it even run codecov tests this time?

Yes it did : https://app.codecov.io/gh/opensearch-project/OpenSearch/pull/7383

@Bukhtawar Bukhtawar merged commit 613f4aa into opensearch-project:main May 17, 2023
@gbbafna gbbafna added the backport 2.x Backport to 2.x branch label May 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-7383-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 613f4aa046912b583925a9a03cb2294efd2a002c
# Push it to GitHub
git push --set-upstream origin backport/backport-7383-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-7383-to-2.x.

@monusingh-1
Copy link

hi @gbbafna, there is backport2.x label present, will this be backported to 2.x?

@gbbafna
Copy link
Collaborator Author

gbbafna commented May 23, 2023

@monu-aws : Yes, I will be backporting it by 24/05.

ashking94 pushed a commit to ashking94/OpenSearch that referenced this pull request May 23, 2023
…project#7383)

* [Remote Translog] Set min referenced as per remote segment store only
when enabled. Add IT for failover using remote translog as well

Signed-off-by: Gaurav Bafna <[email protected]>
Signed-off-by: Ashish Singh <[email protected]>
gbbafna added a commit to gbbafna/OpenSearch that referenced this pull request May 24, 2023
…project#7383)

* [Remote Translog] Set min referenced as per remote segment store only
when enabled. Add IT for failover using remote translog as well

Signed-off-by: Gaurav Bafna <[email protected]>
gbbafna pushed a commit that referenced this pull request May 24, 2023
…re (#7383) (#7699)

* [Remote Translog] Trimming based on Remote Segment Store  (#7383)

* [Remote Translog] Set min referenced as per remote segment store only
when enabled. Add IT for failover using remote translog as well

Signed-off-by: Gaurav Bafna <[email protected]>
Signed-off-by: Ashish Singh <[email protected]>
stephen-crawford pushed a commit to stephen-crawford/OpenSearch that referenced this pull request May 31, 2023
…project#7383)

* [Remote Translog] Set min referenced as per remote segment store only
when enabled. Add IT for failover using remote translog as well

Signed-off-by: Gaurav Bafna <[email protected]>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…project#7383)

* [Remote Translog] Set min referenced as per remote segment store only
when enabled. Add IT for failover using remote translog as well

Signed-off-by: Gaurav Bafna <[email protected]>
Signed-off-by: Shivansh Arora <[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.

6 participants