Sergey Gotliv has posted comments on this change.

Change subject: backend: unlock imported glance image on create errors
......................................................................


Patch Set 1:

(2 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportRepoImageCreateTaskHandler.java
Line 106:     public void endWithFailure() {
Line 107:         
enclosingCommand.getParameters().getDiskImage().setImageStatus(ImageStatus.ILLEGAL);
Line 108:         ImagesHandler.updateImageStatus(
Line 109:                 
enclosingCommand.getParameters().getDiskImage().getImageId(),
Line 110:                 
enclosingCommand.getParameters().getDiskImage().getImageStatus());
compensate() calls to RemoveDiskCommand which calls to RemoveImageCommand which 
first marks the image as ILLEGAL...
Do you need mark it as ILLEGAL either?
Line 111:         compensate();
Line 112:         enclosingCommand.getReturnValue().setSucceeded(true);
Line 113:     }
Line 114: 


Line 107:         
enclosingCommand.getParameters().getDiskImage().setImageStatus(ImageStatus.ILLEGAL);
Line 108:         ImagesHandler.updateImageStatus(
Line 109:                 
enclosingCommand.getParameters().getDiskImage().getImageId(),
Line 110:                 
enclosingCommand.getParameters().getDiskImage().getImageStatus());
Line 111:         compensate();
This comment is not related to this patch.
Why compensate() call to RemoveDiskCommand() and not RemoveImageCommand 
directly?
Line 112:         enclosingCommand.getReturnValue().setSucceeded(true);
Line 113:     }
Line 114: 
Line 115:     @Override


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I49054d36eef780d0902f7dcd448ca44797f42916
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to