Skip to content

Potentially lose precision and jitter is not well capped #35136

@NeatGuyCoding

Description

@NeatGuyCoding

The jitter ratio calculation could throw an ArithmeticException if spec.delay().toMillis() returns 0. Additionally, converting to milliseconds may lose precision for sub-millisecond delays.

Retry retry = Retry.backoff(spec.maxAttempts(), spec.delay())
	.jitter((double) spec.jitter().toMillis() / spec.delay().toMillis())
	.multiplier(spec.multiplier())
	.maxBackoff(spec.maxDelay())

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)status: supersededAn issue that has been superseded by anothertype: bugA general bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions