Liron Ar has posted comments on this change. Change subject: core: adding support for db lock of all disk snapshots ......................................................................
Patch Set 5: (4 comments) .................................................... 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); this method is used to lock only one volume. 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); this method is used to unlock only one volume. 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); nop, because only the active one status was supposed to be changed. 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, It will be added in a further patch, i prefer to keep here the changes to minimal..a snapshot of a disk can't be attached if the active disk volume status is illegal - regardless, it will be added. 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