From: Nathan Neulinger <nneul@neulinger.org>
To: git@vger.kernel.org
Subject: Feature request - allow requesting a lock timeout
Date: Fri, 4 Dec 2015 08:28:27 -0600 [thread overview]
Message-ID: <5661A30B.6030803@neulinger.org> (raw)
It appears that almost all of the locking calls in the current code use hold_lock_file_for_update() which translates
into a request with zero timeout.
This effectively means that for certain classes of usage, you can't use git concurrently without either external locking
or retry logic. It would be nice to see a global option "--lock-timeout" that would request a specific non-zero default
timeout for many of those operations.
Even having the option to have a couple-second timeout would eliminate most typical concurrency issues, simplifying some
automated use cases.
Horrible/contrived example, but demonstrates the issue:
for f in `seq 1 150`; do touch $f; (git add $f &); done
You'll get a whole bunch of:
fatal: Unable to create '/tmp/dummy/.git/index.lock': File exists.
-- Nathan
------------------------------------------------------------
Nathan Neulinger nneul@neulinger.org
Neulinger Consulting (573) 612-1412
reply other threads:[~2015-12-04 14:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5661A30B.6030803@neulinger.org \
--to=nneul@neulinger.org \
--cc=git@vger.kernel.org \
/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.
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 NNTP newsgroup(s).