Skip to content

Run a graph traversal to compute objects in packfiles that we know we have

vlorentz requested to merge generated-differential-D7882-source into master

With the 'smart' protocol, the loader tells the remote what head it already has, which allows remotes not to include them or their (transitive) ancestors in packfiles. However, remotes can cache packfiles, and send many objects we do not need, which wastes a lot of time in *_missing() RPC calls to the storage.

This new graph traversal goes through all objects in the packfiles we received, and computes which objects are ancestors of refs we already have (assuming all objects in the path are in the packfile).

Depends on swh-loader-core!301 (closed) and !109 (closed)

Test Plan

This needs to be tested better; bugs in this algo would create holes in the graph, which would be very bad.


Migrated from D7882 (view on Phabricator)

Merge request reports