Skip to content

After a multipart upload fails, need to clear the .cache directory #122

@pulltheflower

Description

@pulltheflower

When using the SDK to upload a large file directory, the SDK maintains a local cache that records which multipart upload parts have been successfully uploaded. However, if the uploaded parts are lost or expire on the object storage side, the SDK will still consider them uploaded according to the cache.

As a result, every subsequent attempt to upload the same directory will immediately call the "complete multipart upload" API, which continuously fails because the expected parts no longer exist on the server.

This leads to persistent errors and makes it impossible to successfully upload the directory without manual intervention.

Suggested improvement:

Introduce a mechanism to detect repeated failures of the multipart completion.

For example, if the "complete multipart upload" API fails more than 10 times, automatically clear the relevant cache for that upload, so that the SDK can restart the upload from scratch.

This would prevent the SDK from repeatedly attempting to merge non-existent parts and improve reliability for large uploads.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions