diff options
author | Eric Wong <e@yhbt.net> | 2020-07-17 06:31:55 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-07-17 20:56:54 +0000 |
commit | 592f8239dceb6604e538fd51e62bcce50d6e1972 (patch) | |
tree | b68db6cce6f2567ac6998b19f7c85e876d605e9c /lib/PublicInbox/SearchIdxShard.pm | |
parent | c06e7fc8afea8441ed3d29d63cb8933704b15e7d (diff) | |
download | public-inbox-592f8239dceb6604e538fd51e62bcce50d6e1972.tar.gz |
Since over.sqlite3 seems here to stay, we no longer need to do Message-ID lookups against Xapian and can simply rely on the docid <=> NNTP article number equivalancy SCHEMA_VERSION=15 gave us. This rids us of the closure-using batch_do sub in the v1 code path and vastly simplifies both v1 and v2 unindexing.
Diffstat (limited to 'lib/PublicInbox/SearchIdxShard.pm')
-rw-r--r-- | lib/PublicInbox/SearchIdxShard.pm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/PublicInbox/SearchIdxShard.pm b/lib/PublicInbox/SearchIdxShard.pm index b51d148b..54426881 100644 --- a/lib/PublicInbox/SearchIdxShard.pm +++ b/lib/PublicInbox/SearchIdxShard.pm @@ -62,10 +62,8 @@ sub shard_worker_loop ($$$$$) { # no need to lock < 512 bytes is atomic under POSIX print $bnote "barrier $shard\n" or die "write failed for barrier $!\n"; - } elsif ($line =~ /\AD ([a-f0-9]{40,}) (.+)\n\z/s) { - my ($oid, $mid) = ($1, $2); - $self->begin_txn_lazy; - $self->remove_by_oid($oid, $mid); + } elsif ($line =~ /\AD ([a-f0-9]{40,}) ([0-9]+)\n\z/s) { + $self->remove_by_oid($1, $2 + 0); } else { chomp $line; # n.b. $mid may contain spaces(!) |