Maor Lipchuk has posted comments on this change. Change subject: core: adding support for db lock of all disk snapshots ......................................................................
Patch Set 5: (4 comments) I'm not sure that I understand this change, how import/export and more operations handle the status change of the image's volumes? will they have a different behaviour? .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/BaseImagesCommand.java Line 279: return getDbFacade().getBaseDiskDao(); Line 280: } Line 281: Line 282: protected void lockImage() { Line 283: setImageStatus(ImageStatus.LOCKED); don't you need to update all the image's volumes with locked here? Line 284: } Line 285: Line 286: protected void unLockImage() { Line 287: setImageStatus(ImageStatus.OK); Line 283: setImageStatus(ImageStatus.LOCKED); Line 284: } Line 285: Line 286: protected void unLockImage() { Line 287: setImageStatus(ImageStatus.OK); same here Line 288: } Line 289: Line 290: protected void setImageStatus(ImageStatus imageStatus) { Line 291: DiskImage diskImage = getRelevantDiskImage(); Line 320: completeImageData(newImageIRS); Line 321: } Line 322: Line 323: // Unlock destination image: Line 324: getDestinationDiskImage().setImageStatus(ImageStatus.OK); Don't you need to update all the image's volumes with OK here Line 325: getImageDao().update(getDestinationDiskImage().getImage()); Line 326: } Line 327: Line 328: unLockImage(); .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveImageCommand.java Line 345: // the image status should be set to ILLEGAL, so that in case compensation runs the image status will Line 346: // be revert to be ILLEGAL, as we can't tell whether the task started on vdsm side or not. Line 347: ImagesHandler.updateAllDiskImageSnapshotsStatusWithCompensation(getRelevantDiskImage().getId(), Line 348: ImageStatus.LOCKED, Line 349: ImageStatus.ILLEGAL, You will have to add an upgrade script that will update all the existing illegal disks in the DB to have illegal status for all their volumes as well, just ot keep consistent data. Line 350: getCompensationContext()); Line 351: } Line 352: return runVdsCommand(VDSCommandType.DeleteImageGroup, Line 353: new DeleteImageGroupVDSCommandParameters(getDiskImage().getStoragePoolId(), -- To view, visit http://gerrit.ovirt.org/20308 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibac8daf6a9e970859a6759d84d7849e7f84e0d79 Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches