Re: [PATCH v1 10/19] read-cache: regenerate shared index if necessary
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Oct 29, 2016, 22:58 UTC
- Message-ID
- <CAP8UFD1qTeppaW2NRWhAxz0tJ7EtwmiOjKUnQt8q89FdC8kXWQ@mail.gmail.com>
- In-Reply-To
- <CACsJy8CfQ6d3Q74W4rm=rJD69EAzuUe7PdrW-5NDo0vHuDSNpw@mail.gmail.com>
On Tue, Oct 25, 2016 at 12:16 PM, Duy Nguyen <pclouds@gmail.com> wrote:
Show 17 quoted lines
> On Sun, Oct 23, 2016 at 4:26 PM, Christian Couder
> <christian.couder@gmail.com> wrote:
>> @@ -2233,7 +2263,8 @@ int write_locked_index(struct index_state *istate, struct lock_file *lock,
>> if ((v & 15) < 6)
>> istate->cache_changed |= SPLIT_INDEX_ORDERED;
>> }
>> - if (istate->cache_changed & SPLIT_INDEX_ORDERED) {
>> + if (istate->cache_changed & SPLIT_INDEX_ORDERED ||
>> + too_many_not_shared_entries(istate)) {
>
> It's probably safer to keep this piece unchanged and add this
> somewhere before it
>
> if (too_many_not_shared_entries(istate))
> istate->cache_changed |= SPLIT_INDEX_ORDERED;
>
> We could keep cache_changed consistent until the end this way.Ok, it will be in the next version.
Show 5 quoted lines
>> test_expect_success 'enable split index' ' >> + git config splitIndex.maxPercentChange 100 && > > An alternative name might be splitThreshold. I don't know, maybe > maxPercentChange is better.
I think it is important to say that it is a percent in the name, so I prefer maxPercentChange.
Thanks, Christian.