Azure / Azure/azure-sdk-for-python

[BlobStorage] Unsafe retry on 500 OperationTimedOut error

Open
#39,615 1 comment 0 reactions 0 assignees View on GitHub
Client Service Attention Storage
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.