Thread (39 messages) 39 messages, 3 authors, 2016-11-09

Re: [PATCH v1 10/19] read-cache: regenerate shared index if necessary

From: Christian Couder <hidden>
Date: 2016-10-29 22:58:51

On Tue, Oct 25, 2016 at 12:16 PM, Duy Nguyen [off-list ref] wrote:
On Sun, Oct 23, 2016 at 4:26 PM, Christian Couder
[off-list ref] wrote:
quoted
@@ -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.
quoted
 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help