From 18e0c770b951c5d8a1269b3829b73a416fc261fe Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 16 Sep 2010 19:18:23 +0400 Subject: * Fix shared usage of statfiles * Add invalidation of statfiles in case of learning, so now statfiles are invalidated in about a minute after learning * This should fix shared usage of statfile pool by several processes --- src/controller.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/controller.c') diff --git a/src/controller.c b/src/controller.c index bbf50d646..2f1473540 100644 --- a/src/controller.c +++ b/src/controller.c @@ -870,6 +870,7 @@ controller_read_socket (f_str_t * in, void *arg) maybe_write_binlog (session->learn_classifier, st, statfile, tokens); msg_info ("learn success for message <%s>, for statfile: %s, sum weight: %.2f", task->message_id, session->learn_symbol, sum); + statfile_pool_plan_invalidate (session->worker->srv->statfile_pool, DEFAULT_STATFILE_INVALIDATE_TIME, DEFAULT_STATFILE_INVALIDATE_JITTER); free_task (task, FALSE); i = rspamd_snprintf (out_buf, sizeof (out_buf), "learn ok, sum weight: %.2f" CRLF, sum); if (!rspamd_dispatcher_write (session->dispatcher, out_buf, i, FALSE, FALSE)) { -- cgit v1.2.3