Liron Ar has posted comments on this change.
Change subject: core: Removing template with disks ends with unused data in the
db
......................................................................
Patch Set 1: (3 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveAllVmTemplateImageTemplatesCommand.java
Line 75: // remove images from db only if removing template
completely
Line 76: if (getParameters().isRemoveTemplateFromDb()) {
Line 77: DiskImage diskImage =
DbFacade.getInstance().getDiskImageDao().get(template.getImageId());
Line 78: if (diskImage != null) {
Line 79:
DbFacade.getInstance().getBaseDiskDao().remove(template.getId());
I agree that the naming here is very confusing, in this patch i just fixed the
id to be the correct one..but this should be definitely revisited
Line 80: DbFacade.getInstance()
Line 81: .getVmDeviceDao()
Line 82: .remove(new
VmDeviceId(diskImage.getImageId(), getVmTemplateId()));
Line 83:
DbFacade.getInstance().getImageStorageDomainMapDao().remove(diskImage.getImageId());
....................................................
Commit Message
Line 5: CommitDate: 2013-05-20 11:41:39 +0300
Line 6:
Line 7: core: Removing template with disks ends with unused data in the db
Line 8:
Line 9: When removing a template, the records of it's disks weren't deleted from
Done
Line 10: base_disk table because the call to the delete stored procedure was
done
Line 11: with the id of the image rather then the id of the disk - which caused
Line 12: to unused records to be left in the table and possible errors when
Line 13: trying to import the template again (not as a clone).
Line 6:
Line 7: core: Removing template with disks ends with unused data in the db
Line 8:
Line 9: When removing a template, the records of it's disks weren't deleted from
Line 10: base_disk table because the call to the delete stored procedure was
done
it's delete, not deleted...
Line 11: with the id of the image rather then the id of the disk - which caused
Line 12: to unused records to be left in the table and possible errors when
Line 13: trying to import the template again (not as a clone).
Line 14:
--
To view, visit http://gerrit.ovirt.org/14877
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I86573e91885085bcdfc30ee4e966590901a62067
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches