Reimplement cache support for blobs in the registry data model

This commit is contained in:
Joseph Schorr 2018-10-04 16:09:56 -04:00
parent 7a68c41f1c
commit a172de4fdc
7 changed files with 109 additions and 16 deletions

View file

@ -282,7 +282,7 @@ def lookup_repo_storages_by_content_checksum(repo, checksums):
candidate_subq = (ImageStorage
.select(ImageStorage.id, ImageStorage.content_checksum,
ImageStorage.image_size, ImageStorage.uuid, ImageStorage.cas_path,
ImageStorage.uncompressed_size)
ImageStorage.uncompressed_size, ImageStorage.uploading)
.join(Image)
.where(Image.repository == repo, ImageStorage.content_checksum == checksum)
.limit(1)