Re: [PATCH v1 00/19] Add configuration options for split-index
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Oct 26, 2016, 09:25 UTC
- Message-ID
- <CACsJy8Ba0BY=pZwrKf5rcD5AaZ3YyKh9=ENKkj7hHpTqh00OnA@mail.gmail.com>
- In-Reply-To
- <xmqqk2cws5t6.fsf@gitster.mtv.corp.google.com>
On Wed, Oct 26, 2016 at 12:21 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 9 quoted lines
>> Timestamps allow us to say, ok this base index file has not been read >> by anybody for N+ hours (or better, days), it's most likely not >> referenced by any temporary index files (including >> $GIT_DIR/index.lock) anymore because those files, by the definition of >> "temporary", must be gone by now.... > > and if we guessed wrong, users will have a "temporary index" that > they meant to keep for longer term that is now broken here. I am > not sure if that risk is worth taking.
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.
-- Duy