|
50 | 50 | import org.opensearch.index.mapper.MapperService;
|
51 | 51 | import org.opensearch.index.snapshots.IndexShardSnapshotStatus;
|
52 | 52 | import org.opensearch.index.snapshots.blobstore.RemoteStoreShardShallowCopySnapshot;
|
| 53 | +import org.opensearch.index.store.RemoteSegmentStoreDirectoryFactory; |
53 | 54 | import org.opensearch.index.store.Store;
|
54 | 55 | import org.opensearch.index.store.lockmanager.RemoteStoreLockManagerFactory;
|
55 | 56 | import org.opensearch.indices.recovery.RecoveryState;
|
| 57 | +import org.opensearch.node.remotestore.RemoteStorePinnedTimestampService; |
56 | 58 | import org.opensearch.snapshots.SnapshotId;
|
57 | 59 | import org.opensearch.snapshots.SnapshotInfo;
|
58 | 60 |
|
@@ -220,11 +222,59 @@ void deleteSnapshots(
|
220 | 222 | /**
|
221 | 223 | * Deletes snapshots and releases respective lock files from remote store repository.
|
222 | 224 | *
|
223 |
| - * @param snapshotIds snapshot ids |
224 |
| - * @param repositoryStateId the unique id identifying the state of the repository when the snapshot deletion began |
225 |
| - * @param repositoryMetaVersion version of the updated repository metadata to write |
226 |
| - * @param remoteStoreLockManagerFactory RemoteStoreLockManagerFactory to be used for cleaning up remote store lock files |
227 |
| - * @param listener completion listener |
| 225 | + * @param snapshotIds snapshot ids |
| 226 | + * @param repositoryStateId the unique id identifying the state of the repository when the snapshot deletion began |
| 227 | + * @param repositoryMetaVersion version of the updated repository metadata to write |
| 228 | + * @param remoteStoreLockManagerFactory RemoteStoreLockManagerFactory to be used for cleaning up remote store lock files |
| 229 | + * @param remoteSegmentStoreDirectoryFactory RemoteSegmentStoreDirectoryFactory to be used for cleaning up remote store segment files |
| 230 | + * @param remoteStorePinnedTimestampService service for pinning and unpinning of the timestamp |
| 231 | + * @param snapshotIdsPinnedTimestampMap map of snapshots ids and the pinned timestamp |
| 232 | + * @param isShallowSnapshotV2 true for shallow snapshots v2 |
| 233 | + * @param listener completion listener |
| 234 | + */ |
| 235 | + default void deleteSnapshotsInternal( |
| 236 | + Collection<SnapshotId> snapshotIds, |
| 237 | + long repositoryStateId, |
| 238 | + Version repositoryMetaVersion, |
| 239 | + RemoteStoreLockManagerFactory remoteStoreLockManagerFactory, |
| 240 | + RemoteSegmentStoreDirectoryFactory remoteSegmentStoreDirectoryFactory, |
| 241 | + RemoteStorePinnedTimestampService remoteStorePinnedTimestampService, |
| 242 | + Map<SnapshotId, Long> snapshotIdsPinnedTimestampMap, |
| 243 | + boolean isShallowSnapshotV2, |
| 244 | + ActionListener<RepositoryData> listener |
| 245 | + ) { |
| 246 | + throw new UnsupportedOperationException(); |
| 247 | + } |
| 248 | + |
| 249 | + /** |
| 250 | + * Deletes snapshots and unpin the snapshot timestamp using remoteStorePinnedTimestampService |
| 251 | + * |
| 252 | + * @param snapshotsWithPinnedTimestamp map of snapshot ids and the pinned timestamps |
| 253 | + * @param repositoryStateId the unique id identifying the state of the repository when the snapshot deletion began |
| 254 | + * @param repositoryMetaVersion version of the updated repository metadata to write |
| 255 | + * @param remoteSegmentStoreDirectoryFactory RemoteSegmentStoreDirectoryFactory to be used for cleaning up remote store segment files |
| 256 | + * @param remoteStorePinnedTimestampService service for pinning and unpinning of the timestamp |
| 257 | + * @param listener completion listener |
| 258 | + */ |
| 259 | + default void deleteSnapshotsWithPinnedTimestamp( |
| 260 | + Map<SnapshotId, Long> snapshotsWithPinnedTimestamp, |
| 261 | + long repositoryStateId, |
| 262 | + Version repositoryMetaVersion, |
| 263 | + RemoteSegmentStoreDirectoryFactory remoteSegmentStoreDirectoryFactory, |
| 264 | + RemoteStorePinnedTimestampService remoteStorePinnedTimestampService, |
| 265 | + ActionListener<RepositoryData> listener |
| 266 | + ) { |
| 267 | + throw new UnsupportedOperationException(); |
| 268 | + } |
| 269 | + |
| 270 | + /** |
| 271 | + * Deletes snapshots and releases respective lock files from remote store repository |
| 272 | + * |
| 273 | + * @param snapshotIds |
| 274 | + * @param repositoryStateId |
| 275 | + * @param repositoryMetaVersion |
| 276 | + * @param remoteStoreLockManagerFactory |
| 277 | + * @param listener |
228 | 278 | */
|
229 | 279 | default void deleteSnapshotsAndReleaseLockFiles(
|
230 | 280 | Collection<SnapshotId> snapshotIds,
|
|
0 commit comments