comparison tests/test-relink.t @ 51181:dcaa2df1f688

changelog: never inline changelog The test suite mostly use small repositories, that implies that most changelog in the tests are inlined. As a result, non-inlined changelog are quite poorly tested. Since non-inline changelog are most common case for serious repositories, this lack of testing is a significant problem that results in high profile issue like the one recently fixed by 66417f55ea33 and 849745d7da89. Inlining the changelog does not bring much to the table, the number of total file saved is negligible, and the changelog will be read by most operation anyway. So this changeset is make it so we never inline the changelog, and de-inline the one that are still inlined whenever we touch them. By doing that, we remove the "dual code path" situation for writing new entry to the changelog and move to a "single code path" situation. Having a single code path simplify the code and make sure it is covered by test (if test cover that situation obviously) This impact all tests that care about the number of file and the exchange size, but there is nothing too complicated in them just a lot of churn. The churn is made "worse" by the fact rust will use the persistent nodemap on any changelog now. Which is overall a win as it means testing the persistent nodemap more and having less special cases. In short, having inline changelog is mostly useless and an endless source of pain. We get rid of it.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 11 Dec 2023 22:27:59 +0100
parents 42d2b31cee0b
children
comparison
equal deleted inserted replaced
51180:2e0b2a387502 51181:dcaa2df1f688
78 #if no-reposimplestore 78 #if no-reposimplestore
79 79
80 $ hg relink --debug --config progress.debug=true | fix_path 80 $ hg relink --debug --config progress.debug=true | fix_path
81 relinking $TESTTMP/repo/.hg/store to $TESTTMP/clone/.hg/store 81 relinking $TESTTMP/repo/.hg/store to $TESTTMP/clone/.hg/store
82 tip has 2 files, estimated total number of files: 3 82 tip has 2 files, estimated total number of files: 3
83 collecting: 00changelog.i 1/3 files (33.33%) 83 collecting: 00changelog.d 1/3 files (33.33%)
84 collecting: 00manifest.i 2/3 files (66.67%) 84 collecting: 00changelog.i 2/3 files (66.67%)
85 collecting: a.i 3/3 files (100.00%) 85 collecting: 00manifest.i 3/3 files (100.00%)
86 collecting: b.i 4/3 files (133.33%) 86 collecting: a.i 4/3 files (133.33%)
87 collecting: dummy.i 5/3 files (166.67%) 87 collecting: b.i 5/3 files (166.67%)
88 collected 5 candidate storage files 88 collecting: dummy.i 6/3 files (200.00%)
89 collected 6 candidate storage files
90 not linkable: 00changelog.d
89 not linkable: 00changelog.i 91 not linkable: 00changelog.i
90 not linkable: 00manifest.i 92 not linkable: 00manifest.i
91 pruning: data/a.i 3/5 files (60.00%) 93 pruning: data/a.i 4/6 files (66.67%)
92 not linkable: data/b.i 94 not linkable: data/b.i
93 pruning: data/dummy.i 5/5 files (100.00%) 95 pruning: data/dummy.i 6/6 files (100.00%)
94 pruned down to 2 probably relinkable files 96 pruned down to 2 probably relinkable files
95 relinking: data/a.i 1/2 files (50.00%) 97 relinking: data/a.i 1/2 files (50.00%)
96 not linkable: data/dummy.i 98 not linkable: data/dummy.i
97 relinked 1 files (1.36 KB reclaimed) 99 relinked 1 files (1.36 KB reclaimed)
98 $ cd .. 100 $ cd ..