Skip to content

Exponential retry policy takes a parameter "increment_power" but seems to actually mean "increment_base" #412

@matthchr

Description

@matthchr

For example:
When setting up a retry policy like so:

azure.storage.common.ExponentialRetry(
                initial_backoff=3,
                increment_power=2,
                max_attempts=3)

This sounds like it will result in a retry sequence of: {3, 3 + 1^2, 3 + 2^2} (since increment_power is 2, the powers/exponents are all 2). In reality it generates a sequence {3, 3 + 2^1, 3 + 2^2}

Luckily, this is all clarified by the documentation here:

Constructs an Exponential retry object. The initial_backoff is used for

Still, it would be more clear if this were called increment_base rather than increment_power since the "power"/exponent is actually n (number of retries) and is not configurable by the user.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions