This could have happened with MAIL_INDEX_TRANSACTION_FLAG_AVOID_FLAG_UPDATES
when all flag updates were cancelled and no other changes were done.
unsigned char update_data[sizeof(*u) + sizeof(offset)];
if (file->max_tail_offset == file->sync_offset) {
+ if (ctx->output->used == 0 &&
+ file->saved_tail_offset == file->max_tail_offset) {
+ /* nothing to write here after all (e.g. all unchanged
+ flag updates were dropped by export) */
+ return;
+ }
+
/* FIXME: when we remove exclusive log locking, we
can't rely on this. then write non-changed offset + check
real offset + rewrite the new offset if other transactions