Maor Lipchuk has posted comments on this change.

Change subject: core: WIP : RemoveImageDisk - race when updating snapshots ovf 
(#828192)
......................................................................


Patch Set 7: (2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveImageCommand.java
Line 159:         }
Line 160:     }
Line 161: 
Line 162:     /**
Line 163:      * Prepare a {@link List} of {@link Snapshot} objects with the 
given disk (image group) removed from it.
The comment should be changed. there is no preparation of a list
Line 164:      */
Line 165:     private void updateSnapshotConfigWithoutImage(Guid 
imageGroupToRemove) {
Line 166:         List<DiskImage> snapshotDisks = 
getDiskImageDao().getAllSnapshotsForImageGroup(imageGroupToRemove);
Line 167:         // shuffling the snapshots list so that every thread 
performing the command on same snapshots will try to


Line 175:                     final Snapshot updated =
Line 176:                             
prepareSnapshotConfigWithoutImageSingleImage(vmSnapshotId.getValue(),
Line 177:                                     snapshotDisk.getImageId());
Line 178:                     if (updated != null) {
Line 179:                         
TransactionSupport.executeInScope(TransactionScopeOption.RequiresNew,
Why using new transaction?
Line 180:                                 new TransactionMethod<Object>() {
Line 181:                                     @Override
Line 182:                                     public Object runInTransaction() {
Line 183:                                         
getSnapshotDao().update(updated);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iccb44f1aa9d204477955343167133849a4146753
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to