From 1eadeaec3cf13a809d2c8720d9a6a3b895585796 Mon Sep 17 00:00:00 2001 From: Seth Hall Date: Sat, 3 Aug 2013 01:57:37 -0400 Subject: [PATCH] Fix a major memory issue in the SumStats framework. - There are still problems, but this should prevent a deadlock issue and help with memory use. --- CHANGES | 4 ++++ VERSION | 2 +- scripts/base/frameworks/sumstats/cluster.bro | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index d1f1dde6a6..824eb0c436 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,8 @@ +2.1-1027 | 2013-08-03 01:57:37 -0400 + + * Fix a major memory issue in the SumStats framework. + 2.1-1026 | 2013-08-02 22:35:09 -0400 * Fix the SumStats top-k plugin and test. (Seth Hall) diff --git a/VERSION b/VERSION index b6505c675b..7d3375bd3d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.1-1026 +2.1-1027 diff --git a/scripts/base/frameworks/sumstats/cluster.bro b/scripts/base/frameworks/sumstats/cluster.bro index d2db09f312..9c343ad15d 100644 --- a/scripts/base/frameworks/sumstats/cluster.bro +++ b/scripts/base/frameworks/sumstats/cluster.bro @@ -73,7 +73,7 @@ global recent_global_view_keys: table[string, Key] of count &create_expire=1min # Result tables indexed on a uid that are currently being sent to the # manager. -global sending_results: table[string] of ResultTable = table(); +global sending_results: table[string] of ResultTable = table() &create_expire=1min; # This is done on all non-manager node types in the event that a sumstat is # being collected somewhere other than a worker. @@ -171,7 +171,7 @@ event SumStats::cluster_ss_request(uid: string, ss_name: string, cleanup: bool) #print fmt("WORKER %s: received the cluster_ss_request event for %s.", Cluster::node, id); # Create a back store for the result - sending_results[uid] = (ss_name in result_store) ? copy(result_store[ss_name]) : table(); + sending_results[uid] = (ss_name in result_store) ? result_store[ss_name] : table(); # Lookup the actual sumstats and reset it, the reference to the data # currently stored will be maintained internally from the