* [PATCH 2/4] lei: do not blindly commit to lei/store on close
2021-03-26 9:51 4% [PATCH 0/4] lei minor things Eric Wong
@ 2021-03-26 9:51 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-03-26 9:51 UTC (permalink / raw)
To: meta
It may hide errors/bugs, instead do it explicitly for each
worker that writes to it. For lei_xsearch, it will be better
to close before spawning the MUA for future use since we may
need it again once the user starts changing keywords.
---
lib/PublicInbox/LEI.pm | 3 ---
lib/PublicInbox/LeiXSearch.pm | 1 +
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index 6a5c32b3..59715633 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -1030,9 +1030,6 @@ sub dclose {
}
}
close(delete $self->{1}) if $self->{1}; # may reap_compress
- if (my $sto = delete $self->{sto}) {
- $sto->ipc_do('done');
- }
$self->close if $self->{-event_init_done}; # PublicInbox::DS::close
}
diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm
index 6410e0ea..b41daffe 100644
--- a/lib/PublicInbox/LeiXSearch.pm
+++ b/lib/PublicInbox/LeiXSearch.pm
@@ -319,6 +319,7 @@ sub query_done { # EOF callback for main daemon
if (my $lxs = delete $lei->{lxs}) {
$lxs->wq_wait_old(\&xsearch_done_wait, $lei);
}
+ my $wait = $lei->{sto} ? $lei->{sto}->ipc_do('done') : undef;
$lei->{ovv}->ovv_end($lei);
if ($l2m) { # close() calls LeiToMail reap_compress
if (my $out = delete $lei->{old_1}) {
^ permalink raw reply related [relevance 7%]
* [PATCH 0/4] lei minor things
@ 2021-03-26 9:51 4% Eric Wong
2021-03-26 9:51 7% ` [PATCH 2/4] lei: do not blindly commit to lei/store on close Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-03-26 9:51 UTC (permalink / raw)
To: meta
Been putting off 3/4 off for a bit, still thinking about
labels a bit...
Eric Wong (4):
lei q: skip lei/store->write_prepare for JSON outputs
lei: do not blindly commit to lei/store on close
lei: support /dev/fd/[0-2] inputs and outputs in daemon
lei mark: disallow '!' in labels
lib/PublicInbox/LEI.pm | 26 ++++++++++----------------
lib/PublicInbox/LeiConvert.pm | 3 ++-
lib/PublicInbox/LeiInput.pm | 5 ++++-
lib/PublicInbox/LeiMark.pm | 2 +-
lib/PublicInbox/LeiOverview.pm | 17 +++++++++--------
lib/PublicInbox/LeiP2q.pm | 7 +++++--
lib/PublicInbox/LeiQuery.pm | 16 ++++++++--------
lib/PublicInbox/LeiToMail.pm | 28 ++++++++++++++++------------
lib/PublicInbox/LeiXSearch.pm | 2 ++
t/lei-convert.t | 2 +-
t/lei-import.t | 2 +-
11 files changed, 59 insertions(+), 51 deletions(-)
^ permalink raw reply [relevance 4%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-03-26 9:51 4% [PATCH 0/4] lei minor things Eric Wong
2021-03-26 9:51 7% ` [PATCH 2/4] lei: do not blindly commit to lei/store on close Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).