From ea11b7b17d525d20a07d7f62c0334501c5a721b4 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 15 Oct 2021 09:52:53 +0000 Subject: lei q: avoid kw lookup failure on remote mboxrd When importing several sources in parallel via http(s) mboxrd, we need to be able to get keywords of uncommitted documents directly from shard workers. Otherwise, Xapian DocNotFound errors happen because the read-only LeiSearch won't see documents from uncomitted transactions. Keep in mind that it's possible the keywords can be changed on-the-fly even for uncommitted documents because of inotify watches from LeiNoteEvent. --- t/lei_store.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 't') diff --git a/t/lei_store.t b/t/lei_store.t index c31e27a2..40ad7800 100644 --- a/t/lei_store.t +++ b/t/lei_store.t @@ -138,7 +138,8 @@ Subject: timezone-dependent test WHAT IS TIME ANYMORE? EOM - ok($sto->add_eml($eml), 'recently received message'); + my $smsg = $sto->add_eml($eml); + ok($smsg && $smsg->{blob}, 'recently received message'); $sto->done; local $ENV{TZ} = 'GMT+5'; my $lse = $sto->search; -- cgit v1.2.3-24-ge0c7