[Bug 4982] New: Full changegroup generated when common nodes filtered
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Wed Dec 2 21:30:28 UTC 2015
https://bz.mercurial-scm.org/show_bug.cgi?id=4982
Bug ID: 4982
Summary: Full changegroup generated when common nodes filtered
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, sid0 at fb.com
In certain circumstances, an `hg pull` from a remote that has hidden changesets
may result in the remote generating a bundle for the entire repo (or a large
portion of it).
The bug occurs in changegroup.computeoutgoing() at
https://selenic.com/repo/hg/file/61fbf5dc12b2/mercurial/changegroup.py#l879
The request to obtain a changegroup passes in a set of nodes common to the
producer and the receiver. The idea is we only emit data for nodes neither peer
knows about.
In the linked code, the set of common nodes is pruned if the node isn't locally
known. If all common nodes are filtered/hidden, the common nodes set will be
empty and all changesets will be included in the generated changegroup.
This appears to happen all the time because the known() wire protocol command
is returning yes for nodes that are hidden on the remote. This feels odd to me,
as I would think this wire protocol command would operate on a filtered repo.
Without the discovery visibility issue, there is still a race condition that
requires computeoutgoing() to react more intelligently to hidden changesets.
It's possible for a client to perform discovery and for another client to push
changes that hide changesets the first client marks as common, causing it to
send now-hidden changesets to getbundle() and thus fed into computeoutgoing().
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list