git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* The maintenance tasks will never run if maintenance.lock is accidentally not deleted
@ 2024-09-19 12:40 刘钟博
  2024-09-19 12:56 ` Derrick Stolee
  0 siblings, 1 reply; 4+ messages in thread
From: 刘钟博 @ 2024-09-19 12:40 UTC (permalink / raw)
  To: git

In my work, I found that the prefetch task of maintenance often
failed, causing the fetch command to take a long time to execute in
monorepo.

After investigation, it was found that the maintenance.lock file was
not deleted correctly for various reasons, resulting in the inability
to trigger subsequent maintenance tasks.

The maintenance task needs to be executed in the background for a long
time. Therefore, due to various reasons, the maintenance.lock file is
easily not deleted when the process exits abnormally.
Unlike ref.lock, which will have an error prompt in the fetch command,
maintenance will only fail silently, which makes it difficult for most
people to find out where the problem is.

So is it recommended to add some mechanism to ensure that
maintenance.lock can be correctly restored when it is not deleted? For
example, add pid information to maintenance.lock, or add a lock
timeout mechanism.

I'm not sure if I missed any information, but if this is feasible, I
would be happy to contribute such a patch.

Thanks.
liuzhongbo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-09-25 13:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-19 12:40 The maintenance tasks will never run if maintenance.lock is accidentally not deleted 刘钟博
2024-09-19 12:56 ` Derrick Stolee
2024-09-23 10:26   ` 刘钟博
2024-09-25 13:50     ` Derrick Stolee

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).