-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
edenapi: translate segment ids in a stream
Summary: Currently we do all the work of building the segment graph and translating the segments into Mercurial hashes up-front on the server before sending the whole set of segments backs to the client at once. This makes it appear to the client that the server has hung, until suddenly they receive the entire response. We can't currently build the whole graph in a streaming fashion, as early segments may rely on much later segments in order to determine their parent's locations (consider, for example, a merge commit near the head of a large repo that merges in a small disjoint subrepo - we won't be able to yield that merge commit's segment until we get round to processing the small disjoint subrepo, which will be much later on). However, we can at least stream at the point we start translating commit ids from Bonsai to Mercurial. A more general solution would be to change the streaming API to allow parent locations to be deferred and generated later on (when the parent segment is generated), however this would involve larger changes, and is more effort than necessary for just changing how streaming works. If the server-side memory requirements for buffering make it necessary to do this, we can implement a `graphsegments2` method that works this way. Differential Revision: D51749060 fbshipit-source-id: 9f7af439fe121f259cd52dd145a2b3767ceaf8b3
- Loading branch information
1 parent
325dd13
commit b44f679
Showing
4 changed files
with
86 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters