Repository: cloudstack Updated Branches: refs/heads/master 9bcf0e1bf -> 4f4595cef
No need to log discrepancy resource count message for Primary and secondary storage. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4f4595ce Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4f4595ce Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4f4595ce Branch: refs/heads/master Commit: 4f4595cef81a81a264a58ae22c0c5286b1540b93 Parents: 9bcf0e1 Author: Sanjay Tripathi <[email protected]> Authored: Mon Oct 27 14:54:21 2014 +0530 Committer: Sanjay Tripathi <[email protected]> Committed: Mon Oct 27 15:23:36 2014 +0530 ---------------------------------------------------------------------- server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f4595ce/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java b/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java index 63150eb..d15b68a 100755 --- a/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java +++ b/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java @@ -888,7 +888,8 @@ public class ResourceLimitManagerImpl extends ManagerBase implements ResourceLim } _resourceCountDao.setResourceCount(accountId, ResourceOwnerType.Account, type, (newCount == null) ? 0 : newCount.longValue()); - if (!Long.valueOf(oldCount).equals(newCount)) { + // No need to log message for primary and secondary storage because both are recalculating the resource count which will not lead to any discrepancy. + if (!Long.valueOf(oldCount).equals(newCount) && (type != Resource.ResourceType.primary_storage && type != Resource.ResourceType.secondary_storage)) { s_logger.info("Discrepency in the resource count " + "(original count=" + oldCount + " correct count = " + newCount + ") for type " + type + " for account ID " + accountId + " is fixed during resource count recalculation."); }
