index->map = mail_index_map_alloc(index);
/* first try updating the existing mapping from transaction log. */
- if (index->map->hdr.indexid != 0 && index->indexid != 0) {
- /* we're not creating the index, or opening transaction log.
+ if (index->initial_mapped) {
+ /* we're not creating/opening the index.
sync this as a view from transaction log. */
ret = mail_index_sync_map(&index->map, type, FALSE);
} else {
}
}
+ index->initial_mapped = TRUE;
index->mapping = FALSE;
return ret;
}
unsigned int need_recreate:1;
unsigned int modseqs_enabled:1;
unsigned int initial_create:1;
+ unsigned int initial_mapped:1;
};
extern struct mail_index_module_register mail_index_module_register;