On Tue, Apr 12, 2016 at 11:05:08AM +0300, Dmitry Nezhevenko wrote:
Hi,
It looks like I've found something strange. It looks like dovecot updates fts-lucene index every time I'm opening virtual folder that contains FTS query:
indexer-worker(dion): Warning: fts-lucene: Settings have changed, rebuilding index for mailbox
Ok. It seems that it's unrelated to virtual at all. It's enough to just use any folder from non-inbox private namespace and perform FTS multiple times.
I've added a few debug prints around fts_lucene_settings_checksum, fts_index_have_compatible_settings and fts_index_set_header and fount that fts_lucene_settings_checksum is always same.
The root issue is that fts_lucene_settings_checksum reads checksum from mailbox with empty name (probably namespace root mbox). At the same time fts_index_set_header is called for all mailboxes in namespace except this 'root' mbox.
That's actually why I'm always getting 'Settings have changed' warning.
I've tried to create 'archive' mailbox (same as namespace name) and got call to fts_index_set_header() for it during scan, but with zero settings_checksum.
Any suggestions how to fix it?
-- WBR, Dmitry