]> Sergey Matveev's repositories - public-inbox.git/commit - lib/PublicInbox/Git.pm
inbox: keep DB handles if git processes are live
authorEric Wong <e@80x24.org>
Fri, 1 Oct 2021 09:54:43 +0000 (09:54 +0000)
committerEric Wong <e@80x24.org>
Fri, 1 Oct 2021 12:06:33 +0000 (12:06 +0000)
commit770604494e1054ada8d9e3960e4a6c7e82a09ad5
tree687ad2cd4f7ec416c411edfed61e8f466e2bf9df
parent0fa6324e2f45a93dbfca57989ca115b13048133f
inbox: keep DB handles if git processes are live

Having git processes outlive DB handles is likely to hurt
from a fragmentation perspective if the DB handle needs to
be recreated immediately due to a git->cat_async callback.
So only unref DB handles when we're sure there's no live
git users left, otherwise check the inodes.

We'll also avoid needless localization checks in git->cleanup
and make the return value more obvious since the pid fields are
unconditionally deleted nowadays.
lib/PublicInbox/Git.pm
lib/PublicInbox/Inbox.pm