mirror of https://github.com/apache/cloudstack.git
only decrease the snapshot count when the snapshot status is in backuped state
This commit is contained in:
parent
848bbad952
commit
a455435f5f
|
|
@ -722,8 +722,8 @@ public class SnapshotManagerImpl implements SnapshotManager, SnapshotService, Ma
|
|||
if (snapshot.getStatus() == Snapshot.Status.BackedUp) {
|
||||
UsageEventVO usageEvent = new UsageEventVO(EventTypes.EVENT_SNAPSHOT_DELETE, snapshot.getAccountId(), snapshot.getDataCenterId(), snapshotId, snapshot.getName(), null, null, 0L);
|
||||
_usageEventDao.persist(usageEvent);
|
||||
_accountMgr.decrementResourceCount(snapshot.getAccountId(), ResourceType.snapshot);
|
||||
}
|
||||
_accountMgr.decrementResourceCount(snapshot.getAccountId(), ResourceType.snapshot);
|
||||
txn.commit();
|
||||
|
||||
long lastId = snapshotId;
|
||||
|
|
|
|||
Loading…
Reference in New Issue