rafaelweingartner commented on a change in pull request #2573: Cloudstack 10356
URL: https://github.com/apache/cloudstack/pull/2573#discussion_r181747775
##########
File path:
engine/schema/src/main/java/com/cloud/configuration/dao/ResourceCountDaoImpl.java
##########
@@ -126,8 +126,10 @@ public void updateDomainCount(long domainId, ResourceType
type, boolean incremen
delta = increment ? delta : delta * -1;
ResourceCountVO resourceCountVO = findByOwnerAndType(domainId,
ResourceOwnerType.Domain, type);
- resourceCountVO.setCount(resourceCountVO.getCount() + delta);
- update(resourceCountVO.getId(), resourceCountVO);
+ if (resourceCountVO != null) {
Review comment:
If you do not find a resource to update, should not you break the execution
flow?
It seems that if the `resourceCountVO` is null, then we must have something
wrong in the database.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services