Gilad Chaplik has posted comments on this change. Change subject: core: Fix QuotaManager internal rollback ......................................................................
Patch Set 1: (2 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java Line 465: long requestedMemory = Line 466: parameter.getQuotaAction() == QuotaConsumptionParameter.QuotaAction.CONSUME ? Line 467: -parameter.getRequestedMemory() : parameter.getRequestedMemory(); Line 468: int requestedCpu = Line 469: parameter.getQuotaAction() == QuotaConsumptionParameter.QuotaAction.CONSUME ? redundant check (466), consider changing Line 470: -parameter.getRequestedCpu() : parameter.getRequestedCpu(); Line 471: Line 472: QuotaVdsGroup quotaVdsGroup = null; Line 473: Quota quota = parameter.getQuota(); Line 481: } Line 482: } Line 483: } Line 484: Line 485: // quotaVdsGroup cannot be null - otherwise the parameter could not have been executed just to be sure, add a condition here. Line 486: long newMemory = requestedMemory + quotaVdsGroup.getMemSizeMBUsage(); Line 487: int newVcpu = requestedCpu + quotaVdsGroup.getVirtualCpuUsage(); Line 488: cacheNewValues(quotaVdsGroup, newMemory, newVcpu); Line 489: } -- To view, visit http://gerrit.ovirt.org/13982 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cee6810900c17f64d6ae47056969e656b1a4840 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: ofri masad <[email protected]> Gerrit-Reviewer: Doron Fediuck <[email protected]> Gerrit-Reviewer: Gilad Chaplik <[email protected]> Gerrit-Reviewer: Laszlo Hornyak <[email protected]> Gerrit-Reviewer: ofri masad <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
