about summary refs log tree commit homepage
path: root/lib/PublicInbox/ExtSearchIdx.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-12-26 10:16:23 +0000
committerEric Wong <e@80x24.org>2020-12-27 09:30:33 +0000
commit02aad3e340d1711359c4def6e91482140a989ce1 (patch)
tree31e2cc327ce5fcde466ef524bdd7b7faeea0b6f8 /lib/PublicInbox/ExtSearchIdx.pm
parent41464d205ade16a5a847061fa2eb706a33b52a88 (diff)
downloadpublic-inbox-02aad3e340d1711359c4def6e91482140a989ce1.tar.gz
This makes diagnosing --watch problems easier when there's
50K inboxes by avoiding the lengthy scan (which is the reason
--watch exists in the first place).
Diffstat (limited to 'lib/PublicInbox/ExtSearchIdx.pm')
-rw-r--r--lib/PublicInbox/ExtSearchIdx.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm
index 778154a5..07e64698 100644
--- a/lib/PublicInbox/ExtSearchIdx.pm
+++ b/lib/PublicInbox/ExtSearchIdx.pm
@@ -881,9 +881,11 @@ sub eidx_sync { # main entry point
         }
 
         # don't use $_ here, it'll get clobbered by reindex_checkpoint
-        for my $ibx (@{$self->{ibx_list}}) {
-                last if $sync->{quit};
-                sync_inbox($self, $sync, $ibx);
+        if ($opt->{scan} // 1) {
+                for my $ibx (@{$self->{ibx_list}}) {
+                        last if $sync->{quit};
+                        sync_inbox($self, $sync, $ibx);
+                }
         }
         $self->{oidx}->rethread_done($opt) unless $sync->{quit};
         eidxq_process($self, $sync) unless $sync->{quit};