Fix the OOM of heka monitoring filter

This change resets the table that holds data for the heka monitoring
filter. Otherwise the table may grow infinitely and the sandbox will
eventually be killed by Heka.

Change-Id: If8c07944e42700d913831b500466b33831a41482
Partial-Bug: #1545743
This commit is contained in:
Guillaume Thouvenin
2016-02-16 16:53:48 +01:00
parent bceb240c39
commit f0520cd46c

View File

@@ -74,6 +74,10 @@ function inject_bulk_metric(ts, hostname, source)
local payload = safe_json_encode(bulk_datapoints)
if not payload then
-- Reset the table otherwise it may grow infinitely and the sandbox
-- will eventually be killed by Heka.
-- See https://bugs.launchpad.net/lma-toolchain/+bug/1545743
bulk_datapoints = {}
return
end