Merge pull request #1845 from coreos-inc/swift-empty-chunks
Delete empty swift chunks
This commit is contained in:
commit
8ab60640fe
1 changed files with 3 additions and 0 deletions
|
@ -287,6 +287,9 @@ class SwiftStorage(BaseStorage):
|
||||||
if bytes_written > 0:
|
if bytes_written > 0:
|
||||||
updated_metadata[_SEGMENTS_KEY].append(_PartUploadMetadata(segment_path, offset,
|
updated_metadata[_SEGMENTS_KEY].append(_PartUploadMetadata(segment_path, offset,
|
||||||
bytes_written))
|
bytes_written))
|
||||||
|
else:
|
||||||
|
# Delete the empty segment.
|
||||||
|
self.remove(segment_path)
|
||||||
|
|
||||||
return bytes_written, updated_metadata
|
return bytes_written, updated_metadata
|
||||||
|
|
||||||
|
|
Reference in a new issue