From: Junio C Hamano Date: Wed, 26 Oct 2016 16:14:56 GMT Subject: Re: [PATCH v1 00/19] Add configuration options for split-index Message-ID: In-Reply-To: Duy Nguyen writes: > On Wed, Oct 26, 2016 at 12:21 AM, Junio C Hamano wrote: > > Even if we ignore user index files (by forcing them all to be stored > in one piece), there is a problem with the special temporary file > index.lock, which must use split-index because it will become the new > index. Handling race conditions could be tricky with ref counting. > Timestamps help in this regard. I actually think using the split-index only for the $GIT_DIR/index, the primary one, and using the full index for others is a bad idea, as we use temporary index ourselves when making partial commits, which happens quite often. So time-based GC it is. I actually do not think index.lock is a problem, but is a solution, if we only limit the split-index to the primary one (we can have at most one, so we can GC the stale shared ones while holding the lock). But that is no longer important.