[Bug 5367] New: server.validate may scan every file in manifest
bugzilla at mercurial-scm.org
bugzilla at mercurial-scm.org
Tue Sep 13 18:22:08 UTC 2016
https://bz.mercurial-scm.org/show_bug.cgi?id=5367
Bug ID: 5367
Summary: server.validate may scan every file in manifest
Product: Mercurial
Version: default branch
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: bug
Priority: normal
Component: Mercurial
Assignee: bugzilla at selenic.com
Reporter: gregory.szorc at gmail.com
CC: mercurial-devel at selenic.com
>From changegroup.py:
needfiles = {}
if repo.ui.configbool('server', 'validate', default=False):
# validate incoming csets have their manifests
for cset in xrange(clstart, clend):
mfnode = repo.changelog.read(
repo.changelog.node(cset))[0]
mfest = repo.manifest.readdelta(mfnode)
# store file nodes we must see
for f, n in mfest.iteritems():
needfiles.setdefault(f, set()).add(n)
If the manifest is a full manifest (not a delta), readdelta() will return
*every* entry in the manifest. This will result in code later in changegroup.py
opening the revlog for each file in the manifest and verifying the revision
exists.
When this occurs on a "very large repo" (especially when said repo is hosted on
a slow filesystem like NFS), it can result in delays of dozens of seconds or
even several minutes while the filelogs are opened and verified.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list