Moti Asayag has posted comments on this change. Change subject: engine: Reduce DB queries for interfaces in GetStats ......................................................................
Patch Set 1: (1 comment) http://gerrit.ovirt.org/#/c/32560/1/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java: Line 666: log.debugFormat("vdsManager::refreshVdsStats entered, vds = {0} : {1}", _vds.getId(), Line 667: _vds.getName()); Line 668: } Line 669: // get statistics data, images checks and vm_count data (dynamic) Line 670: fetchHostInterfaces(); > can we fetch after we make the call to vdsm and it succeeded (the if below) since GetStatsVDSCommand relies on the vds entity to contains an updated list of its interface, so their statistics can be updated - it is less trivial and violates the current semantic of that command: It requires extracting from GetStatsVDSCommand this [1] and invoking it here, after the command ended successfully, and the interfaces are fetched: [1] "VdsBrokerObjectsBuilder.updateVDSStatisticsData(getVds(), infoReturn.mInfo);" Line 671: GetStatsVDSCommand<VdsIdAndVdsVDSCommandParametersBase> vdsBrokerCommand = Line 672: new GetStatsVDSCommand<VdsIdAndVdsVDSCommandParametersBase>(new VdsIdAndVdsVDSCommandParametersBase(_vds)); Line 673: vdsBrokerCommand.execute(); Line 674: getVdsEventListener().updateSchedulingStats(_vds); -- To view, visit http://gerrit.ovirt.org/32560 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0581f29b368fdf5771aeace2c5c200f726bdb912 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Lior Vernia <lver...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Lior Vernia <lver...@redhat.com> Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@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