commit 3b3831c: [Minor] Slightly improve log messages

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Oct 4 15:21:07 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-10-04 16:19:54 +0100
URL: https://github.com/rspamd/rspamd/commit/3b3831ccc6c475eab6098670e1c6506e1c8d99c8 (HEAD -> master)

[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));


More information about the Commits mailing list