Roy Golan has posted comments on this change. Change subject: core: ensure unique unit for VirtIO_SCSI and SPAR_VSCSI disks ......................................................................
Patch Set 3: Code-Review-1 (1 comment) https://gerrit.ovirt.org/#/c/39471/3/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/HotPlugDiskVDSCommand.java File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/HotPlugDiskVDSCommand.java: Line 180: }); Line 181: } Line 182: Line 183: protected void lockVmWithWait() { Line 184: Map<String, Pair<String, String>> exsluciveLock = that's a clear violation of the usage of engine lock mech. its for the provisioning/bll layer and not vds broker layer. we already have locking facilities for vms in vdsbroker, please don't add more. I can suggest: 1. simple locking, either mutex, map, you name it 2. VmManager lock - that will serialize all VDS actions on that VM - maybe too much, but way simple and less risky (not shared with BLL layer) question: isn't it the VDSM job to know what index is in use and just auto assign? rather than the engine send the index? Line 185: Collections.singletonMap(getParameters().getVmId().toString(), Line 186: new Pair<>(LockingGroup.VM_DISK_HOT_PLUG.toString(), Line 187: VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED.toString())); Line 188: vmLock = new EngineLock(exsluciveLock, null); -- To view, visit https://gerrit.ovirt.org/39471 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5e621618e8891fca52b48bff437cc4c2a1f695db Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Vitor de Lima <vdel...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org 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