Change in ovirt-engine[master]: engine: Compare and set instead of updateVdsDynamic in VM sc...

mkublin at redhat.com mkublin at redhat.com
Wed Apr 10 07:17:15 UTC 2013


Michael Kublin has submitted this change and it was merged.

Change subject: engine: Compare and set instead of updateVdsDynamic in VM scenarios
......................................................................


engine: Compare and set instead of updateVdsDynamic in VM scenarios

The following patch should solve a following problems:
1. Deadlock between RunVmCommandBase.decreasePendingVms and VdsUpdateRuntimeInfo.AfterRefreshTreatment
   line with code: ResourceManager.getInstance().getEventListener().processOnVmPoweringUp(...);
2. Replace get for vds dynamic , update some values, and after that update in db by single db update.
   The old way creates a dirty state fot host status field, fix will reduce a noise in host life cycle
   scenarios
3. Performance improved: less db access, less locks acquired, no deadlocks

What is not solved (problems which were before and should be solved in next patches)
1. Race between VdsManager.OnTimer() and RunVmCommandBase.decreasePendingVms()
2. RunVmDelayer.evaluated can be based on not updated data
3. Interaction of loop over
   ResourceManager.getInstance().getEventListener().processOnVmPoweringUp(...)
   inside VdsUpdateRuntimeInfo.AfterRefreshTreatment with RunVmCommands - it is a war for locks, or
   "code of death" for all system during RunVm scenarious

Change-Id: I363afc5c3411b0c13e6d6c9ed5b16004738b6ca7
Signed-off-by: Michael Kublin <mkublin at redhat.com>
---
M backend/manager/dbscripts/vds_sp.sql
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommandBase.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdsDynamic.java
D backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/UpdateVdsDynamicDataVDSCommandParameters.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/VDSCommandType.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDynamicDAO.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDynamicDAODbFacadeImpl.java
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VdsDynamicDAOTest.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/CreateVmVDSCommand.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/DestroyVmVDSCommand.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/MigrateVDSCommand.java
D backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/UpdateVdsDynamicDataVDSCommand.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
13 files changed, 142 insertions(+), 169 deletions(-)

Approvals:
  Michael Kublin: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I363afc5c3411b0c13e6d6c9ed5b16004738b6ca7
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Michael Kublin <mkublin at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Barak Azulay <bazulay at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik at redhat.com>
Gerrit-Reviewer: Michael Kublin <mkublin at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs at redhat.com>



More information about the Engine-commits mailing list