diff options
author | Eric Wong <e@80x24.org> | 2021-07-25 00:43:29 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-07-25 06:14:04 +0000 |
commit | 6449835281b15046c71e5cdad7e1a5c422de2fad (patch) | |
tree | a09b08c98d8e69e1ce45024016cefa06eb04447b /lib/PublicInbox/ExtSearchIdx.pm | |
parent | bbb4e900af92c66a37ccf619fb73a8f97a99f3f5 (diff) | |
download | public-inbox-6449835281b15046c71e5cdad7e1a5c422de2fad.tar.gz |
We'll use 20-byte SHA-1 comparisons instead of 40-byte hex representations for a minor reduction in memory traffic.
Diffstat (limited to 'lib/PublicInbox/ExtSearchIdx.pm')
-rw-r--r-- | lib/PublicInbox/ExtSearchIdx.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm index 51dbf54f..fb1f511e 100644 --- a/lib/PublicInbox/ExtSearchIdx.pm +++ b/lib/PublicInbox/ExtSearchIdx.pm @@ -784,16 +784,16 @@ ORDER BY docid,xnum ASC LIMIT 10000 $fetching = $min = $docid; my $smsg = $ibx->over->get_art($xnum); - my $oidhex = unpack('H*', $oidbin); my $err; if (!$smsg) { $err = 'stale'; - } elsif ($smsg->{blob} ne $oidhex) { + } elsif (pack('H*', $smsg->{blob}) ne $oidbin) { $err = "mismatch (!= $smsg->{blob})"; } else { next; # likely, all good } # current_info already has eidx_key + my $oidhex = unpack('H*', $oidbin); warn "$xnum:$oidhex (#$docid): $err\n"; my $del = $self->{oidx}->dbh->prepare_cached(<<''); DELETE FROM xref3 WHERE ibx_id = ? AND xnum = ? AND oidbin = ? |