]> Sergey Matveev's repositories - public-inbox.git/commit
extsearchidx: close DB handles after use if FD constrained
authorEric Wong <e@80x24.org>
Fri, 25 Dec 2020 10:21:11 +0000 (10:21 +0000)
committerEric Wong <e@80x24.org>
Sat, 26 Dec 2020 06:22:56 +0000 (06:22 +0000)
commit14e606423429d6121c295c2bc0599fe1bf66b07c
tree5c33b2899a4f65f4170d6f8585ac6ee828e101a0
parent672d146577305baa7f508bd2e33212bba6fdb800
extsearchidx: close DB handles after use if FD constrained

Most distros ship with low RLIMIT_NOFILE limits and surprises
may lurk for admins who configure many inboxes.  Keep FD usage
under control to avoid EMFILE errors at inopportune times during
reindex.

From what I can tell, this is the only place where extindex can
have unpredictable FD growth when there's thousands of inboxes,
and it's in an extremely rare code path.
lib/PublicInbox/ExtSearchIdx.pm