commit a2230af: [Rework] Re cache: Load compiled hyperscan in the main process as well
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Mar 23 16:21:07 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-03-23 16:01:28 +0000
URL: https://github.com/rspamd/rspamd/commit/a2230af117444bb66f92c1b7f036e9b226100759
[Rework] Re cache: Load compiled hyperscan in the main process as well
---
src/libserver/rspamd_control.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/libserver/rspamd_control.c b/src/libserver/rspamd_control.c
index cb2efecb9..1bb4ac4d6 100644
--- a/src/libserver/rspamd_control.c
+++ b/src/libserver/rspamd_control.c
@@ -904,6 +904,14 @@ rspamd_srv_handler (EV_P_ ev_io *w, int revents)
}
break;
case RSPAMD_SRV_HYPERSCAN_LOADED:
+ /* Load RE cache to provide it for new forks */
+ if (rspamd_re_cache_is_hs_loaded (srv->cfg->re_cache) != RSPAMD_HYPERSCAN_LOADED_FULL ||
+ cmd.cmd.hs_loaded.forced) {
+ rspamd_re_cache_load_hyperscan (
+ srv->cfg->re_cache,
+ cmd.cmd.hs_loaded.cache_dir);
+ }
+
/* Broadcast command to all workers */
memset (&wcmd, 0, sizeof (wcmd));
wcmd.type = RSPAMD_CONTROL_HYPERSCAN_LOADED;
More information about the Commits
mailing list