]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchIdx.pm
ds: flatten + reuse @events, epoll_wait style fixes
[public-inbox.git] / lib / PublicInbox / SearchIdx.pm
index d1b0c724461271724f673d67e4bfa830a8034b08..b3361e05c779ffb61f5d0b7ea3a8d15b24e55874 100644 (file)
@@ -67,7 +67,6 @@ sub new {
                $self->{-set_skip_docdata_once} = 1;
                $self->{-skip_docdata} = 1;
        }
-       $ibx->umask_prepare;
        if ($version == 1) {
                $self->{lock_path} = "$inboxdir/ssoma.lock";
                my $dir = $self->xdir;
@@ -616,6 +615,7 @@ sub index_both { # git->cat_async callback
        $smsg->{num} = index_mm($self, $eml, $oid, $sync) or
                die "E: could not generate NNTP article number for $oid";
        add_message($self, $eml, $smsg, $sync);
+       ++$self->{nidx};
        my $cur_cmt = $sync->{cur_cmt} // die 'BUG: {cur_cmt} missing';
        ${$sync->{latest_cmt}} = $cur_cmt;
 }
@@ -630,6 +630,7 @@ sub unindex_both { # git->cat_async callback
        if (defined(my $cur_cmt = $sync->{cur_cmt})) {
                ${$sync->{latest_cmt}} = $cur_cmt;
        }
+       ++$self->{nidx};
 }
 
 sub with_umask {