|
@@ -562,6 +562,11 @@ public class SnapshotsService extends AbstractLifecycleComponent implements Clus
|
|
|
logger.warn("Did not find expected entry [{}] in the cluster state", cloneEntry);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String toString() {
|
|
|
+ return Strings.format("start snapshot clone [%s] from [%s]", updatedEntry.snapshot(), updatedEntry.source());
|
|
|
+ }
|
|
|
}, "start snapshot clone", onFailure), onFailure)
|
|
|
);
|
|
|
}
|
|
@@ -1445,7 +1450,8 @@ public class SnapshotsService extends AbstractLifecycleComponent implements Clus
|
|
|
);
|
|
|
}, e -> handleFinalizationFailure(e, snapshot, repositoryData)));
|
|
|
} catch (Exception e) {
|
|
|
- assert false : new AssertionError(e);
|
|
|
+ logger.error(Strings.format("unexpected failure finalizing %s", snapshot), e);
|
|
|
+ assert false : new AssertionError("unexpected failure finalizing " + snapshot, e);
|
|
|
handleFinalizationFailure(e, snapshot, repositoryData);
|
|
|
}
|
|
|
}
|
|
@@ -2096,6 +2102,11 @@ public class SnapshotsService extends AbstractLifecycleComponent implements Clus
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String toString() {
|
|
|
+ return Strings.format("delete snapshot task [%s]%s", repository, Arrays.toString(snapshotNames));
|
|
|
+ }
|
|
|
}, "delete snapshot [" + repository + "]" + Arrays.toString(snapshotNames), listener::onFailure);
|
|
|
}
|
|
|
|
|
@@ -2691,6 +2702,11 @@ public class SnapshotsService extends AbstractLifecycleComponent implements Clus
|
|
|
final boolean added = reassignments.add(shardId);
|
|
|
assert added : "should only ever reassign each shard once but assigned [" + shardId + "] multiple times";
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String toString() {
|
|
|
+ return "RemoveSnapshotDeletionAndContinueTask[" + deleteEntry + "]";
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3584,9 +3600,14 @@ public class SnapshotsService extends AbstractLifecycleComponent implements Clus
|
|
|
}
|
|
|
|
|
|
synchronized boolean assertNotQueued(Snapshot snapshot) {
|
|
|
- assert snapshotsToFinalize.getOrDefault(snapshot.getRepository(), new LinkedList<>())
|
|
|
+ if (snapshotsToFinalize.getOrDefault(snapshot.getRepository(), new LinkedList<>())
|
|
|
.stream()
|
|
|
- .noneMatch(entry -> entry.equals(snapshot)) : "Snapshot [" + snapshot + "] is still in finalization queue";
|
|
|
+ .anyMatch(entry -> entry.equals(snapshot))) {
|
|
|
+
|
|
|
+ final var assertionError = new AssertionError("[" + snapshot + "] should not be in " + snapshotsToFinalize);
|
|
|
+ logger.error("assertNotQueued failure", assertionError);
|
|
|
+ throw assertionError;
|
|
|
+ }
|
|
|
return true;
|
|
|
}
|
|
|
|