
From Arik Hadas <ahadas@redhat.com>:
Arik Hadas has submitted this change and it was merged. Change subject: core: remove vm guest agent interfaces in a single query ...................................................................... core: remove vm guest agent interfaces in a single query The monitoring aggregates the changed VM guest agent interfaces but then iterates over all the VMs with changed interfaces and remove their interfaces one-by-one. Interacting with the DB within loop has never been a best-practice. This patch changes the removal of VM guest agent interfaces so they will be removed for all the given VMs in a single query. Note that while a better solution would be to have some kind of identifier for raws in vm_guest_agent_interfaces (and then we won't need to remove and add all the interfaces on every change) seems possible, this is a less-risky change that can be backported. Change-Id: I89e89a116b9247171e7708704b14c2b8c7b41943 Signed-off-by: Arik Hadas <ahadas@redhat.com> --- M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmGuestAgentInterfaceDao.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmGuestAgentInterfaceDaoImpl.java M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VmGuestAgentInterfaceDaoTest.java M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/monitoring/VmsMonitoring.java M packaging/dbscripts/network_sp.sql 5 files changed, 18 insertions(+), 16 deletions(-) Approvals: Eli Mesika: Looks good to me, but someone else must approve Shahar Havivi: Looks good to me, approved Jenkins CI: Passed CI tests Vinzenz Feenstra: Looks good to me, but someone else must approve Arik Hadas: Verified -- To view, visit https://gerrit.ovirt.org/65860 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I89e89a116b9247171e7708704b14c2b8c7b41943 Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <ahadas@redhat.com> Gerrit-Reviewer: Arik Hadas <ahadas@redhat.com> Gerrit-Reviewer: Eli Mesika <emesika@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek@redhat.com> Gerrit-Reviewer: Shahar Havivi <shavivi@redhat.com> Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>