Skip to content

Commit

Permalink
lib-index: Make sure new dovecot.index.log files start tracking modseqs.
Browse files Browse the repository at this point in the history
This will make mail_index_modseq_get_next_log_offset() work correctly even
if modseqs haven't been explicitly enabled.
  • Loading branch information
sirainen authored and GitLab committed Sep 9, 2016
1 parent da8556f commit 1ff03d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib-index/mail-transaction-log-file.c
Expand Up @@ -251,6 +251,12 @@ mail_transaction_log_init_hdr(struct mail_transaction_log *log,
} else {
hdr->file_seq = 1;
}
if (hdr->initial_modseq == 0) {
/* modseq tracking in log files is required for many reasons
nowadays, even if per-message modseqs aren't enabled in
dovecot.index. */
hdr->initial_modseq = 1;
}

if (log->head != NULL) {
/* make sure the sequence always increases to avoid crashes
Expand Down

0 comments on commit 1ff03d2

Please sign in to comment.