]> Sergey Matveev's repositories - public-inbox.git/commit
miscidx: switch to lazy transactions
authorEric Wong <e@80x24.org>
Mon, 25 Jan 2021 06:41:56 +0000 (22:41 -0800)
committerEric Wong <e@80x24.org>
Tue, 26 Jan 2021 18:51:31 +0000 (18:51 +0000)
commitaf3dfdc0416c7d9d5ad785826639744cc2cd9b9a
treed82cc9434fbc6c53f5f6085c9f916cc3bcce85bb
parent6c04afbcb4a090e739066d5ff1735775646c9a44
miscidx: switch to lazy transactions

This fixes a sporadic failure on a 1/2 core VM where
"git cat-file --batch" hasn't started up by the time
$cleanup->() destroys the ALL.git directory in t/lei.t
(but not t/lei-oneshot.t).

This happens because dwaitpid() runs inside the event loop
asynchronously and we were able to return to the client before
the cat-file process could even start.

I could not reproduce this failure on my usual 4-core
workstation via "schedtool -a 0x1" to force the entire
test to use a single core.

Lazy transactions matches OverIdx and SearchIdx behavior, and
I've verified this lets us avoid problems with old Xapian
versions (on CentOS 7.x) which failed to set FD_CLOEXEC.
lib/PublicInbox/ExtSearchIdx.pm
lib/PublicInbox/MiscIdx.pm
lib/PublicInbox/V2Writable.pm
t/miscsearch.t