Arik Hadas has uploaded a new change for review. Change subject: core: prevent db updates due to change in lastStartTime ......................................................................
core: prevent db updates due to change in lastStartTime This patch prevents unneccesary updates of VMs by VdsUpdateRunTimeInfo monitoring in case the 'lastStartTime' attribute is the only attribute of the VM that is changed (received with a different value from vdsm). The 'lastStartTime' attribute is always received from vdsm with null value, which is different from its value in the engine, thus VdsUpdateRunTimeInfo thinks that the VM is changed and update it in the DB (and that happens in every monitoring iteration). The solution is to remove 'lastStartTime' attribute from the list of attributes which are, when received from vdsm, compared to their values in the engine in order to decide whether the VM is changed. Change-Id: I8193defc1833e33bb3f8809d8416012c6dc27aea Signed-off-by: Arik Hadas <aha...@redhat.com> --- M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/16/10616/1 diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java index 633bc87..d9f1077 100644 --- a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java +++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java @@ -1588,6 +1588,7 @@ props.remove("last_vds_run_on"); props.remove("hibernation_vol_handle"); props.remove("exitMessage"); + props.remove("lastStartTime"); if (vmNewDynamicData.getstatus() != VMStatus.Up) { props.remove("app_list"); vmNewDynamicData.setapp_list(vmToUpdate.argvalue.getAppList()); -- To view, visit http://gerrit.ovirt.org/10616 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8193defc1833e33bb3f8809d8416012c6dc27aea Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <aha...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches