Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

swift: speed up deletes by not retrying segment container deletes

Nick Craig-Wood0dba7b8a46a1
diff --git a/backend/swift/swift.go b/backend/swift/swift.go
index c86532281..394f40d1e 100644
--- a/backend/swift/swift.go
+++ b/backend/swift/swift.go
@@ -1124,6 +1124,9 @@ func (o *Object) removeSegments(except string) error {
// remove the segments container if empty, ignore errors
err = o.fs.pacer.Call(func() (bool, error) {
err = o.fs.c.ContainerDelete(segmentsContainer)
+ if err == swift.ContainerNotFound || err == swift.ContainerNotEmpty {
+ return false, err
+ }
return shouldRetry(err)
})
if err == nil {