From 4bbafbc4bc8869e3f0fb35fdde727b2334fd6b46 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 12 Oct 2021 11:46:59 +0000 Subject: search: delete QueryParser along with DB handle Xapian::QueryParser is attached to the Xapian::Database, so holding onto the QueryParser was preventing us from releasing DB handles if a query was performed. --- lib/PublicInbox/Search.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/Search.pm') diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index 17e202e1..dd6d3710 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -253,7 +253,7 @@ sub cleanup_shards { my $nr = grep(/\A[0-9]+\z/, readdir($dh)) or return warn("$xpfx has no shards\n"); # true return reopen($self) if $nr == ($self->{nshard} // -1); - delete($self->{xdb}); + delete @$self{qw(xdb qp)}; undef; } -- cgit v1.2.3-24-ge0c7