xap_helper: unconditionally reopen DBs on reuse
commitcf3df165033bf36631bd890fa2375339cd95c593
authorEric Wong <e@80x24.org>
Tue, 7 May 2024 19:14:27 +0000 (7 19:14 +0000)
committerEric Wong <e@80x24.org>
Wed, 8 May 2024 06:00:01 +0000 (8 06:00 +0000)
tree03ea43332c4b2ad8b1e0d22b7332269098cfb921
parentb99860c560a6a4a79c73015612c855d978c3e00e
xap_helper: unconditionally reopen DBs on reuse

Reopening Xapian DBs is a fairly cheap operation and Xapian
avoids doing work when nothing's changed, so just do it
to ensure we always get the latest updates in search results.

The old synchronous search interface worked around this by
having a timer based expiration in hopes of mitigating
fragmentation problems, but perhaps that's not worth doing
anymore now that memory fragmentation from Perl itself is
better understood.
lib/PublicInbox/XapHelper.pm
lib/PublicInbox/xap_helper.h