diff options
author | Eric Wong <e@80x24.org> | 2021-07-25 00:11:03 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-07-25 00:19:22 +0000 |
commit | bbb4e900af92c66a37ccf619fb73a8f97a99f3f5 (patch) | |
tree | d4b6793127e117a2202a035d99a9cdc27b6eb6d9 /lib/PublicInbox/ExtSearchIdx.pm | |
parent | 6896585267c269cb344b01af102f6f73602548ad (diff) | |
download | public-inbox-bbb4e900af92c66a37ccf619fb73a8f97a99f3f5.tar.gz |
The over.msgid table may contain ghost Message-IDs and also Message-IDs of deleted spam messages, so over->max isn't a good aproproximation of dedupe progress.
Diffstat (limited to 'lib/PublicInbox/ExtSearchIdx.pm')
-rw-r--r-- | lib/PublicInbox/ExtSearchIdx.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm index 1c2a9758..51dbf54f 100644 --- a/lib/PublicInbox/ExtSearchIdx.pm +++ b/lib/PublicInbox/ExtSearchIdx.pm @@ -896,7 +896,10 @@ sub eidx_dedupe ($$$) { my ($iter, $cur_mid); my $min_id = 0; my $idx = 0; - local $sync->{-regen_fmt} = "dedupe %u/".$self->{oidx}->max."\n"; + my ($max_id) = $self->{oidx}->dbh->selectrow_array(<<EOS); +SELECT MAX(id) FROM msgid +EOS + local $sync->{-regen_fmt} = "dedupe %u/$max_id\n"; # note: we could write this query more intelligently, # but that causes lock contention with read-only processes |