Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance: test locking patterns and resolve different locks #737

Open
derrickstolee opened this issue Sep 21, 2020 · 0 comments
Open

Comments

@derrickstolee
Copy link

Ævar notes:

There's now two different lock strategies in builtin/gc.c, the existing
one introduced in 64a99eb ("gc: reject if another gc is running,
unless --force is given", 2013-08-08) where we write the hostname to the
gc.pid file, and then discard the lockfile depending on a heuristic of
whether or not it's the same etc., and this one.

With this as an entry point we'll entirely do away with the old one
since we don't use the "gc --auto" entry point.

All of that may or may not be desirable, but I think a description in
the docs & tests for how these lock files should interact would be
helpful. E.g. writing a different hostname in the gc lockfile and
setting the time on it with with "test-tool chmtime" will cause it to
plow ahead, but doing the same for "git maintenance" will stop it in its
tracks no matter the time or content.

The GC lock should stay here until all git gc commands run through
cmd_maintenance().

However, we can add the necessary tests to document what happens
and possibly catch (and fix) some undesired behavior.

@derrickstolee derrickstolee self-assigned this Sep 21, 2020
@derrickstolee derrickstolee removed their assignment Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant