Re: [PATCH] commit: don't rewrite shared index unnecessarily
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Aug 31, 2015, 10:02 UTC
- Message-ID
- <CACsJy8D=KyWBYf1LW=n928rmG=9xavSaR+1G1g+F7mMTKFCpfg@mail.gmail.com>
- In-Reply-To
- <1440695274-12400-1-git-send-email-dturner@twopensource.com>
On Fri, Aug 28, 2015 at 12:07 AM, David Turner <dturner@twopensource.com> wrote:
Show 14 quoted lines
> Remove a cache invalidation which would cause the shared index to be > rewritten on as-is commits. > > When the cache-tree has changed, we need to update it. But we don't > necessarily need to update the shared index. So setting > active_cache_changed to SOMETHING_CHANGED is unnecessary. Instead, we > let update_main_cache_tree just update the CACHE_TREE_CHANGED bit. > > In order to test this, make test-dump-split-index not segfault on > missing replace_bitmap/delete_bitmap. This new codepath is not called > now that the test passes, but is necessary to avoid a segfault when the > new test is run with the old builtin/commit.c code. > > Signed-off-by: David Turner <dturner@twopensource.com>
Ack.
I made SOMETHING_CHANGED "1" for catching these cases (there were a few on-flight topics when this series was being cooked and I was afraid I could not cache all active_cache_changed sites).
Show 5 quoted lines
> --- > > I introduced this bug last year while improving the cache-tree code. > I guess I probably didn't notice that active_cache_changed wasn't a > boolean.
So.. you did you split-index? Cool. Never heard anyone using it for real. It needs the other part to improve reading/refresh side to get to full potential though..
-- Duy