Liran Zelkha has posted comments on this change.
Change subject: core: Migrate RuntimeInfo to use Batch Updates
......................................................................
Patch Set 1: (2 inline comments)
....................................................
File
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/MassOperationsDao.java
Line 45: /**
Line 46: * Calls an update stored procedure multiple timse in a batch
Line 47: * @param procedureName
Line 48: * @param entities
Line 49: */
The thing is the most DBFacades use this MapSqlParameterSource - so it's a
known class (see VmDynamic for instance). So I think it's a bit of an
overkill... this interface is internal to the Daos - so only they should
implement it anyway. What do you think?
Line 50: void updateAllInBatch(String procedureName,
List<MapSqlParameterSource> paramValues);
....................................................
File
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/MassOperationsGenericDaoDbFacade.java
Line 46: * Enables to send update procedure name as a parameter that
overrides the default
Line 47: * one.
Line 48: * In case this parameter is null the default procedure is used.
Line 49: */
Line 50: public void updateAllInBatch(String procedureName,
List<MapSqlParameterSource> paramValues) {
The problem is that since we are working with a specific procedure - we need an
exact parameters mapping to the procedure arguments. A general T won't work,
not even on a specific entity level (if an update only updates 4 fields, and
the entity has 5 - it won't work)
Line 51: getCallsHandler().executeStoredProcAsBatch(procedureName ==
null ? getProcedureNameForUpdate() : procedureName,
Line 52: paramValues);
Line 53: }
Line 54:
--
To view, visit http://gerrit.ovirt.org/16018
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I96dd3a2f407e36194c0ccf07a5a9c7e83be61d48
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liran Zelkha <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Liran Zelkha <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches