Change in ovirt-engine[master]: core: GetAllDisksByVmId - race condition leads to NPE

laravot at redhat.com laravot at redhat.com
Sun Aug 17 10:13:32 UTC 2014


Liron Aravot has submitted this change and it was merged.

Change subject: core: GetAllDisksByVmId - race condition leads to NPE
......................................................................


core: GetAllDisksByVmId - race condition leads to NPE

The given query is executed to get the vm disks with some
required info (properties from the vm_device, snapshots..etc).
As there are multiple queries on that flow, if some operation is done
while the query runs we might get NPE (and inconsistent results).
This patch prevents NPE when the vm device of a given disk was removed
(which means that it was detached from the vm).

Change-Id: Iffd0f8f695ce88baf2e1fbbe1deedf401a13b246
Bug-Url: https://bugzilla.redhat.com/1130065
Signed-off-by: Liron Aravot <laravot at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetAllDisksByVmIdQuery.java
1 file changed, 9 insertions(+), 6 deletions(-)

Approvals:
  Liron Aravot: Verified; Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iffd0f8f695ce88baf2e1fbbe1deedf401a13b246
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list