Liron Ar has posted comments on this change. Change subject: core: change iso prefix command to be vds broker command ......................................................................
Patch Set 11: (3 comments) .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/VdsAndPoolIDVDSParametersBase.java Line 1: package org.ovirt.engine.core.common.vdscommands; Line 2: Line 3: import org.ovirt.engine.core.compat.Guid; Line 4: Line 5: public class VdsAndPoolIDVDSParametersBase extends VdsIdVDSCommandParametersBase { please fix the name to "VdsAndPoolIdVDSParametersBase" Line 6: private Guid storagePoolId = Guid.Empty; Line 7: Line 8: public VdsAndPoolIDVDSParametersBase(Guid vdsId, Guid storagePoolId) { Line 9: super(vdsId); .................................................... File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/IsoPrefixVDSCommand.java Line 37: } Line 38: Line 39: StoragePoolInfoReturnForXmlRpc retVal; Line 40: try { Line 41: retVal = getBroker().getStoragePoolInfo(storagePoolId.toString()); how about having this call outside of the lock? it'll make the blocking time a lot shorter and in case of failure on some host will speed up the operation. Line 42: } catch (Exception ex) { Line 43: log.errorFormat("IsoPrefix Failed to get storage pool info (vds {0}, pool {1}).", Line 44: getParameters().getVdsId(), storagePoolId); Line 45: return StringUtils.EMPTY; Line 53: } Line 54: Line 55: private String getIsoPrefixFromStoragePoolInfoReturnValue(StoragePoolInfoReturnForXmlRpc retVal) { Line 56: return retVal.mStoragePoolInfo.containsKey(IrsProperties.isoPrefix) ? Line 57: retVal.mStoragePoolInfo.get(IrsProperties.isoPrefix).toString() perhaps worth adding a check for null value to avoid NPE. Line 58: : StringUtils.EMPTY; Line 59: } Line 60: Line 61: static void clearCachedIsoPrefix(Guid storagePoolId) { -- To view, visit http://gerrit.ovirt.org/17815 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I272ce7b0407bf83bd47646941630362ecf0b18cc Gerrit-PatchSet: 11 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> 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