diff options
author | Eric Wong <e@yhbt.net> | 2020-08-20 20:24:43 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-08-20 21:11:13 +0000 |
commit | 4d8a07616ebe29771c9775173e9d01a91ec677ae (patch) | |
tree | bdcb09572eda8eaf16c7d5f537798b5e7112ea75 /lib/PublicInbox/SearchView.pm | |
parent | 11f44fc4381899f703f0bac15a8c40dfd652873c (diff) | |
download | public-inbox-4d8a07616ebe29771c9775173e9d01a91ec677ae.tar.gz |
While this is unlikely to be a problem in current practice, keeping Xapian DBs open for long responses can interfere with free space recovery after -compact. In the future, it will interfere with inbox search grouping and lead to unexpected results.
Diffstat (limited to 'lib/PublicInbox/SearchView.pm')
-rw-r--r-- | lib/PublicInbox/SearchView.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index 84c04c6c..5d77469e 100644 --- a/lib/PublicInbox/SearchView.pm +++ b/lib/PublicInbox/SearchView.pm @@ -321,7 +321,6 @@ sub adump { my ($cb, $mset, $q, $ctx) = @_; $ctx->{items} = [ $mset->items ]; $ctx->{search_query} = $q; # used by WwwAtomStream::atom_header - $ctx->{srch} = $ctx->{-inbox}->search; PublicInbox::WwwAtomStream->response($ctx, 200, \&adump_i); } @@ -329,8 +328,9 @@ sub adump { sub adump_i { my ($ctx) = @_; while (my $mi = shift @{$ctx->{items}}) { + my $srch = $ctx->{-inbox}->search(undef, $ctx) or return; my $smsg = eval { - PublicInbox::Smsg::from_mitem($mi, $ctx->{srch}); + PublicInbox::Smsg::from_mitem($mi, $srch); } or next; return $smsg; } |