* [PATCH] extsearchidx: lock before writing multi-pack-index
@ 2021-06-30 22:00 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2021-06-30 22:00 UTC (permalink / raw)
To: meta
This avoids errors from git in case -extindex gets invoked in
parallel.
---
lib/PublicInbox/ExtSearchIdx.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm
index e4eaf5be..ee43e6f8 100644
--- a/lib/PublicInbox/ExtSearchIdx.pm
+++ b/lib/PublicInbox/ExtSearchIdx.pm
@@ -1047,6 +1047,7 @@ sub idx_init { # similar to V2Writable
$git_midx and $self->with_umask(sub {
my @cmd = ('multi-pack-index');
push @cmd, '--no-progress' if ($opt->{quiet}//0) > 1;
+ my $lk = $self->lock_for_scope;
system('git', "--git-dir=$ALL", @cmd, 'write');
# ignore errors, fairly new command, may not exist
});
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-30 22:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-30 22:00 [PATCH] extsearchidx: lock before writing multi-pack-index 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).