Correctness: KeyPool backoff calculation can overflow on very old failures #100
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_aibroker#100
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Low
Location
crates/hero_aibroker_lib/src/providers/keypool.rs— backoff calculationFinding
The exponential backoff calculation uses the time since last failure:
While
saturating_powprevents overflow, a key with 30+ consecutive failures gets a backoff ofbase * 2^30which is ~536 billion ms (~17 years) at a 1ms base.Impact
Recommendation