slusarz / dovecot-fts-flatcurve

Dovecot FTS Flatcurve plugin (Xapian)
https://slusarz.github.io/dovecot-fts-flatcurve/
GNU Lesser General Public License v2.1
40 stars 8 forks source link

Native optimize failed #64

Closed allexmail closed 3 months ago

allexmail commented 3 months ago

Hi! Updated the version to 1.0.3, decided to rebuild the indexes with the command:

doveadm -D force-resync -u '*' '*'

In the process, there are records of the form:

Native optimize failed, fallback to manual optimization; Invalid Operation Error: when merging databases, --no-number is only currently supported if the databases have disjoint ranges of used document ids: /var/mail/mydomain.com/korolev@mydomain.com/.Archives.2019.INBOX/fts-flatcurve/index.6426 has range 1-5672, /var/mail/mydomain.com/korolev@mydomain.com/.Archives.2019.INBOX/fts-flatcurve/index.1003 has range 1-5672

Do I need to take any action to set up flatcurve? Or will flatcurve deal with this error itself?

slusarz commented 3 months ago

That's a debug message, so you wouldn't even see it if you ran doveadm normally (there's no reason to run doveadm -D unless you are a developer or something is broken).

I'm not sure how your indexes ended up in that situation (multiple indexes with the same data), and I can't reproduce, but the code is doing exactly what it has to do in this situation as xapian can't optimize these indexes automatically.

Finally, fwiw, force-resync is not the correct command to re-index. You should use "doveadm index" instead. force-resync is intended for the limited use-case of fixing broken mailboxes, not to trigger a re-index.

allexmail commented 3 months ago

I understood. Thank you for giving a detailed answer.