You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ro...@apache.org on 2020/12/29 13:41:45 UTC

[buildstream] branch coldtom/contains_files-fix created (now 1860e4e)

This is an automated email from the ASF dual-hosted git repository.

root pushed a change to branch coldtom/contains_files-fix
in repository https://gitbox.apache.org/repos/asf/buildstream.git.


      at 1860e4e  cascache: Use local CAS for contains_files

This branch includes the following new commits:

     new 1860e4e  cascache: Use local CAS for contains_files

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[buildstream] 01/01: cascache: Use local CAS for contains_files

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

root pushed a commit to branch coldtom/contains_files-fix
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 1860e4efb00cc2f1105a7c4bf8c3c1b875f17e9f
Author: Thomas Coldrick <th...@codethink.co.uk>
AuthorDate: Wed May 27 14:37:12 2020 +0100

    cascache: Use local CAS for contains_files
    
    Currently `CASCache.contains_files()` polls the remote CAS rather than
    the local one. This leads to the function not doing what it says it
    does, and also causes excessive polling of the remote CAS every time we
    want to check whether an artifact is cached.
---
 src/buildstream/_cas/cascache.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/buildstream/_cas/cascache.py b/src/buildstream/_cas/cascache.py
index 74912c4..e3eed6d 100644
--- a/src/buildstream/_cas/cascache.py
+++ b/src/buildstream/_cas/cascache.py
@@ -175,12 +175,12 @@ class CASCache:
     # Returns: True if the files are in the cache, False otherwise
     #
     def contains_files(self, digests):
-        cas = self.get_cas()
+        local_cas = self.get_local_cas()
 
-        request = remote_execution_pb2.FindMissingBlobsRequest()
+        request = remote_execution_pb2.FetchMissingBlobsRequest()
         request.blob_digests.extend(digests)
 
-        response = cas.FindMissingBlobs(request)
+        response = local_cas.FetchMissingBlobs(request)
         return len(response.missing_blob_digests) == 0
 
     # contains_directory():