cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject git commit: updated refs/heads/4.3 to 7a86dc5
Date Thu, 09 Oct 2014 05:28:25 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.3 6d0a9b248 -> 7a86dc516


CLOUDSTACK-2625, CLOUDSTACK-3401: Usage records are ordered by start_date which is not unique.
While listing large datasets or when page size is small this will result in duplicates. Order
records by id instead

(cherry picked from commit 63109a97b1119cd306858cd4068e46859acc8e83)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	server/src/com/cloud/usage/UsageServiceImpl.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7a86dc51
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7a86dc51
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7a86dc51

Branch: refs/heads/4.3
Commit: 7a86dc516dc1184a6394d40bb01d84bdc497095c
Parents: 6d0a9b2
Author: Kishan Kavala <kishan@apache.org>
Authored: Thu Oct 9 10:27:35 2014 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Thu Oct 9 10:56:10 2014 +0530

----------------------------------------------------------------------
 server/src/com/cloud/usage/UsageServiceImpl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a86dc51/server/src/com/cloud/usage/UsageServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/usage/UsageServiceImpl.java b/server/src/com/cloud/usage/UsageServiceImpl.java
index e36ce44..ec47f2a 100755
--- a/server/src/com/cloud/usage/UsageServiceImpl.java
+++ b/server/src/com/cloud/usage/UsageServiceImpl.java
@@ -180,8 +180,8 @@ public class UsageServiceImpl extends ManagerBase implements UsageService,
Manag
             s_logger.debug("getting usage records for account: " + accountId + ", domainId:
" + domainId + ", between " + startDate + " and " + endDate + ", using pageSize: " + cmd.getPageSizeVal()
+ " and startIndex: " + cmd.getStartIndex());
         }
 
-        Filter usageFilter = new Filter(UsageVO.class, "startDate", false, cmd.getStartIndex(),
cmd.getPageSizeVal());
-        
+        Filter usageFilter = new Filter(UsageVO.class, "id", true, cmd.getStartIndex(), cmd.getPageSizeVal());
+
         SearchCriteria<UsageVO> sc = _usageDao.createSearchCriteria();
 
         if (accountId != -1 && accountId != Account.ACCOUNT_ID_SYSTEM &&
!isAdmin && !isDomainAdmin) {


Mime
View raw message