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

Re: [Alt. PATCH v5] gc: save log from daemonized gc --auto and print it next time

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 21, 2015, 16:19 UTC
Message-ID
<xmqqy4fzbv90.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<1442639665-25692-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
Show 7 quoted lines
>  The lock-based version has an advantage that the following gc runs
>  will never see partial gc.log. But it requires some more hook at
>  atexit() and maybe signal handler.
>  
>  This version avoids that, and gc.log can be kept even if gc is
>  SIGKILL'd (unlikely because gc itself does not do anything that can
>  upset the kernel), but then it's racy.

Given that you are only interested in an non-empty output, and also you want to avoid running an auto-gc when another one is already running, I wonder if that "never see partial" property really matters.

In any case, "an alternative could be to avoid lockfile and not bothering to remove an empty one" was idea from Michael, so let's CC him back in the loop.

>  I think I perfer the lock-based version.
It certainly does look more familiar to me, too ;-)
Previous: Nguyễn Thái Ngọc Duy
Message 17 of 17 in “Since gc.autodetach=1 you can end up with auto-gc on every command with no user notification”
  1. Ævar Arnfjörð BjarmasonJul 8, 2015
  2. Duy NguyenJul 8, 2015
  3. gc: save log from daemonized gc --auto and print it next timeNguyễn Thái Ngọc Duy, Aug 22, 2015
  4. Junio C HamanoAug 25, 2015
  5. Duy NguyenAug 31, 2015
  6. gc: save log from daemonized gc --auto and print it next timeNguyễn Thái Ngọc Duy, Sep 13, 2015
  7. Junio C HamanoSep 14, 2015
  8. Junio C HamanoSep 14, 2015
  9. Michael HaggertySep 16, 2015
  10. Junio C HamanoSep 16, 2015
  11. Michael HaggertySep 17, 2015
  12. Duy NguyenSep 17, 2015
  13. Junio C HamanoSep 17, 2015
  14. gc: save log from daemonized gc --auto and print it next timeNguyễn Thái Ngọc Duy, Sep 19, 2015
  15. Junio C HamanoSep 21, 2015
  16. gc: save log from daemonized gc --auto and print it next timeNguyễn Thái Ngọc Duy, Sep 19, 2015
  17. Junio C HamanoSep 21, 2015

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.