##// END OF EJS Templates
cache: avoid warming the fnodetags cache after clone...
marmoute -
r47985:8be95673 stable
parent child Browse files
Show More
@@ -1053,7 +1053,7 b' def clone('
1053 # as the only "bad" outcome would be some slowness. That potential
1053 # as the only "bad" outcome would be some slowness. That potential
1054 # slowness already affect reader.
1054 # slowness already affect reader.
1055 with destrepo.lock():
1055 with destrepo.lock():
1056 destrepo.updatecaches(full=True)
1056 destrepo.updatecaches(full=b"post-clone")
1057 finally:
1057 finally:
1058 release(srclock, destlock)
1058 release(srclock, destlock)
1059 if cleandir is not None:
1059 if cleandir is not None:
@@ -2727,6 +2727,11 b' class localrepository(object):'
2727
2727
2728 If 'full' is set, make sure all caches the function knows about have
2728 If 'full' is set, make sure all caches the function knows about have
2729 up-to-date data. Even the ones usually loaded more lazily.
2729 up-to-date data. Even the ones usually loaded more lazily.
2730
2731 The `full` argument can take a special "post-clone" value. In this case
2732 the cache warming is made after a clone and of the slower cache might
2733 be skipped, namely the `.fnodetags` one. This argument is 5.8 specific
2734 as we plan for a cleaner way to deal with this for 5.9.
2730 """
2735 """
2731 if tr is not None and tr.hookargs.get(b'source') == b'strip':
2736 if tr is not None and tr.hookargs.get(b'source') == b'strip':
2732 # During strip, many caches are invalid but
2737 # During strip, many caches are invalid but
@@ -2754,8 +2759,9 b' class localrepository(object):'
2754 for ctx in self[b'.'].parents():
2759 for ctx in self[b'.'].parents():
2755 ctx.manifest() # accessing the manifest is enough
2760 ctx.manifest() # accessing the manifest is enough
2756
2761
2757 # accessing fnode cache warms the cache
2762 if not full == b"post-clone":
2758 tagsmod.fnoderevs(self.ui, unfi, unfi.changelog.revs())
2763 # accessing fnode cache warms the cache
2764 tagsmod.fnoderevs(self.ui, unfi, unfi.changelog.revs())
2759 # accessing tags warm the cache
2765 # accessing tags warm the cache
2760 self.tags()
2766 self.tags()
2761 self.filtered(b'served').tags()
2767 self.filtered(b'served').tags()
@@ -201,7 +201,6 b' Basic clone'
201 branch2-served.hidden
201 branch2-served.hidden
202 branch2-visible
202 branch2-visible
203 branch2-visible-hidden
203 branch2-visible-hidden
204 hgtagsfnodes1
205 rbc-names-v1
204 rbc-names-v1
206 rbc-revs-v1
205 rbc-revs-v1
207 tags2
206 tags2
@@ -62,7 +62,6 b' Ensure branchcache got copied over:'
62 branch2-served.hidden
62 branch2-served.hidden
63 branch2-visible
63 branch2-visible
64 branch2-visible-hidden
64 branch2-visible-hidden
65 hgtagsfnodes1
66 rbc-names-v1
65 rbc-names-v1
67 rbc-revs-v1
66 rbc-revs-v1
68 tags2
67 tags2
@@ -142,7 +141,6 b' Ensure branchcache got copied over:'
142 branch2-served.hidden
141 branch2-served.hidden
143 branch2-visible
142 branch2-visible
144 branch2-visible-hidden
143 branch2-visible-hidden
145 hgtagsfnodes1
146 rbc-names-v1
144 rbc-names-v1
147 rbc-revs-v1
145 rbc-revs-v1
148 tags2
146 tags2
@@ -244,7 +244,6 b' r4 has hardlinks in the working dir (not'
244 2 r4/.hg/cache/branch2-served.hidden
244 2 r4/.hg/cache/branch2-served.hidden
245 2 r4/.hg/cache/branch2-visible
245 2 r4/.hg/cache/branch2-visible
246 2 r4/.hg/cache/branch2-visible-hidden
246 2 r4/.hg/cache/branch2-visible-hidden
247 2 r4/.hg/cache/hgtagsfnodes1
248 2 r4/.hg/cache/rbc-names-v1
247 2 r4/.hg/cache/rbc-names-v1
249 2 r4/.hg/cache/rbc-revs-v1
248 2 r4/.hg/cache/rbc-revs-v1
250 2 r4/.hg/cache/tags2
249 2 r4/.hg/cache/tags2
@@ -302,7 +301,6 b' Update back to revision 12 in r4 should '
302 2 r4/.hg/cache/branch2-served.hidden
301 2 r4/.hg/cache/branch2-served.hidden
303 2 r4/.hg/cache/branch2-visible
302 2 r4/.hg/cache/branch2-visible
304 2 r4/.hg/cache/branch2-visible-hidden
303 2 r4/.hg/cache/branch2-visible-hidden
305 2 r4/.hg/cache/hgtagsfnodes1
306 2 r4/.hg/cache/rbc-names-v1
304 2 r4/.hg/cache/rbc-names-v1
307 2 r4/.hg/cache/rbc-revs-v1
305 2 r4/.hg/cache/rbc-revs-v1
308 2 r4/.hg/cache/tags2
306 2 r4/.hg/cache/tags2
@@ -68,7 +68,6 b' Cloning a shared repo should pick up the'
68 branch2-served.hidden
68 branch2-served.hidden
69 branch2-visible
69 branch2-visible
70 branch2-visible-hidden
70 branch2-visible-hidden
71 hgtagsfnodes1
72 rbc-names-v1
71 rbc-names-v1
73 rbc-revs-v1
72 rbc-revs-v1
74 tags2
73 tags2
@@ -86,7 +86,7 b' clone bookmarks via stream'
86 $ hg -R local-stream book mybook
86 $ hg -R local-stream book mybook
87 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2
87 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2
88 streaming all changes
88 streaming all changes
89 16 files to transfer, * of data (glob)
89 15 files to transfer, * of data (glob)
90 transferred * in * seconds (*) (glob)
90 transferred * in * seconds (*) (glob)
91 updating to branch default
91 updating to branch default
92 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
92 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -807,11 +807,11 b' Cache should contain the head only, even'
807
807
808 $ f --size --hexdump tagsclient/.hg/cache/hgtagsfnodes1
808 $ f --size --hexdump tagsclient/.hg/cache/hgtagsfnodes1
809 tagsclient/.hg/cache/hgtagsfnodes1: size=96
809 tagsclient/.hg/cache/hgtagsfnodes1: size=96
810 0000: 96 ee 1d 73 00 00 00 00 00 00 00 00 00 00 00 00 |...s............|
810 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
811 0010: 00 00 00 00 00 00 00 00 c4 da b0 c2 94 65 e1 c6 |.............e..|
811 0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
812 0020: 0d f7 f0 dd 32 04 ea 57 78 c8 97 97 79 fc d5 95 |....2..Wx...y...|
812 0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
813 0030: f6 3c c8 fe 94 65 e1 c6 0d f7 f0 dd 32 04 ea 57 |.<...e......2..W|
813 0030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
814 0040: 78 c8 97 97 79 fc d5 95 40 f0 35 8c 19 e0 a7 d3 |x...y...@.5.....|
814 0040: ff ff ff ff ff ff ff ff 40 f0 35 8c 19 e0 a7 d3 |........@.5.....|
815 0050: 8a 5c 6a 82 4d cf fb a5 87 d0 2f a3 1e 4f 2f 8a |.\j.M...../..O/.|
815 0050: 8a 5c 6a 82 4d cf fb a5 87 d0 2f a3 1e 4f 2f 8a |.\j.M...../..O/.|
816
816
817 Running hg tags should produce tags2* file and not change cache
817 Running hg tags should produce tags2* file and not change cache
@@ -837,11 +837,11 b' Running hg tags should produce tags2* fi'
837
837
838 $ f --size --hexdump tagsclient/.hg/cache/hgtagsfnodes1
838 $ f --size --hexdump tagsclient/.hg/cache/hgtagsfnodes1
839 tagsclient/.hg/cache/hgtagsfnodes1: size=96
839 tagsclient/.hg/cache/hgtagsfnodes1: size=96
840 0000: 96 ee 1d 73 00 00 00 00 00 00 00 00 00 00 00 00 |...s............|
840 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
841 0010: 00 00 00 00 00 00 00 00 c4 da b0 c2 94 65 e1 c6 |.............e..|
841 0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
842 0020: 0d f7 f0 dd 32 04 ea 57 78 c8 97 97 79 fc d5 95 |....2..Wx...y...|
842 0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
843 0030: f6 3c c8 fe 94 65 e1 c6 0d f7 f0 dd 32 04 ea 57 |.<...e......2..W|
843 0030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
844 0040: 78 c8 97 97 79 fc d5 95 40 f0 35 8c 19 e0 a7 d3 |x...y...@.5.....|
844 0040: ff ff ff ff ff ff ff ff 40 f0 35 8c 19 e0 a7 d3 |........@.5.....|
845 0050: 8a 5c 6a 82 4d cf fb a5 87 d0 2f a3 1e 4f 2f 8a |.\j.M...../..O/.|
845 0050: 8a 5c 6a 82 4d cf fb a5 87 d0 2f a3 1e 4f 2f 8a |.\j.M...../..O/.|
846
846
847 Check that the bundle includes cache data
847 Check that the bundle includes cache data
@@ -792,7 +792,7 b' Stream clone with basicstore'
792 $ hg clone --config experimental.changegroup3=True --stream -U \
792 $ hg clone --config experimental.changegroup3=True --stream -U \
793 > http://localhost:$HGPORT1 stream-clone-basicstore
793 > http://localhost:$HGPORT1 stream-clone-basicstore
794 streaming all changes
794 streaming all changes
795 29 files to transfer, * of data (glob)
795 28 files to transfer, * of data (glob)
796 transferred * in * seconds (*) (glob)
796 transferred * in * seconds (*) (glob)
797 $ hg -R stream-clone-basicstore verify
797 $ hg -R stream-clone-basicstore verify
798 checking changesets
798 checking changesets
@@ -806,7 +806,7 b' Stream clone with encodedstore'
806 $ hg clone --config experimental.changegroup3=True --stream -U \
806 $ hg clone --config experimental.changegroup3=True --stream -U \
807 > http://localhost:$HGPORT2 stream-clone-encodedstore
807 > http://localhost:$HGPORT2 stream-clone-encodedstore
808 streaming all changes
808 streaming all changes
809 29 files to transfer, * of data (glob)
809 28 files to transfer, * of data (glob)
810 transferred * in * seconds (*) (glob)
810 transferred * in * seconds (*) (glob)
811 $ hg -R stream-clone-encodedstore verify
811 $ hg -R stream-clone-encodedstore verify
812 checking changesets
812 checking changesets
General Comments 0
You need to be logged in to leave comments. Login now