From: Sergey Kitov Date: Mon, 7 Aug 2017 13:03:46 +0000 (+0300) Subject: doveadm: mailbox_list_index_very_dirty_syncs disabled for force-resync X-Git-Tag: 2.2.32.rc2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e0bc01d7f1427ef0685e2ea2da0a174028d1993b;p=thirdparty%2Fdovecot%2Fcore.git 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. --- diff --git a/src/doveadm/doveadm-mail.c b/src/doveadm/doveadm-mail.c index a6944738e5..15046d458e 100644 --- a/src/doveadm/doveadm-mail.c +++ b/src/doveadm/doveadm-mail.c @@ -302,6 +302,18 @@ static int cmd_force_resync_box(struct doveadm_mail_cmd_context *ctx, 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 @@ static struct doveadm_mail_cmd_context *cmd_force_resync_alloc(void) 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; }