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

Re: autopacking twice?

From
Duy Nguyen <pclouds@gmail.com>
Date
Jun 23, 2014, 10:57 UTC
Message-ID
<CACsJy8D3cz9w9RrVLcRgz+xgw0+2B9G_BAotvVzUoJ9Uf-Zoag@mail.gmail.com>
In-Reply-To
<20140622055154.GA13819@redhat.com>
On Sun, Jun 22, 2014 at 12:51 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
Show 7 quoted lines
> Why did it auto-pack twice in a single pull?
> None of the changes applied are very large.
>
> Guess: auto-packing was started in background, did not
> complete in time, and was restarted for the second time?
> If true, some kind of lock file would be useful
> to prevent this.

There is a lock, $GIT_DIR/gc.pid. However we are prepared to deal with stale locks, and may have slipped somehow. The test is in builtin/gc.c, lock_repo_for_gc(). Oh wait, we check for lock (and exit if lock exists) _after_ we print the message (in cmd_gc). That might be it.. If it so, maybe we can reorder some code to prevent this bogus message, but has to be careful and do it before daemonizing..

-- 
Duy
Previous: Michael S. Tsirkin
Message 4 of 4 in “autopacking twice?”
  1. Michael S. TsirkinJun 22, 2014
  2. Matthieu MoyJun 22, 2014
  3. Michael S. TsirkinJun 22, 2014
  4. Duy NguyenJun 23, 2014

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.