Roy Golan has posted comments on this change.

Change subject: core: Quota consumption for Vm's disk updating refactor.
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/39398/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java:

Line 691:             boolean isQuotaChanged          = 
!oldDiskImage.getQuotaId().equals(newDiskImage.getQuotaId());
Line 692:             long diskExtendingDiff = 
newDiskImage.getSizeInGigabytes() - oldDiskImage.getSizeInGigabytes();
Line 693: 
Line 694:             // Generate a CONSUME request
Line 695:             if (doesNewDiskHaveQuota) {
> This is redundant - let the underlying infra handle it.
it makes sense to keep the client code tidy and small.

and the api today forces the client to send a RELEASE before consuming. from 
API standpoint ignoring null is a bad thing.

The right path is eliminate totally the RELEASE part from the client - it 
should be done internally by the CONSUME. I don't see why this wasn't like that 
from the start. @mlipchuk may shed light here.

so bottom line, I'm against the ignore null on RELEASE but, and all for doing 
the right fix for the API
Line 696:                 if (isQuotaChanged) {
Line 697:                     
list.add(generateQuotaRequestParameters(newDiskImage,
Line 698:                             
QuotaConsumptionParameter.QuotaAction.CONSUME,
Line 699:                             newDiskImage.getSizeInGigabytes()));


-- 
To view, visit https://gerrit.ovirt.org/39398
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I838973e9f1e71d36193fb2ea832b18b9308c7248
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Amit Aviram <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Freddy Rolland <[email protected]>
Gerrit-Reviewer: Idan Shaby <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Roy Golan <[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