diff options
author | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-02 03:39:09 +0000 |
---|---|---|
committer | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-02 09:07:54 +0000 |
commit | faf36e5b451bd5dba0b1ae867f606ba0cb397af3 (patch) | |
tree | 67bea99b1ba855b13330a2156f894979052f99c0 /lib/PublicInbox/SearchIdx.pm | |
parent | c062644c64bf44b48bd6469e1d4e77d8b9cfdc87 (diff) | |
download | public-inbox-faf36e5b451bd5dba0b1ae867f606ba0cb397af3.tar.gz |
This is a bit expensive in a multi-process situation because we need to make our indices and packs visible to the read-only pieces.
Diffstat (limited to 'lib/PublicInbox/SearchIdx.pm')
-rw-r--r-- | lib/PublicInbox/SearchIdx.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index ec3a6f3e..ed52e386 100644 --- a/lib/PublicInbox/SearchIdx.pm +++ b/lib/PublicInbox/SearchIdx.pm @@ -284,7 +284,11 @@ sub add_message { my $db = $self->{xdb}; my ($doc_id, $old_tid); - my $mid = mid_clean(mid_mime($mime)); + my @mids = mid_mime($mime); + if (@mids > 1) { + warn "Multi-MID: ( ",join(' | ', @mids)," )\n"; + } + my $mid = mid_clean($mids[0]); my $skel = $self->{skeleton}; eval { @@ -512,13 +516,12 @@ sub unindex_blob { } sub index_mm { - my ($self, $mime, $warn_existing) = @_; + my ($self, $mime) = @_; my $mid = mid_clean(mid_mime($mime)); my $mm = $self->{mm}; my $num = $mm->mid_insert($mid); return $num if defined $num; - warn "<$mid> reused\n" if $warn_existing; # fallback to num_for since filters like RubyLang set the number $mm->num_for($mid); } |