]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiStore.pm
lei/store: use remove_doc to save some LoC
[public-inbox.git] / lib / PublicInbox / LeiStore.pm
index 52a1456fb41544e4bee7ad21c1a0f662bc59d13c..bf41dcf530942a9bc57ef8530a8629bc94906753 100644 (file)
@@ -281,8 +281,7 @@ sub remove_docids ($;@) {
        my ($self, @docids) = @_;
        my $eidx = eidx_init($self);
        for my $docid (@docids) {
-               $eidx->idx_shard($docid)->ipc_do('xdb_remove', $docid);
-               $eidx->{oidx}->delete_by_num($docid);
+               $eidx->remove_doc($docid);
                $eidx->{oidx}->{dbh}->do(<<EOF, undef, $docid);
 DELETE FROM xref3 WHERE docid = ?
 EOF
@@ -512,7 +511,7 @@ sub xchg_stderr {
        return unless -e $dir;
        my $old = delete $self->{-tmp_err};
        my $pfx = POSIX::strftime('%Y%m%d%H%M%S', gmtime(time));
-       my $err = File::Temp->new(TEMPLATE => "$pfx.$$.lei_storeXXXX",
+       my $err = File::Temp->new(TEMPLATE => "$pfx.$$.err-XXXX",
                                SUFFIX => '.err', DIR => $dir);
        open STDERR, '>>', $err->filename or die "dup2: $!";
        STDERR->autoflush(1); # shared with shard subprocesses