cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [1/3] git commit: updated refs/heads/4.9 to 240f443
Date Thu, 03 Nov 2016 11:26:07 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.9 e2e5cdb74 -> 240f44392


CLOUDSTACK-9553 Usage event is not getting recorded for snapshots in a specific scenario


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3987b8c6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3987b8c6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3987b8c6

Branch: refs/heads/4.9
Commit: 3987b8c6b4549360ff2b0a14296e65cf3d437d49
Parents: 9eb8b2e
Author: subhash_y <venkata.yedugundla@accelerite.com>
Authored: Thu Sep 22 12:59:07 2016 +0530
Committer: subhash_y <venkata.yedugundla@accelerite.com>
Committed: Mon Oct 24 11:47:53 2016 +0530

----------------------------------------------------------------------
 .../src/com/cloud/storage/snapshot/SnapshotManagerImpl.java   | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3987b8c6/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
index 65f5140..bee2cf5 100644
--- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
+++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
@@ -390,9 +390,10 @@ public class SnapshotManagerImpl extends ManagerBase implements SnapshotManager,
         SnapshotVO snapshot = _snapshotDao.findById(snapshotId);
         if (policyId != Snapshot.MANUAL_POLICY_ID) {
             SnapshotScheduleVO snapshotSchedule = _snapshotScheduleDao.getCurrentSchedule(volumeId,
policyId, true);
-            assert snapshotSchedule != null;
-            snapshotSchedule.setSnapshotId(snapshotId);
-            _snapshotScheduleDao.update(snapshotSchedule.getId(), snapshotSchedule);
+            if (snapshotSchedule !=null) {
+                snapshotSchedule.setSnapshotId(snapshotId);
+                _snapshotScheduleDao.update(snapshotSchedule.getId(), snapshotSchedule);
+            }
         }
 
         if (snapshot != null && snapshot.isRecursive()) {


Mime
View raw message