Liron Aravot has posted comments on this change. Change subject: core: change vdsSpmId related command to support numerous vdss ......................................................................
Patch Set 6: (6 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsSpmIdCommand.java Line 60: //TODO : this logic should be optimized. Line 61: for (VdsStatic vds : getParameters().getVdss()) { Line 62: // according to shaharf the first id is 1 Line 63: int selectedId = 1; Line 64: List<Integer> map = LinqUtils.foreach(vds_spm_id_mapList, new Function<vds_spm_id_map, Integer>() { agreed..should be changed :) it wasn't named like that by me. Line 65: @Override Line 66: public Integer eval(vds_spm_id_map vds_spm_id_map) { Line 67: return vds_spm_id_map.getvds_spm_id(); Line 68: } Line 74: } else { Line 75: break; Line 76: } Line 77: } Line 78: vds_spm_id_map newMap = new vds_spm_id_map(getParameters().getStoragePoolId(), vds.getId(), selectedId); changed the implementation a bit (check the new patch), this method definitely needs to be revisited and improved in the future, not related to this patch. Line 79: DbFacade.getInstance().getVdsSpmIdMapDao().save(newMap); Line 80: if (getParameters().isCompensationEnabled()) { Line 81: getCompensationContext().snapshotNewEntity(newMap); Line 82: getCompensationContext().stateChanged(); .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java Line 113: return; Line 114: } Line 115: Line 116: VdsSpmIdParameters vdsSpmIdParameters = new VdsSpmIdParameters(); Line 117: vdsSpmIdParameters.setVdss(Collections.singletonList(getVds().getStaticData())); actually it worked without it, but i've set it. Line 118: if (targetStoragePool != null) { Line 119: vdsSpmIdParameters.setStoragePoolId(targetStoragePool.getId()); Line 120: VdcReturnValueBase addVdsSpmIdReturn = Line 121: Backend.getInstance().runInternalAction(VdcActionType.AddVdsSpmId, .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionType.java Line 70: ApproveVds(112, ActionGroup.CREATE_HOST), Line 71: HandleVdsCpuFlagsOrClusterChanged(114), Line 72: InitVdsOnUp(115), Line 73: SetNonOperationalVds(117), Line 74: AddMultipleVdsSpmId(119), added by accident, please ignore. Line 75: AddVdsSpmId(119), Line 76: RemoveVdsSpmId(120), Line 77: // Fencing (including RestartVds above) Line 78: StartVds(121, ActionGroup.MANIPUTLATE_HOST), .................................................... Commit Message Line 8: Line 9: related to bug https://bugzilla.redhat.com/show_bug.cgi?id=771699 Line 10: Line 11: currently the different vdsSpmId commands support execution on one vds Line 12: at a time, which degrades performance. This patch change those commands Done Line 13: to support execution on numerous hosts at a time. Line 14: Line 15: Change-Id: I7531b9edb763d32b96c58104385349d587de3416 Line 11: currently the different vdsSpmId commands support execution on one vds Line 12: at a time, which degrades performance. This patch change those commands Line 13: to support execution on numerous hosts at a time. Line 14: Line 15: Change-Id: I7531b9edb763d32b96c58104385349d587de3416 Done -- To view, visit http://gerrit.ovirt.org/8277 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7531b9edb763d32b96c58104385349d587de3416 Gerrit-PatchSet: 6 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches