Arik Hadas has posted comments on this change.

Change subject: core: remove memory image on remove snapshot
......................................................................


Patch Set 16: (2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveSnapshotCommand.java
Line 124:     }
Line 125: 
Line 126:     /**
Line 127:      * There is a one to many relation between memory volumes and 
snapshots, so memory
Line 128:      * volumes should be removed only if the only snapshot that 
points to them is removed
the same memory volume is kept on several snapshots in the following cases:
1. when preview snapshot, the memory volume is copied from the snapshot that is 
being previewed to the active snapshot
2. when running vm in stateless mode, the memory volume is copied to the active 
snapshot
3. maybe in the future we will support cloning a VM with its memory state 
(clone from snapshot + import as clone)
Line 129:      */
Line 130:     private boolean shouldRemoveMemorySnapshotVolumes(String 
memoryVolume) {
Line 131:         return !memoryVolume.isEmpty() &&
Line 132:                 
getSnapshotDao().getNumOfSnapshotsByMemory(memoryVolume) == 1;


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/SnapshotDaoDbFacadeImpl.java
Line 213:                 parameterSource);
Line 214:     }
Line 215: 
Line 216:     @Override
Line 217:     public int getNumOfSnapshotsByMemory(String memoryVolume) {
Done
Line 218:         MapSqlParameterSource parameterSource = 
getCustomMapSqlParameterSource()
Line 219:                 .addValue("memory_volume", 
getNullableRepresentation(memoryVolume));
Line 220: 
Line 221:         return 
getCallsHandler().executeRead("GetNumOfSnapshotsByMemoryVolume",


--
To view, visit http://gerrit.ovirt.org/14687
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I88a707457b3b1565a887e141d18d9d08a2dbcc69
Gerrit-PatchSet: 16
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to