From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 7C6491FF76; Thu, 22 Dec 2016 07:59:00 +0000 (UTC) Date: Thu, 22 Dec 2016 07:59:00 +0000 From: Eric Wong To: meta@public-inbox.org Subject: Re: [PATCH] search: lookup_mail handles modified DBs Message-ID: <20161222075900.GA12682@dcvr.yhbt.net> References: <20161222075549.12039-1-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20161222075549.12039-1-e@80x24.org> List-Id: Eric Wong wrote: > sub lookup_mail { # no ghosts! > my ($self, $mid) = @_; > - my $smsg = lookup_message($self, $mid) or return; > - PublicInbox::SearchMsg->load_doc($smsg->{doc}); > + retry_reopen(sub { Erm... --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -295,7 +295,7 @@ sub lookup_message { sub lookup_mail { # no ghosts! my ($self, $mid) = @_; - retry_reopen(sub { + retry_reopen($self, sub { my $smsg = lookup_message($self, $mid) or return; PublicInbox::SearchMsg->load_doc($smsg->{doc}); });