From: Adam Borowski <kilobyte@angband.pl>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>, git@vger.kernel.org
Subject: Re: [BUG] auto-repack exits prematurely, locking other processing out
Date: Sat, 24 May 2014 00:34:37 +0200 [thread overview]
Message-ID: <20140523223437.GA4230@angband.pl> (raw)
In-Reply-To: <xmqqy4xsgome.fsf@gitster.dls.corp.google.com>
On Fri, May 23, 2014 at 02:40:41PM -0700, Junio C Hamano wrote:
> Adam Borowski <kilobyte@angband.pl> writes:
> > It looks like the periodic auto-repack backgrounds itself when it shouldn't
> > do so. This causes the command it has triggered as a part of to fail:
>
> Duy, 9f673f94 (gc: config option for running --auto in background,
> 2014-02-08) turns to be not such a hot idea. Sure, if we kick it
> off background after doing something heavy, immediately before
> giving control back to the end-user, and expect that the user will
> stay thinking without making new changes (i.e. read-only stuff like
> "git show" would be OK), then daemonize might be a great thing, but
> we forgot, while doing that commit, that long-running operations
> trigger the auto gc in the middle *and* they want it finish before
> they continue, as the purpose of gc is to help the performance
> during their further operation.
Just add a lock that's triggered by daemonize, and have things block on this
lock. This handles all cases:
* --auto in the middle of a command: the block will kick in immediately,
effectively reverting to non-daemonized version
* --auto at the end, the user does nothing: gc will finish its work in the
background, just as you wanted
* --auto at the end, the user starts a new write two seconds later: gc works
in the foreground with those 2 seconds headstart
The only loss is the lack of a progress indicator, and even that can be
done.
--
Gnome 3, Windows 8, Slashdot Beta, now Firefox Ribbon^WAustralis. WTF is going
on with replacing usable interfaces with tabletized ones?
next prev parent reply other threads:[~2014-05-23 22:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 19:51 [BUG] auto-repack exits prematurely, locking other processing out Adam Borowski
2014-05-23 21:40 ` Junio C Hamano
2014-05-23 22:34 ` Adam Borowski [this message]
2014-05-23 22:42 ` Junio C Hamano
2014-05-24 1:26 ` Duy Nguyen
2014-05-25 0:38 ` [PATCH] gc --auto: do not lock refs in the background Nguyễn Thái Ngọc Duy
2014-05-25 0:32 ` Duy Nguyen
2014-05-27 18:09 ` Junio C Hamano
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=20140523223437.GA4230@angband.pl \
--to=kilobyte@angband.pl \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.