Mercurial > dovecot > core-2.2
changeset 22440:49e3fb105f87
doveadm: mailbox_list_index_very_dirty_syncs disabled for force-resync
prerun of cmd force-resync sets mailbox_list_index_very_dirty_syncs to
no for mail_storage_service_user befor mail_user is allocated.
author | Sergey Kitov <sergey.kitov@open-xchange.com> |
---|---|
date | Mon, 07 Aug 2017 16:03:46 +0300 |
parents | 74c84176bbdc |
children | 31ab1147d15d |
files | src/doveadm/doveadm-mail.c |
diffstat | 1 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/doveadm/doveadm-mail.c Mon Aug 07 15:59:35 2017 +0300 +++ b/src/doveadm/doveadm-mail.c Mon Aug 07 16:03:46 2017 +0300 @@ -302,6 +302,18 @@ return ret; } +static int cmd_force_resync_prerun(struct doveadm_mail_cmd_context *ctx ATTR_UNUSED, + struct mail_storage_service_user *service_user, + const char **error_r) +{ + if (mail_storage_service_user_set_setting(service_user, + "mailbox_list_index_very_dirty_syncs", + "no", + error_r) <= 0) + i_unreached(); + return 0; +} + static int cmd_force_resync_run(struct doveadm_mail_cmd_context *ctx, struct mail_user *user) { @@ -347,6 +359,7 @@ ctx = doveadm_mail_cmd_alloc(struct doveadm_mail_cmd_context); ctx->v.init = cmd_force_resync_init; ctx->v.run = cmd_force_resync_run; + ctx->v.prerun = cmd_force_resync_prerun; return ctx; }