Michael Kublin has posted comments on this change.
Change subject: engine: Removing unneeded read query from SetVdsStatusVDSCommand
......................................................................
Patch Set 1: (3 inline comments)
....................................................
File
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/SetVdsStatusVDSCommand.java
Line 19: SetVdsStatusVDSCommandParameters parameters = getParameters();
Line 20:
Line 21: if (_vdsManager != null) {
Line 22:
Line 23: VDS vds = getVds();
getVds() performs query to DB
Line 24: updateVdsFromParameters(parameters, vds);
Line 25: _vdsManager.setStatus(parameters.getStatus(), vds);
Line 26: _vdsManager.UpdateDynamicData(vds.getDynamicData());
Line 27: _vdsManager.UpdateStatisticsData(vds.getStatisticsData());
Line 24: updateVdsFromParameters(parameters, vds);
Line 25: _vdsManager.setStatus(parameters.getStatus(), vds);
Line 26: _vdsManager.UpdateDynamicData(vds.getDynamicData());
Line 27: _vdsManager.UpdateStatisticsData(vds.getStatisticsData());
Line 28:
Every unneeded query for my opinion it is bug, but I don't think that everyone
agrees with such approach, so these is clean up
Line 29: if (vds.getspm_status() != VdsSpmStatus.None &&
parameters.getStatus() != VDSStatus.Up) {
Line 30: log.infoFormat("SetVdsStatusVDSCommand::VSD {0} is spm
and moved from up calling ResetIrs.",
Line 31: vds.getvds_name());
Line 32: // check if this host was spm and reset if do.
....................................................
Commit Message
Line 7: engine: Removing unneeded read query from SetVdsStatusVDSCommand
Line 8:
Line 9: The following query was used in order to prevent some kind of race,
Line 10: obvious that a probability that such approach will help is too small.
Line 11: Additional query is perfromed all the time
I think that the code tried to reduce a race, but the code was wrong
Line 12:
Line 13: Change-Id: If468915f3bde5c5e2599ee50c38515795a555e79
--
To view, visit http://gerrit.ovirt.org/8493
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If468915f3bde5c5e2599ee50c38515795a555e79
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Michael Kublin <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches