From 3fa8fda37c8b9fac1e38b57d28d23917106fe02b Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Wed, 15 May 2013 15:54:03 +0100 Subject: [PATCH] CLOUDSTACK-962: Because of the same reason to this (CLOUDSTACK-685) https://reviews.apache.org/r/11157/ Signed-off-by: Chip Childers --- .../network/router/VirtualNetworkApplianceManagerImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java index 5de2388742d..b8ad29f6216 100755 --- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java +++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java @@ -3957,6 +3957,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) {