Liron Ar has posted comments on this change. Change subject: core: updateAllInBatch - sorting/transaction issues ......................................................................
Patch Set 2: (1 comment) http://gerrit.ovirt.org/#/c/28909/2/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/MassOperationsGenericDaoDbFacade.java File backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/MassOperationsGenericDaoDbFacade.java: Line 55: Collection<T> paramValues, Line 56: MapSqlParameterMapper<T> mapper) { Line 57: Line 58: // To overcome possible deadlocks, we need to sort the collection if the code is executed in transaction Line 59: if (TransactionSupport.current() != null) { > if we use multiple transactions for batch, this is wrong. not always, same as we for all dao operations, the caller is responsive for the transaction. for example, when updating in batch the disc image dynamic data, we don't need the transaction as the disks are independent. Line 60: List<T> sortedParamValues = new ArrayList<>(paramValues); Line 61: Collections.sort(sortedParamValues, BusinessEntityComparator.<T, ID> newInstance()); Line 62: paramValues = sortedParamValues; Line 63: } -- To view, visit http://gerrit.ovirt.org/28909 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I935555bae208786e64f109e267749eafea57fb60 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Ar <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Eli Mesika <[email protected]> Gerrit-Reviewer: Liran Zelkha <[email protected]> Gerrit-Reviewer: Liron Ar <[email protected]> Gerrit-Reviewer: Maor Lipchuk <[email protected]> Gerrit-Reviewer: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
