You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2014/01/30 18:13:03 UTC

git commit: Fixes APLO-338: PeriodStat buffer in Broker grows infinitely

Updated Branches:
  refs/heads/trunk 57f5287d0 -> 85d3413ff


Fixes APLO-338: PeriodStat buffer in Broker grows infinitely

Credit goes to Magnus Holm who identified the cause.

Project: http://git-wip-us.apache.org/repos/asf/activemq-apollo/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-apollo/commit/85d3413f
Tree: http://git-wip-us.apache.org/repos/asf/activemq-apollo/tree/85d3413f
Diff: http://git-wip-us.apache.org/repos/asf/activemq-apollo/diff/85d3413f

Branch: refs/heads/trunk
Commit: 85d3413ffef462bad0288cd2b4bd8786e597b1cd
Parents: 57f5287
Author: Hiram Chirino <hi...@hiramchirino.com>
Authored: Thu Jan 30 12:12:29 2014 -0500
Committer: Hiram Chirino <hi...@hiramchirino.com>
Committed: Thu Jan 30 12:12:29 2014 -0500

----------------------------------------------------------------------
 .../src/main/scala/org/apache/activemq/apollo/broker/Broker.scala  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-apollo/blob/85d3413f/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala
----------------------------------------------------------------------
diff --git a/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala b/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala
index 2582ca5..3560074 100644
--- a/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala
+++ b/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala
@@ -433,7 +433,7 @@ class Broker() extends BaseService with SecuredResource with PluginStateSupport
   }
 
   def roll_current_period = {
-    stats_of_5min.add(current_period)
+    stats_of_5min += current_period
     current_period = new PeriodStat
     current_period.max_connections = connections.size
     max_connections_in_5min = PeriodStat(stats_of_5min).max_connections