From: Eric Wong Date: Thu, 7 Oct 2021 08:29:32 +0000 (+0000) Subject: overidx: each_by_mid: account for messages being deleted X-Git-Tag: v1.7.0~212 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=e46b24f437639e3c2cc19df4a2c875b56fe6fea7;hp=3472c60fc72dfb5d1152c4015f54be1644443a20;p=public-inbox.git overidx: each_by_mid: account for messages being deleted This may fix some extindex problems and should get rid of the "Can't bless non-reference value" errors. --- diff --git a/lib/PublicInbox/OverIdx.pm b/lib/PublicInbox/OverIdx.pm index 0c8a4d9e..985abbf4 100644 --- a/lib/PublicInbox/OverIdx.pm +++ b/lib/PublicInbox/OverIdx.pm @@ -158,7 +158,8 @@ SELECT $cols FROM over WHERE over.num = ? LIMIT 1 foreach (@$nums) { $sth->execute($_->[0]); - my $smsg = $sth->fetchrow_hashref; + # $cb may delete rows and invalidate nums + my $smsg = $sth->fetchrow_hashref // next; $smsg = PublicInbox::Over::load_from_row($smsg); $cb->($self, $smsg, @arg) or return; }