about summary refs log tree commit homepage
path: root/t/init.t
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-08-22 06:06:27 +0000
committerEric Wong <e@yhbt.net>2020-08-23 00:19:53 +0000
commita367ec1b15a2458e532245f5308565dd84f8ca63 (patch)
tree97f5c7fc52301282ff9a5f1c9913f3827edd3b49 /t/init.t
parentaad1b9e70529b78d3d7d62b0920ad82ca40f9592 (diff)
downloadpublic-inbox-a367ec1b15a2458e532245f5308565dd84f8ca63.tar.gz
mbox: disable "&t" on existing Xapian until full reindex
Expanding threads via over.sqlite3 for mbox.gz downloads without
Xapian effectively collapsing on the THREADID column leads to
repeated messages getting downloaded.

To avoid that situation, use a "has_threadid" Xapian metadata
flag that's only set on --reindex (and brand new Xapian DBs).

This allows admins to upgrade WWW or do --reindex in any order;
without worrying about users eating up bandwidth and CPU cycles.
Diffstat (limited to 't/init.t')
-rw-r--r--t/init.t1
1 files changed, 1 insertions, 0 deletions
diff --git a/t/init.t b/t/init.t
index dad09435..a5a9debc 100644
--- a/t/init.t
+++ b/t/init.t
@@ -108,6 +108,7 @@ SKIP: {
                 is(PublicInbox::Admin::detect_indexlevel($ibx), 'full',
                         "detected default indexlevel -V$v");
                 ok($ibx->{-skip_docdata}, "docdata skip set -V$v");
+                ok($ibx->search->has_threadid, 'has_threadid flag set on new inbox');
         }
 
         # loop for idempotency