]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Log an info message when dovecot.index.pvt UIDVALIDITY changes
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 24 May 2017 08:50:08 +0000 (11:50 +0300)
committerGitLab <gitlab@git.dovecot.net>
Mon, 29 May 2017 10:59:05 +0000 (13:59 +0300)
src/lib-storage/index/index-sync-pvt.c

index 59683166b6aac14b8eb0e7d72d654b3bfb9f3b47..530052ce85caea0451850020e8c7dbaa11efbb70 100644 (file)
@@ -175,12 +175,15 @@ index_mailbox_sync_pvt_index(struct index_mailbox_sync_pvt_context *ctx,
                        t_array_init(&keywords, 32);
                }
        } else if (hdr_pvt->uid_validity == 0 && hdr_pvt->next_uid <= 1) {
-               /* creating the initial index */
+               /* creating the initial index - no logging */
                reset = TRUE;
                initial_index = TRUE;
        } else {
                /* mailbox created/recreated */
                reset = TRUE;
+               i_info("Mailbox %s UIDVALIDITY changed (%u -> %u), reseting private index",
+                      ctx->box->vname, hdr_pvt->uid_validity,
+                      hdr_shared->uid_validity);
        }
        /* for public namespaces copy the initial private flags from the shared
           index. this allows Sieve scripts to set the initial flags. */