Retry backoff jitter interval should include 1.0

XMLWordPrintableJSON

    • Type: Spec Change
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Component/s: Transactions
    • None
    • Needed

      Summary

      In the ClientSession.withTransaction retry backoff algorithm, jitter is defined like so (code):

      jitter is a random float between [0, 1)

      The closing parenthesis implies this interval does not include 1. However, the prose test requires using jitter values of exactly 1 (code):

      Configure the random number generator used for jitter to always return 1.

      For the sake of correctness, jitter should be defined as a random float in the interval [0, 1]. Including 1 will almost certainly not matter in practice. Additionally, this is easier to implement and most drivers probably implement jitter like this already.

      Motivation

      Who is the affected end user?

      This is a correctness issue. End users are basically unaffected.

      How does this affect the end user?

      This has almost no effect on the end user.

      How likely is it that this problem or use case will occur?

      This is an extreme edge case that should not make any difference in practice.

      If the problem does occur, what are the consequences and how severe are they?

      There are basically no consequences.

      Is this issue urgent?

      No.

      Is this ticket required by a downstream team?

      No.

      Is this ticket only for tests?

      More or less. This makes the tests spec compliant. 

      Acceptance Criteria

      The ) is changed to a ].

            Assignee:
            Dmitry Rybakov
            Reporter:
            Connor MacDonald
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: