Bug 5108 - share doesn't copy as many caches as it should
Summary: share doesn't copy as many caches as it should
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: share (show other bugs)
Version: default branch
Hardware: All All
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-22 21:37 UTC by Augie Fackler
Modified: 2017-08-11 12:02 UTC (History)
5 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Augie Fackler 2016-02-22 21:37 UTC
When using the share extension some caches don't get copied over, incurring a potentially expensive cache recomputation. With O(3000) heads, the branchcache and friends can be costly.

We should figure out a better strategy for sharing caches between shares, or at least copying over relevant caches.
Comment 1 Pierre-Yves David 2016-02-23 05:04 UTC
Sound like related to https://www.mercurial-scm.org/wiki/AtomicRepositoryLayoutPlan
Comment 2 Bugzilla 2016-07-24 00:00 UTC
Bug was inactive for 151 days, archiving
Comment 3 Gregory Szorc 2016-07-26 23:28 UTC
I'm noticing this at Mozilla as we're starting to roll out aggressive use of auto pooled storage with shared clones. There is a delay of several seconds after the initial `hg pull` on a shared repo due to cache recreation.

Someone please remind me to address this in the next release cycle if I forget :)
Comment 4 Gregory Szorc 2016-10-03 02:37 UTC
I noticed this again at Mozilla last week. We have an extension that streamlines the clone+share+updateprocess to make it so easy a caveman could do it. The process effectively stalls for ~10s between the share and update actions.

The quick hack is copying certain cache files during hg.share() or hg.postshare(). IMO the better solution is to introduce a vfs instance rooted at the cache directory of the store and to switch caches to that vfs instance. That way, cache updates will benefit all repositories using that shared store.
Comment 5 Bugzilla 2017-03-03 00:00 UTC
Bug was inactive for 151 days, archiving
Comment 6 Bugzilla 2017-08-11 00:00 UTC
Bug was inactive for 150 days, archiving
Comment 7 Boris Feld 2017-08-11 12:02 UTC
It has been fixed in 4.3 with https://www.mercurial-scm.org/repo/hg/rev/460733327640