about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-08-19 09:07:42 +0000
committerEric Wong <e@80x24.org>2022-08-19 18:46:45 +0000
commitede63a345dfa0254e319650baafc7d341ef7a925 (patch)
tree7a7a6dcb63bdb8d1c2da1fbbfb83ca31ed2f895a
parent9daf0816e6b2ea7ddcf82e074dad310c888e8c73 (diff)
downloadpublic-inbox-ede63a345dfa0254e319650baafc7d341ef7a925.tar.gz
We need to call eidx_init in each git->cat_async callback
since another requestor may've stopped the shard processes.
-rw-r--r--lib/PublicInbox/LeiStore.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm
index 277ed6bd..8e710540 100644
--- a/lib/PublicInbox/LeiStore.pm
+++ b/lib/PublicInbox/LeiStore.pm
@@ -337,7 +337,8 @@ sub _docids_and_maybe_kw ($$) {
 
 sub _reindex_1 { # git->cat_async callback
         my ($bref, $hex, $type, $size, $smsg) = @_;
-        my ($self, $eidx, $tl) = delete @$smsg{qw(-self -eidx -tl)};
+        my $self = delete $smsg->{-sto};
+        my ($eidx, $tl) = eidx_init($self);
         $bref //= _lms_rw($self)->local_blob($hex, 1);
         if ($bref) {
                 my $eml = PublicInbox::Eml->new($bref);
@@ -353,7 +354,7 @@ sub reindex_art {
         my ($eidx, $tl) = eidx_init($self);
         my $smsg = $eidx->{oidx}->get_art($art) // return;
         return if $smsg->{bytes} == 0; # external-only message
-        @$smsg{qw(-self -eidx -tl)} = ($self, $eidx, $tl);
+        $smsg->{-sto} = $self;
         $eidx->git->cat_async($smsg->{blob} // die("no blob (#$art)"),
                                 \&_reindex_1, $smsg);
 }