12 Aug
2026
12 Aug
'26
5:32 p.m.
On 08/12/2026 4:11 AM MDT Ihor Rusyn via dovecot <dovecot@dovecot.org> wrote:
Thanks for looking into this. I don't think fts_flatcurve_xapian_refresh() alone would close the gap here — as far as I can tell it re-opens/refreshes an already-open db handle (to pick up externally-committed changes or drop a stale NFS attribute cache), but it doesn't release the write handle the process is holding open against the *old* shard directory during optimize.
fts_flatcurve_xapian_refresh() closes all active write DB handles against the mailbox, and destroys their underlying C++ Xapian write database objects. (read handles are irrelevant because they don't lock).
michael