]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
fts-solr: fts_backend_solr_update_deinit() Avoid double commit
authorMarco Bettini <marco.bettini@open-xchange.com>
Fri, 14 Apr 2023 13:04:07 +0000 (13:04 +0000)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Mon, 17 Apr 2023 21:36:03 +0000 (21:36 +0000)
Soft-commit is already handled in fts_backend_solr_update_set_mailbox(),
except for the expunges.

src/plugins/fts-solr/fts-backend-solr.c

index b3580a6ebb350824124d2e9ecb3531aa781ad748..ce147c80f122ef984533e1378cacb31a0b96f247 100644 (file)
@@ -408,11 +408,8 @@ fts_backend_solr_update_deinit(struct fts_backend_update_context *_ctx)
        if (fts_backed_solr_build_flush(ctx) < 0)
                ret = -1;
 
-       if (ctx->documents_added || ctx->expunges) {
-               /* commit and wait until the documents we just indexed are
-                  visible to the following search */
-               if (ctx->expunges)
-                       fts_backend_solr_expunge_flush(ctx);
+       if (ctx->expunges) {
+               fts_backend_solr_expunge_flush(ctx);
                if (fts_backend_solr_commit(ctx) < 0)
                        ret = -1;
        }