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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 25, 2015 at 5:07 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>> +             LANG=C git gc --auto &&
>> +             sleep 1 && # give it time to daemonize
>> +             while test -f .git/gc.pid; do sleep 1; done &&
>
> Yuck...

Yeah.. it's hard to test daemon things. I'm not even sure if we should
add a test, but I tried anyway.

>> +             grep "too many unreachable loose objects" .git/gc.log &&
>> +             LANG=C git gc --auto 2>error &&
>> +             grep skipped error &&
>> +             grep "too many unreachable loose objects" error &&
>> +             ! test -f .git/gc.log
>> +     )
>> +'
>
> For that "17/ has very many loose objects that are still young and
> unreachable" issue, I wonder if the right solution is somehow to
> flag the repository and prevent "gc --auto" from running until the
> situation improves.  "I checked at this time and found too many in
> 17/"; upon finding that flag file (with a timestamp), if there are
> new files in 17/ or if there are other reasons to do a gc (perhaps
> there are too many packfiles to be consolidated?), then do the gc
> but otherwise quit silently before spending too many cycles on it,
> or something along that line?

That's a separate problem that's being discussed in another thread. I
think Jeff's idea of storing the number of estimated loose objects may
be more reliable than timestamps..
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]