From ad281240644ee370c75d95b35ad7833863257286 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Mon, 19 Mar 2018 08:14:34 +0000 Subject: v2writable: support "barrier" operation to avoid reforking Stopping and starting a bunch of processes to look up duplicates or removals is inefficient. Take advantage of checkpointing in "git fast-import" and transactions in Xapian and SQLite. --- t/v2writable.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 't/v2writable.t') diff --git a/t/v2writable.t b/t/v2writable.t index 404c8651..7d276da7 100644 --- a/t/v2writable.t +++ b/t/v2writable.t @@ -55,7 +55,7 @@ if ('ensure git configs are correct') { { my @warn; local $SIG{__WARN__} = sub { push @warn, @_ }; - is(undef, $im->add($mime), 'obvious duplicate rejected'); + is($im->add($mime), undef, 'obvious duplicate rejected'); like(join(' ', @warn), qr/resent/, 'warned about resent message'); @warn = (); @@ -105,6 +105,7 @@ if ('ensure git configs are correct') { ok($im->add($mime), 'message with multiple Message-ID'); $im->done; my @found; + $ibx->search->reopen; $ibx->search->each_smsg_by_mid('abcde@1', sub { push @found, @_; 1 }); is(scalar(@found), 1, 'message found by first MID'); $ibx->search->each_smsg_by_mid('abcde@2', sub { push @found, @_; 1 }); -- cgit v1.2.3-24-ge0c7