From: Junio C Hamano <gitster@pobox•com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail•com>
Cc: "Michael Haggerty" <mhagger@alum•mit.edu>,
git@vger•kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail•com>,
"Eric Sunshine" <sunshine@sunshineco•com>
Subject: Re: [Alt. PATCH v5] gc: save log from daemonized gc --auto and print it next time
Date: Mon, 21 Sep 2015 09:19:23 -0700 [thread overview]
Message-ID: <xmqqy4fzbv90.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1442639665-25692-1-git-send-email-pclouds@gmail.com> ("Nguyễn Thái Ngọc Duy"'s message of "Sat, 19 Sep 2015 12:14:25 +0700")
Nguyễn Thái Ngọc Duy <pclouds@gmail•com> writes:
> 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 ;-)
prev parent reply other threads:[~2015-09-21 16:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 12:28 Since gc.autodetach=1 you can end up with auto-gc on every command with no user notification Ævar Arnfjörð Bjarmason
2015-07-08 12:47 ` Duy Nguyen
2015-08-22 2:12 ` [PATCH v3] gc: save log from daemonized gc --auto and print it next time Nguyễn Thái Ngọc Duy
2015-08-25 17:49 ` Junio C Hamano
2015-08-31 10:17 ` Duy Nguyen
2015-09-13 1:36 ` [PATCH v4] " Nguyễn Thái Ngọc Duy
2015-09-14 17:24 ` Junio C Hamano
2015-09-14 17:37 ` Junio C Hamano
2015-09-16 9:28 ` Michael Haggerty
2015-09-16 16:00 ` Junio C Hamano
2015-09-17 9:40 ` Michael Haggerty
2015-09-17 13:08 ` Duy Nguyen
2015-09-17 14:48 ` Junio C Hamano
2015-09-19 5:13 ` [PATCH v5] " Nguyễn Thái Ngọc Duy
2015-09-21 16:43 ` Junio C Hamano
2015-09-19 5:14 ` [Alt. PATCH " Nguyễn Thái Ngọc Duy
2015-09-21 16:19 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqy4fzbv90.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=avarab@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=mhagger@alum$(echo .)mit.edu \
--cc=pclouds@gmail$(echo .)com \
--cc=sunshine@sunshineco$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox