CLOUDSTACK-962: Because of the same reason to this (CLOUDSTACK-685) https://reviews.apache.org/r/11157/
Signed-off-by: Chip Childers <chip.child...@gmail.com> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8f7a51ee Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8f7a51ee Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8f7a51ee Branch: refs/heads/object_store Commit: 8f7a51ee5f5d745026d51b9ca3b2746a39f00bf2 Parents: 987c342 Author: Wei Zhou <w.z...@leaseweb.com> Authored: Wed May 15 15:54:03 2013 +0100 Committer: Chip Childers <chip.child...@gmail.com> Committed: Wed May 15 16:39:22 2013 +0100 ---------------------------------------------------------------------- .../router/VirtualNetworkApplianceManagerImpl.java | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f7a51ee/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java index 522b90e..29ef0d5 100755 --- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java +++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java @@ -3956,6 +3956,11 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V stats.setNetBytesSent(stats.getNetBytesSent() + stats.getCurrentBytesSent()); } stats.setCurrentBytesSent(answer.getBytesSent()); + if (! _dailyOrHourly) { + //update agg bytes + stats.setAggBytesSent(stats.getNetBytesSent() + stats.getCurrentBytesSent()); + stats.setAggBytesReceived(stats.getNetBytesReceived() + stats.getCurrentBytesReceived()); + } _userStatsDao.update(stats.getId(), stats); txn.commit(); } catch (Exception e) {