Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C32EEE64E for ; Tue, 29 Jan 2013 13:20:33 +0000 (UTC) Received: (qmail 23636 invoked by uid 500); 29 Jan 2013 13:20:33 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 23337 invoked by uid 500); 29 Jan 2013 13:20:33 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 23313 invoked by uid 99); 29 Jan 2013 13:20:32 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jan 2013 13:20:32 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id AE2841C6BC3; Tue, 29 Jan 2013 13:20:25 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============5507338497407586888==" MIME-Version: 1.0 Subject: Re: Review Request: CloudStack usage server didn't store data to cloud_usag?e in correct time From: "Kishan Kavala" To: "Kishan Kavala" , "Rohit Yadav" Cc: "cloudstack" , "Wei ZHOU" Date: Tue, 29 Jan 2013 13:20:25 -0000 Message-ID: <20130129132025.24984.98807@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Kishan Kavala" X-ReviewGroup: cloudstack X-ReviewRequest-URL: https://reviews.apache.org/r/8971/ X-Sender: "Kishan Kavala" References: <20130116160410.29509.53919@reviews.apache.org> In-Reply-To: <20130116160410.29509.53919@reviews.apache.org> Reply-To: "Kishan Kavala" --===============5507338497407586888== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/8971/#review15796 ----------------------------------------------------------- Wei Zhou, Patch changes the network usage calculation to use current bytes instead of= aggregate bytes. Consider the following case: 1. current bytes is updated every 5 minutes 2. usage aggregation is 1440 (daily) 3. usage job runs at 5pm For daily aggregation, records will be generated for 00:00 hrs to 23.59 hrs= . If I generate 2GB traffic at 6pm on 28th Jan and 3GB at 10am on 29th Jan,= as per the fix, 5GB usage will be reported for 28th Jan 00:00 to 23:59 hrs= when the job runs at 5pm, which is not correct. When aggregate bytes is us= ed for calculation it'll show 2GB usage for 28th Jan correctly. I think the issue is with NetworkStatsUpdateTask in VirtualNetworkAppliance= ManagerImpl which updates aggregate bytes. There is probably some delay in = updating aggregate bytes. - Kishan Kavala On Jan. 16, 2013, 4:04 p.m., Wei ZHOU wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/8971/ > ----------------------------------------------------------- > = > (Updated Jan. 16, 2013, 4:04 p.m.) > = > = > Review request for cloudstack, Kishan Kavala and Rohit Yadav. > = > = > Description > ------- > = > The usage sever does not handle data in the correct time. For example, it= regards the data traffic between 9:15-9:30 as the data traffic between 9:3= 0-9:45. = > Another example is, it regards the data traffic in the day before yesterd= ay as the traffic in yesterday. > = > Another problem is, when the usage.stats.job.aggregation.range is set to = N( for example, 15), the usage job handle the data every N+1 minutes( for e= xample 16). > = > This is a patch for this issue (all details are described here: https://i= ssues.apache.org/jira/browse/CLOUDSTACK-962) > = > = > This addresses bug CLOUDSTAC?K-962. > = > = > Diffs > ----- > = > server/src/com/cloud/user/dao/UserStatisticsDaoImpl.java fd7795a = > usage/src/com/cloud/usage/UsageManagerImpl.java 53ebb14 = > = > Diff: https://reviews.apache.org/r/8971/diff/ > = > = > Testing > ------- > = > The patch is tested in CloudStack Virtual Router environment (Advanced Ne= tworking, not Basic Networking). > = > = > Thanks, > = > Wei ZHOU > = > --===============5507338497407586888==--