couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject svn commit: r832519 - /couchdb/trunk/src/couchdb/couch_stats_aggregator.erl
Date Tue, 03 Nov 2009 19:15:41 GMT
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}) ->



Mime
View raw message