about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchIdx.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-12-16 23:19:03 +0000
committerEric Wong <e@80x24.org>2020-12-17 19:41:13 +0000
commit519f80bb052a446ffa604a0862a631d846f64468 (patch)
treec6c6e7188969d4377779f03209c03bc03281d4d1 /lib/PublicInbox/SearchIdx.pm
parentaad948558339aa28786973d112761c66b7452e26 (diff)
downloadpublic-inbox-519f80bb052a446ffa604a0862a631d846f64468.tar.gz
-index runs on data that's already frozen in git, so there's
no point in warning users about it.

While we're at it, set the {current_info} prefix for v1 as
we do in v2 inboxes in case new problems show up.
Diffstat (limited to 'lib/PublicInbox/SearchIdx.pm')
-rw-r--r--lib/PublicInbox/SearchIdx.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm
index c6d2a0e8..b731f698 100644
--- a/lib/PublicInbox/SearchIdx.pm
+++ b/lib/PublicInbox/SearchIdx.pm
@@ -617,6 +617,7 @@ sub index_both { # git->cat_async callback
         $size += crlf_adjust($$bref);
         my $smsg = bless { bytes => $size, blob => $oid }, 'PublicInbox::Smsg';
         my $self = $sync->{sidx};
+        local $self->{current_info} = "$self->{current_info}: $oid";
         my $eml = PublicInbox::Eml->new($bref);
         $smsg->{num} = index_mm($self, $eml, $oid, $sync) or
                 die "E: could not generate NNTP article number for $oid";
@@ -628,7 +629,9 @@ sub index_both { # git->cat_async callback
 sub unindex_both { # git->cat_async callback
         my ($bref, $oid, $type, $size, $sync) = @_;
         return if is_bad_blob($oid, $type, $size, $sync->{oid});
-        unindex_eml($sync->{sidx}, $oid, PublicInbox::Eml->new($bref));
+        my $self = $sync->{sidx};
+        local $self->{current_info} = "$self->{current_info}: $oid";
+        unindex_eml($self, $oid, PublicInbox::Eml->new($bref));
         # may be undef if leftover
         if (defined(my $cur_cmt = $sync->{cur_cmt})) {
                 ${$sync->{latest_cmt}} = $cur_cmt;
@@ -872,6 +875,7 @@ sub _index_sync {
         my ($self, $opt) = @_;
         my $tip = $opt->{ref} || 'HEAD';
         my $ibx = $self->{ibx};
+        local $self->{current_info} = "$ibx->{inboxdir}";
         $self->{batch_bytes} = $opt->{batch_size} // $BATCH_BYTES;
         $ibx->git->batch_prepare;
         my $pr = $opt->{-progress};