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

This commit is contained in:
subhash_y 2016-09-22 12:59:07 +05:30
parent 9eb8b2e90b
commit 3987b8c6b4

View File

@ -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()) {