From aabc4a4114b73e3bfaccc0c22c0f3394d0d44215 Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Thu, 14 Nov 2024 12:08:35 +0100 Subject: [PATCH] sumstats: Remove copy() for Broker::publish() calls Serialization happens immediately at Broker::publish() time, there should be no caching issues. --- scripts/base/frameworks/sumstats/cluster.zeek | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/scripts/base/frameworks/sumstats/cluster.zeek b/scripts/base/frameworks/sumstats/cluster.zeek index c5d45e7a7d..3016b5bb42 100644 --- a/scripts/base/frameworks/sumstats/cluster.zeek +++ b/scripts/base/frameworks/sumstats/cluster.zeek @@ -151,12 +151,8 @@ event SumStats::cluster_get_result(uid: string, ss_name: string, key: Key, clean { if ( uid in sending_results && key in sending_results[uid] ) { - # XXX: Is that comment stale? - # - # Note: copy is needed to compensate serialization caching issue. This should be - # changed to something else later. Broker::publish(Cluster::manager_topic, SumStats::cluster_send_result, - uid, ss_name, key, copy(sending_results[uid][key]), cleanup); + uid, ss_name, key, sending_results[uid][key], cleanup); delete sending_results[uid][key]; } else @@ -171,10 +167,8 @@ event SumStats::cluster_get_result(uid: string, ss_name: string, key: Key, clean { if ( ss_name in result_store && key in result_store[ss_name] ) { - # Note: copy is needed to compensate serialization caching issue. This should be - # changed to something else later. Broker::publish(Cluster::manager_topic, SumStats::cluster_send_result, - uid, ss_name, key, copy(result_store[ss_name][key]), cleanup); + uid, ss_name, key, result_store[ss_name][key], cleanup); } else {