Delete empty swift chunks

Fixes #1844
This commit is contained in:
Joseph Schorr 2016-09-19 11:41:20 -04:00
parent 33bfe2678b
commit 8c67ed14e8

View file

@ -287,6 +287,9 @@ class SwiftStorage(BaseStorage):
if bytes_written > 0:
updated_metadata[_SEGMENTS_KEY].append(_PartUploadMetadata(segment_path, offset,
bytes_written))
else:
# Delete the empty segment.
self.remove(segment_path)
return bytes_written, updated_metadata