Azure / Azure/azure-sdk-for-python
[BlobStorage] Unsafe retry on 500 OperationTimedOut error
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 3.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 193
Description
- **Package Name**: azure-storage-blob (and probably other storage packages)
- **Package Version**: latest
- **Operating System**: Any
- **Python Version**: Any
**Describe the bug**
The Python SDK will retry a 500 status with error code OperationTimedOut.
https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/policies.py#L87-L93
According to the REST API docs, this retry is unsafe:
https://learn.microsoft.com/en-us/rest/api/storageservices/common-rest-api-error-codes
This issue can result in data corruption:
https://github.com/Azure/azure-sdk-for-go/issues/24027
Contributor guide
Assessment
This issue has not been assessed yet.