]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Search.pm
v2/ui: retry DB reopens in a few more places
[public-inbox.git] / lib / PublicInbox / Search.pm
index b20b2ccd3e39f3b0ede3425c1b46c55f03654674..1df87d0ef6ce89bbb1e72223e107e87b6e53b043 100644 (file)
@@ -185,7 +185,7 @@ sub query {
 
 sub get_thread {
        my ($self, $mid, $opts) = @_;
-       my $smsg = eval { $self->lookup_skeleton($mid) };
+       my $smsg = retry_reopen($self, sub { lookup_skeleton($self, $mid) });
 
        return { total => 0, msgs => [] } unless $smsg;
        my $qtid = Search::Xapian::Query->new('G' . $smsg->thread_id);
@@ -216,6 +216,7 @@ sub retry_reopen {
                if (ref($@) eq 'Search::Xapian::DatabaseModifiedError') {
                        reopen($self);
                } else {
+                       warn "ref: ", ref($@), "\n";
                        die;
                }
        }