[Remote Store] Add snapshot type information in repository data.#13827
[Remote Store] Add snapshot type information in repository data.#13827harishbhakuni wants to merge 1 commit intoopensearch-project:mainfrom
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.
can we use SnapshotInfo instead to determine if snapshot is a shallow one ?
There was a problem hiding this comment.
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.
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.
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_enabledrepository setting flag to decide if we need to use the old methoddeleteSnapshotsor the new methoddeleteSnapshotsAndReleaseLockFiles.deleteSnapshotsAndReleaseLockFilesshould 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.