diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-13 15:58:01 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-13 15:58:01 +0100 |
commit | 25b777b360662a391454f64346589dbec792831f (patch) | |
tree | 2179566b59a65ae27500c2e4e9dcae7149d60486 /src/fuzzy_storage.c | |
parent | bbbb8d029cf889fd1c770341094417d834cab9e0 (diff) | |
download | rspamd-25b777b360662a391454f64346589dbec792831f.tar.gz rspamd-25b777b360662a391454f64346589dbec792831f.zip |
[Feature] Add versions to fuzzy storage
Diffstat (limited to 'src/fuzzy_storage.c')
-rw-r--r-- | src/fuzzy_storage.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index f43cb3f44..7803307b0 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -209,6 +209,7 @@ rspamd_fuzzy_process_updates_queue (struct rspamd_fuzzy_storage_ctx *ctx) struct rspamd_fuzzy_cmd *cmd; gpointer ptr; guint nupdates = 0; + time_t now = time (NULL); if (ctx->updates_pending && g_queue_get_length (ctx->updates_pending) > 0 && @@ -227,7 +228,7 @@ rspamd_fuzzy_process_updates_queue (struct rspamd_fuzzy_storage_ctx *ctx) } if (cmd->cmd == FUZZY_WRITE) { - rspamd_fuzzy_backend_add (ctx->backend, ptr); + rspamd_fuzzy_backend_add (ctx->backend, ptr, now); } else { rspamd_fuzzy_backend_del (ctx->backend, ptr); @@ -248,7 +249,8 @@ rspamd_fuzzy_process_updates_queue (struct rspamd_fuzzy_storage_ctx *ctx) } g_queue_clear (ctx->updates_pending); - msg_info ("updated fuzzy storage: %ud updates processed", nupdates); + msg_info ("updated fuzzy storage: %ud updates processed, version: %d", + nupdates, rspamd_fuzzy_backend_version (ctx->backend)); } else { msg_err ("cannot commit update transaction to fuzzy backend, " |