From: Jeff King Date: Wed, 12 Jun 2013 12:52:35 GMT Subject: Re: [PATCH 00/12] Fix some reference-related races Message-ID: <20130612125235.GA28876@sigill.intra.peff.net> In-Reply-To: <1370987312-6761-1-git-send-email-mhagger@alum.mit.edu> On Tue, Jun 11, 2013 at 11:48:20PM +0200, Michael Haggerty wrote: > *This patch series must be built on top of mh/reflife.* Applying on top of what Junio has in mh/reflife seems to create conflicts at the first patch. I didn't look into it, though, but just read the patches and looked at the packed-refs-transactions branch at git://github.com/mhagger/git.git. > The other problem was that the for_each_ref() functions will die if > the ref cache that they are iterating over is freed out from under > them. This problem is solved by using reference counts to avoid > freeing the old packed ref cache (even if it is no longer valid) until > all users are done with it. I was worried that the reference-counting would end up invasive and ugly, but it turned out quite nice. Overall, I think the series goes in the right direction, and I didn't see any implementation flaws. The core of the race-handling is the same as in mine, but your "hyperactive repository" patch shows how badly mine can break under load. I sent a few comments to specific patches, but I'd be fine with applying it as-is. Thanks for working on it. -Peff