diff options
author | Jürg Billeter <j@bitron.ch> | 2020-05-28 16:24:44 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2020-05-28 16:31:09 +0200 |
commit | 71a3639c042d79539ca27294fc210e95677484a5 (patch) | |
tree | 56935630facb891c019058747e198db4663dd8c4 /src/buildstream | |
parent | a7b5f2ac2a2412a6f1379fba399e01892fe59b41 (diff) | |
download | buildstream-71a3639c042d79539ca27294fc210e95677484a5.tar.gz |
cascache.py: Drop unnecessary FindMissingBlobs from _send_directory()juerg/cas-send-directory
buildbox-casd `UploadMissingBlobs` will call `FindMissingBlobs` before
the actual upload. Having BuildStream call `FindMissingBlobs` as well
adds unnecessary overhead.
Diffstat (limited to 'src/buildstream')
-rw-r--r-- | src/buildstream/_cas/cascache.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/buildstream/_cas/cascache.py b/src/buildstream/_cas/cascache.py index 8df0c4640..9394ac5b2 100644 --- a/src/buildstream/_cas/cascache.py +++ b/src/buildstream/_cas/cascache.py @@ -691,10 +691,12 @@ class CASCache: batch.send() def _send_directory(self, remote, digest): - missing_blobs = self.remote_missing_blobs_for_directory(remote, digest) + required_blobs = self.required_blobs_for_directory(digest) - # Upload any blobs missing on the server - self.send_blobs(remote, missing_blobs) + # Upload any blobs missing on the server. + # buildbox-casd will call FindMissingBlobs before the actual upload + # and skip blobs that already exist on the server. + self.send_blobs(remote, required_blobs) # get_cache_usage(): # |