From: "Simão Afonso" <simao.afonso@powertools-tech.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: Credential Store: Don't acquire lock when only reading the file
Date: Fri, 30 Oct 2020 12:05:40 +0000 [thread overview]
Message-ID: <20201030120540.dna7k3bmnrrw4cck@safonso-t430> (raw)
In-Reply-To: <20201030055541.GA3264588@coredump.intra.peff.net>
[-- Attachment #1: Type: text/plain, Size: 976 bytes --]
On 2020-10-30 01:55:41, Jeff King wrote:
> - teach it to try the lock until hitting a timeout. I think just
> swapping out hold_lock_file_for_update() for
> hold_lock_file_for_update_timeout() would do it (I probably
> would have used it back then, but it didn't exist yet).
So I tried to patch the credential store with that timeout function and
it seems to solve it! Thanks.
https://github.com/git/git/blob/v2.29.2/builtin/credential-store.c#L61
This is easily reproduced if you do a `fetch --all` in parallel on the
same repository (seen on the attached image):
> $ for n in $(seq 100); do git fetch --all; sleep 0.5; done
About the timeout, I put it at infinite retries, but should this be
configurable? Or should it be a different default?
There aren't many timeout configurations. I found
"core.filesRefLockTimeout" and "core.packedRefsTimeout", doesn't sound
like something that should be re-used.
Should it be something like this with a different name?
[-- Attachment #2: 2020-10-30T11:50:31+00:00.png --]
[-- Type: image/png, Size: 68623 bytes --]
next prev parent reply other threads:[~2020-10-30 12:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-29 19:20 Credential Store: Don't acquire lock when only reading the file Simão Afonso
2020-10-30 5:55 ` Jeff King
2020-10-30 11:22 ` Simão Afonso
2020-10-30 11:25 ` Jeff King
2020-10-30 11:39 ` Simão Afonso
2020-10-30 12:05 ` Simão Afonso [this message]
2020-10-30 15:01 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201030120540.dna7k3bmnrrw4cck@safonso-t430 \
--to=simao.afonso@powertools-tech.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.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).