-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 Store] Add snapshot type information in repository data. #13827
base: main
Are you sure you want to change the base?
[Remote Store] Add snapshot type information in repository data. #13827
Conversation
Signed-off-by: Harish Bhakuni <hbhakuni@amazon.com>
❌ Gradle check result for 4d8fa9c: 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? |
This PR is stalled because it has been open for 30 days with no activity. |
boolean cleanupRemoteStoreLockFiles = snapshotIds.stream() | ||
.anyMatch(snapshotId -> repositoryData.getSnapshotType(snapshotId) == SnapshotType.SHALLOW_COPY); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use SnapshotInfo
instead to determine if snapshot is a shallow one ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that would be more costly as we have to read one file for each deleting snapshot in that case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right , looks like it is not that expensive as well . The benefit of this approach is that this will work for existing clusters as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this approach will also work on existing clusters as we will be backfilling this data on existing RepositoryData
as well as part of the first RepositoryData
update once this change is deployed.
server/src/main/java/org/opensearch/repositories/blobstore/BlobStoreRepository.java
Show resolved
Hide resolved
This PR is stalled because it has been open for 30 days with no activity. |
Description
deleteSnapshotsAndReleaseLockFiles
(which also takes care of releasing remote store lock for the snapshot) in repository interface. We did not directly used this new method in snapshot service as it would be a breaking change for existing users who have implemented this interface differently or for those who do not have this method implemented in their repository implementation.shallow_copy_snapshot_enabled
repository setting flag to decide if we need to use the old methoddeleteSnapshots
or the new methoddeleteSnapshotsAndReleaseLockFiles
.deleteSnapshotsAndReleaseLockFiles
should be invoked or not from snapshot service.Related Issues
Resolves #8610
Check List
New functionality has been documented.New functionality has javadoc addedAPI changes companion pull request created.Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)Commit changes are listed out in CHANGELOG.md file (See: Changelog)Public documentation issue/PR createdBy 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.