git/list[1] front-page[2] threads[3] people[4] search[5] about
 

The maintenance tasks will never run if maintenance.lock is accidentally not deleted

From
刘刘钟博 <liuzhongbo.gg@gmail.com>
Date
Sep 19, 2024, 12:40 UTC
Message-ID
<CAN477tHJnVnOKfUsG5G9QAVdzYvmUuC8A8Vxt8mtHB23fd=hAQ@mail.gmail.com>

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

Next: Derrick Stolee
Message 1 of 4 in “The maintenance tasks will never run if maintenance.lock is accidentally not deleted”
  1. 刘钟博Sep 19, 2024
  2. Derrick StoleeSep 19, 2024
  3. 刘钟博Sep 23, 2024
  4. Derrick StoleeSep 25, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.