mail_storage_settings_to_index_flags(box->storage->set);
ibox->next_lock_notify = time(NULL) + LOCK_NOTIFY_INTERVAL;
- ibox->commit_log_file_seq = 0;
ibox->index = index_storage_alloc(box->list, name, flags, index_prefix);
if (box->file_create_mode == 0) {
time_t next_lock_notify; /* temporary */
enum mailbox_lock_notify_type last_notify_type;
- uint32_t commit_log_file_seq;
- uoff_t commit_log_file_offset;
-
const ARRAY_TYPE(keywords) *keyword_names;
struct mail_cache_field *cache_fields;
ret = t->super.commit(t->trans, log_file_seq_r, log_file_offset_r);
if (ret < 0)
mail_storage_set_index_error(t->ibox);
- else {
- if (*log_file_seq_r != 0) {
- t->ibox->commit_log_file_seq = *log_file_seq_r;
- t->ibox->commit_log_file_offset = *log_file_offset_r;
- }
- }
index_transaction_free(t);
return ret;
if (mail_index_sync_commit(&ctx->sync_ctx) < 0) {
mail_storage_set_index_error(&mbox->ibox);
ret = -1;
- } else {
- mbox->ibox.commit_log_file_seq = 0;
- mbox->ibox.commit_log_file_offset = 0;
}
mbox->syncing_commit = FALSE;
}
if ((flags & MBOX_SYNC_REWRITE) != 0)
sync_flags |= MAIL_INDEX_SYNC_FLAG_FLUSH_DIRTY;
- if ((flags & MBOX_SYNC_LAST_COMMIT) != 0) {
- ret = mail_index_sync_begin_to(mbox->ibox.index,
- &index_sync_ctx, &sync_view, &trans,
- mbox->ibox.commit_log_file_seq,
- mbox->ibox.commit_log_file_offset, sync_flags);
- } else {
- ret = mail_index_sync_begin(mbox->ibox.index, &index_sync_ctx,
- &sync_view, &trans, sync_flags);
- }
-
+ ret = mail_index_sync_begin(mbox->ibox.index, &index_sync_ctx,
+ &sync_view, &trans, sync_flags);
if (ret <= 0) {
if (ret < 0)
mail_storage_set_index_error(&mbox->ibox);
else if (mail_index_sync_commit(&index_sync_ctx) < 0) {
mail_storage_set_index_error(&mbox->ibox);
ret = -1;
- } else {
- mbox->ibox.commit_log_file_seq = 0;
- mbox->ibox.commit_log_file_offset = 0;
}
sync_ctx.t = NULL;
sync_ctx.index_sync_ctx = NULL;