Skip to content

Commit

Permalink
Consider snapshots only for the given repo
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Bafna <[email protected]>
  • Loading branch information
gbbafna committed Oct 23, 2024
1 parent 2907d52 commit 00bbd7e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2562,7 +2562,11 @@ public ClusterState execute(ClusterState currentState) throws Exception {
final List<SnapshotsInProgress.Entry> snapshotEntries = findInProgressSnapshots(snapshots, snapshotNames, repoName);
boolean isSnapshotV2 = SHALLOW_SNAPSHOT_V2.get(repository.getMetadata().settings());
boolean remoteStoreIndexShallowCopy = remoteStoreShallowCopyEnabled(repository);
if (isSnapshotV2 && remoteStoreIndexShallowCopy && snapshots.entries().size() > 0) {
List<SnapshotsInProgress.Entry> entriesForThisRepo = snapshots.entries()
.stream()
.filter(entry -> Objects.equals(entry.repository(), repoName))
.collect(Collectors.toList());
if (isSnapshotV2 && remoteStoreIndexShallowCopy && entriesForThisRepo.isEmpty() == false) {
throw new ConcurrentSnapshotExecutionException(
repoName,
String.join(",", snapshotNames),
Expand Down

0 comments on commit 00bbd7e

Please sign in to comment.