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

putio: fix sync deletions failing with 400 TRASH_LOCK_TIMEOUT errors

Nick Craig-Wood74d376a7fed9
diff --git a/backend/putio/error.go b/backend/putio/error.go
index 194315f53..934814a54 100644
--- a/backend/putio/error.go
+++ b/backend/putio/error.go
@@ -44,6 +44,12 @@ func shouldRetry(ctx context.Context, err error) (bool, error) {
return false, nil
}
if perr, ok := err.(*putio.ErrorResponse); ok {
+ // put.io serializes trash operations per account, so
+ // concurrent deletes can fail with a 400
+ // TRASH_LOCK_TIMEOUT error which deserves a retry.
+ if perr.Type == "TRASH_LOCK_TIMEOUT" {
+ return true, err
+ }
err = &statusCodeError{response: perr.Response}
}
if scerr, ok := err.(*statusCodeError); ok && scerr.response.StatusCode == 429 {