summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2020-05-28 16:24:44 +0200
committerJürg Billeter <j@bitron.ch>2020-05-28 16:31:09 +0200
commit71a3639c042d79539ca27294fc210e95677484a5 (patch)
tree56935630facb891c019058747e198db4663dd8c4
parenta7b5f2ac2a2412a6f1379fba399e01892fe59b41 (diff)
downloadbuildstream-juerg/cas-send-directory.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.
-rw-r--r--src/buildstream/_cas/cascache.py8
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():
#