Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 76483 invoked from network); 3 Nov 2009 19:16:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Nov 2009 19:16:05 -0000 Received: (qmail 86666 invoked by uid 500); 3 Nov 2009 19:16:05 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 86581 invoked by uid 500); 3 Nov 2009 19:16:04 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 86572 invoked by uid 99); 3 Nov 2009 19:16:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 19:16:04 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 19:16:02 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E269F2388962; Tue, 3 Nov 2009 19:15:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r832519 - /couchdb/trunk/src/couchdb/couch_stats_aggregator.erl Date: Tue, 03 Nov 2009 19:15:41 -0000 To: commits@couchdb.apache.org From: kocolosk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091103191541.E269F2388962@eris.apache.org> Author: kocolosk Date: Tue Nov 3 19:15:40 2009 New Revision: 832519 URL: http://svn.apache.org/viewvc?rev=832519&view=rev Log: only 1 timer at a time (e.g. flush/1). thanks tisba for the report. COUCHDB-539 Modified: couchdb/trunk/src/couchdb/couch_stats_aggregator.erl Modified: couchdb/trunk/src/couchdb/couch_stats_aggregator.erl URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_stats_aggregator.erl?rev=832519&r1=832518&r2=832519&view=diff ============================================================================== --- couchdb/trunk/src/couchdb/couch_stats_aggregator.erl (original) +++ couchdb/trunk/src/couchdb/couch_stats_aggregator.erl Tue Nov 3 19:15:40 2009 @@ -122,7 +122,8 @@ timer:cancel(TRef), ok. -handle_call(collect_sample, _, {_TRef, SampleInterval}) -> +handle_call(collect_sample, _, {OldTRef, SampleInterval}) -> + timer:cancel(OldTRef), {ok, TRef} = timer:apply_after(SampleInterval, ?MODULE, collect_sample, []), % Gather new stats values to add. Incs = lists:map(fun({Key, Value}) ->