File: Batch_process__44___git_rm__44___and_locking.mdwn

package info (click to toggle)
git-annex 10.20250416-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 73,572 kB
  • sloc: haskell: 90,656; javascript: 9,103; sh: 1,469; makefile: 211; perl: 137; ansic: 44
file content (7 lines) | stat: -rw-r--r-- 1,123 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
Is it "safe" to run `git-annex addurl` or `git-annex registerurl` in batch mode on a git-annex repository while also occasionally executing `git rm` on that repository while the batch process is running?  By "safe", I mean "the `git rm` process will never crash due to the git lock file already existing."  Is there a way to ensure that a `git rm` invocation will not fail due to locking issues while keeping the batch process running?

The only relevant information I can find on this is <https://git-annex.branchable.com/forum/locks_during_--batch_operations/>, which states that a batch process will not hold a single lock throughout its entire run but says nothing about whether a batch process uses a lock at all.

(I am asking about this because we have a program that runs batch processes concurrently with `git rm` invocations, and very rarely there are crashes due to locking issues with `git rm`.  My boss now wants me to address these issues by shutting down any running batch processes before running `git rm`, but this will be a giant hassle that I wish to avoid if at all possible.)

[[!meta author=jwodder]]