Skip to content

The description of ExponentialRetry in azure-storage-blob is inconsistent with the implementation. #18510

@katz

Description

@katz
  • Package Name: azure-storage-blob
  • Package Version: 12.8.1
  • Operating System: N/A
  • Python Version: 3.8.6

Describe the bug
https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/policies.py#L528-L532
In the description of ExponentialRetry, it says the default behavior is "the first retry occurs after 15 seconds, the second after (15+3^1) = 18 seconds".

https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/policies.py#L565
However, the calculation of backoff time is: backoff = self.initial_backoff + (0 if settings['count'] == 0 else pow(self.increment_base, settings['count']))
And, when the first retry occurs, settings['count'] is set to 1 and the backoff would be (15+3^1) = 18 seconds, which is inconsistent with the above desctiption.

Expected behavior
Modify the description or the implementation.

Metadata

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.Service AttentionWorkflow: This issue is responsible by Azure service team.StorageStorage Service (Queues, Blobs, Files)customer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions