Re: [PATCH 0/3] Another approach to large transactions
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 21, 2015, 17:19 UTC
- Message-ID
- <xmqqa8y1iekw.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CAGZ79kYk_3E1RMdNvA_OrCj6EdaJ2Xdps9pUxEkWwvDNazb6Gg@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 8 quoted lines
> On Mon, Apr 20, 2015 at 3:51 PM, Junio C Hamano <gitster@pobox.com> wrote: > >> On the core management side, xmalloc() and friends retry upon >> failure, after attempting to free the resource. I wonder if your >> codepath can do something similar to that, perhaps? > > But then we'd need to think about which fds can be 'garbage collected'. > The lock files certainly can be closed and reopened.
... and that is the natural thing to garbage collect, no? After all, this approach allows lock-file subsystem to keep fds open even when they do not absolutely have to, so they are the best candidates to be shot down first when things gets tight.
A good thing is that you have a list of all them already for use by the atexit handler ;-)