Merge index (based on chaining index implementation)#2818
Merge index (based on chaining index implementation)#2818MichaelEischer merged 3 commits intorestic:masterfrom
Conversation
219feff to
931048a
Compare
|
Here are benchmark results, where old is based on commit bb65143. |
|
Also checked test coverage for the changes due to this PR: only the |
931048a to
29ba8b6
Compare
|
I rebased to the current version of #2812 and fixed the issues @greatroar found. |
MichaelEischer
left a comment
There was a problem hiding this comment.
I completely agree that the masterIndex has to merge indexes to achieve good performance. However, the merge procedure should not break final indexes that got merged into the main index. As there's no way to ensure to nobody still has a reference to a merged index, this can lead to all sorts of subtle race conditions. So please remove all modifications of the source index during a merge operation.
29ba8b6 to
7867a59
Compare
|
Now that this PR only calls |
MichaelEischer
left a comment
There was a problem hiding this comment.
The changes look good on a quick glance at the code. I'll wait with the final review until #2812 is merged.
7867a59 to
63fff18
Compare
63fff18 to
0daff59
Compare
|
The benchmarks got killed on my 8GB laptop due to unsufficient memory; however, the important benchmarks did run. Here is the result comparing old = 6159eab with new = 1f07c59 : |
0daff59 to
1f07c59
Compare
Insufficient memory on a laptop with 8GB RAM sounds a bit worrying, as in that case either the tests use too large indexes or have a memory leak. Which test failed exactly? FWIW the benchmarks completed successfully on my laptop and that also has "just" 8GB RAM. |
+ reduce test size of BenchmarkMasterIndexLookupParallel
1f07c59 to
d18c65f
Compare
I had some other programs in memory which also took their share... The memory-hungry benchmark was Here are the benchmark results: (wouldn't count too much on the ~2% differences, as said this is my laptop and there are other things like a firefox running...) |
d18c65f to
a666a6d
Compare
|
I've run |
What is the purpose of this change? What does it change?
Merge in-memory indexes when they are finalized.
This increases performance especially for large repositories with many index files.
Was the change discussed in an issue or in the forum before?
The idea comes from #2523. This is a follow-up of #2799 as the discussion in there mainly moved to index-implementation related things.
This PR is based on #2812.
closes #944
closes #1550
closes #2799
closes #2523
Checklist
changelog/unreleased/that describes the changes for our users (template here)gofmton the code in all commits