From 3b3831ccc6c475eab6098670e1c6506e1c8d99c8 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 4 Oct 2019 16:19:54 +0100 Subject: [PATCH] [Minor] Slightly improve log messages --- src/hs_helper.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/hs_helper.c b/src/hs_helper.c index a20e176f6..d0fbb1cd9 100644 --- a/src/hs_helper.c +++ b/src/hs_helper.c @@ -213,8 +213,7 @@ rspamd_rs_compile_cb (guint ncompiled, GError *err, void *cbd) ctx = (struct hs_helper_ctx *)worker->ctx; if (ncompiled > 0) { - msg_info ("compiled %d regular expressions to the hyperscan tree", - ncompiled); + /* Enforce update for other workers */ hack_global_forced = TRUE; } @@ -225,6 +224,15 @@ rspamd_rs_compile_cb (guint ncompiled, GError *err, void *cbd) if (!ctx->loaded) { when = 5.0; /* Postpone */ ctx->loaded = TRUE; + msg_info ("compiled %d regular expressions to the hyperscan tree, " + "postpone loaded notification for %.0f seconds to avoid races", + ncompiled, + when); + } + else { + msg_info ("compiled %d regular expressions to the hyperscan tree, " + "send loaded notification", + ncompiled); } tm = g_malloc0 (sizeof (*tm)); -- 2.39.5