Re: [PATCH v1 00/19] Add configuration options for split-index
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 26, 2016, 16:14 UTC
- Message-ID
- <xmqqeg33ccjj.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CACsJy8Ba0BY=pZwrKf5rcD5AaZ3YyKh9=ENKkj7hHpTqh00OnA@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 7 quoted lines
> On Wed, Oct 26, 2016 at 12:21 AM, Junio C Hamano <gitster@pobox.com> 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.