You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2020/11/20 20:50:44 UTC

[cloudstack] branch master updated: server: Setting snapshot removed on timeout (#4425)

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/master by this push:
     new dfa09fc  server: Setting snapshot removed on timeout (#4425)
dfa09fc is described below

commit dfa09fc856c544e6edf001c66867472463d7ef96
Author: Spaceman1984 <49...@users.noreply.github.com>
AuthorDate: Fri Nov 20 22:50:16 2020 +0200

    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
---
 .../java/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java b/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java
index 51a2741..b8788fb 100644
--- a/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java
+++ b/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java
@@ -323,6 +323,7 @@ public class SnapshotServiceImpl implements SnapshotService {
         if (result.isFailed()) {
             try {
                 if (createSnapshotPayload.getAsyncBackup()) {
+                    _snapshotDao.remove(srcSnapshot.getId());
                     destSnapshot.processEvent(Event.OperationFailed);
                     throw new SnapshotBackupException("Failed in creating backup of snapshot with ID "+srcSnapshot.getId());
                 } else {