]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/ExtSearchIdx.pm
extindex: set {current_info} in eidxq processing
[public-inbox.git] / lib / PublicInbox / ExtSearchIdx.pm
index 40489eab4c6668e8b1ca3fc39e6999d741b292a0..750ced5c0f453bc8e0241a1ea2e6603a64c00104 100644 (file)
@@ -595,11 +595,11 @@ sub _reindex_oid { # git->cat_async callback
                my $oidbin = pack('H*', $expect_oid);
                my $remain = _unref_doc($sync, $docid, undef, undef, $oidbin);
                if ($remain == 0) {
-                       warn "W: #$docid gone or corrupted\n";
+                       warn "W: #$docid ($oid) gone or corrupt\n";
                } elsif (my $next_oid = $req->{xr3r}->[++$req->{ix}]->[2]) {
                        $self->git->cat_async($next_oid, \&_reindex_oid, $req);
                } else {
-                       warn "BUG: #$docid gone (UNEXPECTED)\n";
+                       warn "BUG: #$docid ($oid) gone (UNEXPECTED)\n";
                }
                return;
        }
@@ -754,9 +754,8 @@ sub prep_id2pos ($) {
 
 sub eidxq_process ($$) { # for reindexing
        my ($self, $sync) = @_;
-       return unless $self->{cfg};
-
-       return unless eidxq_lock_acquire($self);
+       local $self->{current_info} = 'eidxq process';
+       return unless ($self->{cfg} && eidxq_lock_acquire($self));
        my $dbh = $self->{oidx}->dbh;
        my $tot = $dbh->selectrow_array('SELECT COUNT(*) FROM eidxq') or return;
        ${$sync->{nr}} = 0;