Skip to content

Commit dfa09fc

Browse files
authored
server: Setting snapshot removed on timeout (#4425)
* Setting snapshot state to error on timeout * Setting removed field so snapshot record is ignored by garbage collection * Removed explicitly setting error status, renamed method from markFailed to markRemoved * Renamed method, moved code a few lines down * Moved remove logic * Removed unused service * Moved removed logic - last time, promise
1 parent d3f18ef commit dfa09fc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ protected Void copySnapshotAsyncCallback(AsyncCallbackDispatcher<SnapshotService
323323
if (result.isFailed()) {
324324
try {
325325
if (createSnapshotPayload.getAsyncBackup()) {
326+
_snapshotDao.remove(srcSnapshot.getId());
326327
destSnapshot.processEvent(Event.OperationFailed);
327328
throw new SnapshotBackupException("Failed in creating backup of snapshot with ID "+srcSnapshot.getId());
328329
} else {

0 commit comments

Comments
 (0)