"Eric W. Biederman" <[email protected]> wrote:
> 
> This is my respin of these patches.  I have used the levels:
> full, medium, basic.
> 
> I think basic conveys the message that it is ok to run with and you can
> expect most things to work, better than minimal where it feels like
> you don't know what will fail.

Agreed.

> I have tweaked the reindex tests to run with all 3 different levels
> so at least these code paths get exercised.

Thanks, all four pushed to 'master' on https://public-inbox.org/
along with my flush threshold env check.

I think being able to transition from an existing "basic" to
(full|medium) can be straightforward, too, with the untested
patch below.

But most other transitions between levels will require an expensive
--reindex.   (full|medium) => basic would be easy, too, but
it'll be up to the user to remove the Xapian files.


diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm
index bb60506..620f24d 100644
--- a/lib/PublicInbox/SearchIdx.pm
+++ b/lib/PublicInbox/SearchIdx.pm
@@ -714,7 +714,7 @@ sub _index_sync {
                        }
                        $dbh->commit;
                }
-               if ($mkey && $newest) {
+               if ($mkey && $newest && $self->{indexlevel} ne 'basic') {
                        my $cur = $xdb->get_metadata($mkey);
                        if (need_update($self, $cur, $newest)) {
                                $xdb->set_metadata($mkey, $newest);
--
unsubscribe: [email protected]
archive: https://public-inbox.org/meta/

Reply via email to