Gilad Chaplik has posted comments on this change.

Change subject: core: Add notification to quota resize (#848289)
......................................................................


Patch Set 8: (3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/QuotaCRUDCommand.java
Line 35:     public void setQuota(Quota quota) {
Line 36:         this.quota = quota;
Line 37:     }
Line 38: 
Line 39:     protected void refreshQuotaFromDB() {
no need for this method.
Line 40:         this.quota = getQuotaDAO().getById(getQuotaId());
Line 41:     }
Line 42: 
Line 43:     protected boolean checkQuotaValidationCommon(Quota quota, 
List<String> messages) {


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateQuotaCommand.java
Line 47:     }
Line 48: 
Line 49:     @Override
Line 50:     protected void executeCommand() {
Line 51:         beforeUpdate();
I think that we should always provide a message.
and there is no need for another roundtrip for the DB
Line 52:         removeQuotaFromCache();
Line 53:         setQuotaParameter();
Line 54:         QuotaDAO dao = getQuotaDAO();
Line 55:         dao.update(getParameters().getQuota());


Line 53:         setQuotaParameter();
Line 54:         QuotaDAO dao = getQuotaDAO();
Line 55:         dao.update(getParameters().getQuota());
Line 56:         getReturnValue().setSucceeded(true);
Line 57:         afterUpdate();
please move the isExeeded logic to quotaManager
Line 58:     }
Line 59: 
Line 60:     protected void removeQuotaFromCache() {
Line 61:         
QuotaManager.getInstance().removeQuotaFromCache(getQuota().getStoragePoolId(), 
getQuota().getId());


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I5ef7f831120cafa10aa55e51db0270915b221c9f
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: ofri masad <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: ofri masad <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to