Liran Zelkha has posted comments on this change.

Change subject: core: Batch updates might create a database deadlock
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/27173/1/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 64:                     return ((Comparable)o1).compareTo(o2);
Line 65:                 } else if (o1.getId() instanceof Comparable) {
Line 66:                     return 
((Comparable)o1.getId()).compareTo(o2.getId());
Line 67:                 }
Line 68:                 return ((Integer) 
o1.getId().hashCode()).compareTo(o2.getId().hashCode());
> that cast is redundant boxing. Guid.compare() emits an int
If getId is Guid, then we go to the comparable part. This is only if the key is 
not comparable (can't happen in hibernate, but in our case, always a 
possibility).
Line 69:             }
Line 70: 
Line 71:         });
Line 72:         getCallsHandler().executeStoredProcAsBatch(procedureName == 
null ? getProcedureNameForUpdate() : procedureName,


-- 
To view, visit http://gerrit.ovirt.org/27173
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1f1868c7a76ea50257f40929573e36ad304c353c
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: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Roy Golan <[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

Reply via email to