commit ae98b44: [Minor] Do not store serialized ANN
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Jul 9 16:49:04 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-07-09 17:46:34 +0100
URL: https://github.com/rspamd/rspamd/commit/ae98b4491585045b0f8655d8335c8044cea15280 (HEAD -> master)
[Minor] Do not store serialized ANN
---
src/plugins/lua/neural.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/lua/neural.lua b/src/plugins/lua/neural.lua
index 815e1ddf0..b88890c24 100644
--- a/src/plugins/lua/neural.lua
+++ b/src/plugins/lua/neural.lua
@@ -789,7 +789,6 @@ local function load_new_ann(rule, ev_base, set, profile, min_diff)
if ann then
set.ann = {
- ann = ann,
version = profile.version,
symbols = profile.symbols,
distance = min_diff,
@@ -798,6 +797,7 @@ local function load_new_ann(rule, ev_base, set, profile, min_diff)
local ucl = require "ucl"
local profile_serialized = ucl.to_format(profile, 'json-compact', true)
+ profile.ann = ann -- To avoid serialization
local function rank_cb(_, _)
-- TODO: maybe add some logging
More information about the Commits
mailing list