MAIL_STORAGE_CONTEXT(index_trans);
int ret = 0;
+ if (t->nontransactional_changes)
+ t->changes->changed = TRUE;
+
if (t->save_ctx != NULL) {
if (t->box->v.transaction_save_commit_pre(t->save_ctx) < 0) {
t->save_ctx = NULL;
ret = -1;
+ } else {
+ t->changes->changed = TRUE;
}
}
if (t->super.commit(index_trans, result_r) < 0) {
mail_storage_set_index_error(t->box);
ret = -1;
+ } else if (result_r->commit_size > 0) {
+ /* something was written to the transaction log */
+ t->changes->changed = TRUE;
}
}
uidl = "";
}
+ _mail->transaction->nontransactional_changes = TRUE;
maildir_uidlist_set_ext(mbox->uidlist, _mail->uid,
MAILDIR_UIDLIST_REC_EXT_POP3_UIDL, uidl);
}
struct mailbox_transaction_stats stats;
/* Set to TRUE to update stats_* fields */
unsigned int stats_track:1;
+ /* We've done some non-transactional (e.g. dovecot-uidlist updates) */
+ unsigned int nontransactional_changes:1;
};
union mail_search_module_context {
/* number of modseq changes that couldn't be changed as requested */
unsigned int ignored_modseq_changes;
+
+ /* TRUE if anything actually changed with this commit */
+ bool changed;
};
struct mailbox_sync_rec {