From: Junio C Hamano Date: Tue, 21 Apr 2015 17:19:43 GMT Subject: Re: [PATCH 0/3] Another approach to large transactions Message-ID: In-Reply-To: Stefan Beller writes: > On Mon, Apr 20, 2015 at 3:51 PM, Junio C Hamano 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 ;-)