* [PATCH 6/9] lei_store: give process a better name
2021-03-24 9:23 4% [PATCH 0/9] lei: various corner case leak fixes Eric Wong
@ 2021-03-24 9:23 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-03-24 9:23 UTC (permalink / raw)
To: meta
We'll prioritize the last two components of the path name
("lei/store") since that's how I often refer to the on-disk
location. Then, show the XDG_DATA_HOME it belongs to in case
a user changes HOME or XDG_* for testing purposes.
---
lib/PublicInbox/LeiStore.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm
index fa03f93c..1311ad46 100644
--- a/lib/PublicInbox/LeiStore.pm
+++ b/lib/PublicInbox/LeiStore.pm
@@ -329,11 +329,13 @@ sub ipc_atfork_child {
sub write_prepare {
my ($self, $lei) = @_;
unless ($self->{-ipc_req}) {
- $self->ipc_lock_init($lei->store_path . '/ipc.lock');
+ my $d = $lei->store_path;
+ $self->ipc_lock_init("$d/ipc.lock");
+ substr($d, -length('/lei/store'), 10, '');
# Mail we import into lei are private, so headers filtered out
# by -mda for public mail are not appropriate
local @PublicInbox::MDA::BAD_HEADERS = ();
- $self->ipc_worker_spawn('lei_store', $lei->oldset,
+ $self->ipc_worker_spawn("lei/store $d", $lei->oldset,
{ lei => $lei });
}
$lei->{sto} = $self;
^ permalink raw reply related [relevance 7%]
* [PATCH 0/9] lei: various corner case leak fixes
@ 2021-03-24 9:23 4% Eric Wong
2021-03-24 9:23 7% ` [PATCH 6/9] lei_store: give process a better name Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-03-24 9:23 UTC (permalink / raw)
To: meta
Making the test suite use a single lei-daemon for all tests has
uncovered a number of bugs that wouldn't get uncovered during
normal usage. These fixes could be useful if lei-daemon is
deployed a multi-tenant server with both shared and "private"
storage support running under a single Unix user.
Eric Wong (9):
ds: improve DS->Reset fork-safety
mbox_lock: dotlock: chdir for relative lock paths
lei: drop circular reference in lei_store process
lei: update {3} after -C chdirs
lei: clean up pkt_op consumer on exception, too
lei_store: give process a better name
v2writable: cleanup SQLite handles on --xapian-only
lei_mirror: fix circular reference
lei-daemon: do not leak FDs on bogus requests
lib/PublicInbox/DS.pm | 76 +++++++++++++++++++++--------------
lib/PublicInbox/LEI.pm | 45 ++++++++++++++++-----
lib/PublicInbox/LeiMirror.pm | 2 +-
lib/PublicInbox/LeiStore.pm | 6 ++-
lib/PublicInbox/LeiXSearch.pm | 9 +----
lib/PublicInbox/MboxLock.pm | 14 +++++++
lib/PublicInbox/V2Writable.pm | 1 +
t/lei-daemon.t | 29 +++++++++++++
t/mbox_lock.t | 12 ++++++
t/v2reindex.t | 10 ++++-
10 files changed, 153 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-24 9:23 4% [PATCH 0/9] lei: various corner case leak fixes Eric Wong
2021-03-24 9:23 7% ` [PATCH 6/9] lei_store: give process a better name 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).