FindMissingBlobs behavior in CAS proxy
LocalCasProxyInstance::FindMissingBlobs()
currently checks whether the local cache contains the specified blobs and forwards FindMissingBlobs
to the remote CAS only for the blobs that are not in the local cache. I.e., it checks which blobs are missing from both the local cache and the remote CAS.
I think this is not sufficient. FindMissingBlobs
is typically called to determine which blobs need to be uploaded to a remote CAS. It is thus important that FindMissingBlobs
returns all digests that are not in the remote CAS, even if those blobs are in the local cache. Besides allowing the client to check which blobs are on the remote CAS, this also ensures that expiry is working properly on the remote CAS.
I.e., we must always forward the complete FindMissingBlobs
call to the remote CAS.
After the forwarded FindMissingBlobs
I'd suggest to implicitly upload any blobs that are missing from the remote CAS but are available locally.