Ravi Nori has posted comments on this change.

Change subject: [WIP] vdsbroker: update vmJobs when updating vm statistics
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.ovirt.org/#/c/26906/5/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java:

Line 350:         }
Line 351:     }
Line 352: 
Line 353:     private void saveVmJobsToDb() {
Line 354:         
getDbFacade().getVmJobDao().updateAllInBatch(vmJobsToUpdate.values());
updateVmJobs() is clearing the Lists vmJobsToUpdate and vmJobIdsToRemove. If 
saveVmJobsToDb is called in a different thread than the one invoking 
saveVmJobsToDb it could result in ConcurrentModificationException. Please test, 
may be worth passing a copy of the Lists to the db operations.
Line 355: 
Line 356:         if (!vmJobIdsToRemove.isEmpty()) {
Line 357:             
TransactionSupport.executeInScope(TransactionScopeOption.Required,
Line 358:                     new TransactionMethod<Void>() {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If1a300d440a0a93381afe047eb294106a38088ec
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Greg Padgett <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Ravi Nori <[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