Have Swift storage delete segments when deleting dynamic large objects
This ensures that we reclaim the space, rather than simply deleting the manifest Fixes https://jira.coreos.com/browse/QUAY-942
This commit is contained in:
parent
66b4e45929
commit
57523d22de
3 changed files with 105 additions and 36 deletions
|
@ -20,6 +20,10 @@ class ChunkCleanupWorker(QueueWorker):
|
|||
storage_location = job_details['location']
|
||||
storage_path = job_details['path']
|
||||
|
||||
if not storage.exists([storage_location], storage_path):
|
||||
logger.debug('Chunk already deleted')
|
||||
return
|
||||
|
||||
try:
|
||||
storage.remove([storage_location], storage_path)
|
||||
except IOError:
|
||||
|
|
Reference in a new issue