From db6a0d65aabf49146b74a33ef70e455d8d823b4d Mon Sep 17 00:00:00 2001 From: Sanjay Tripathi Date: Mon, 27 Oct 2014 14:54:21 +0530 Subject: [PATCH] No need to log discrepancy resource count message for Primary and secondary storage. --- .../src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java b/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java index 63150ebdc1b..d15b68a4560 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."); }