From a3481323fcce58b84d6209d928e7091cd8e69db5 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 22 Dec 2016 08:00:26 +0000 Subject: search: lookup_mail handles modified DBs We call lookup_mail all over the place, be sure we can handle database modifications in those cases. --- lib/PublicInbox/Search.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index d4f6f77a..b59430d8 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -289,8 +289,10 @@ sub lookup_message { sub lookup_mail { # no ghosts! my ($self, $mid) = @_; - my $smsg = lookup_message($self, $mid) or return; - PublicInbox::SearchMsg->load_doc($smsg->{doc}); + retry_reopen($self, sub { + my $smsg = lookup_message($self, $mid) or return; + PublicInbox::SearchMsg->load_doc($smsg->{doc}); + }); } sub find_unique_doc_id { -- cgit v1.2.3-24-ge0c7