Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2695

Errata in pseudo code for retryable writes specification

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Component/s: CSOT
    • Not Needed

      Summary

      What is the problem or use case, what are we trying to achieve?

      Multiple errata have been discovered in the pseudo code for the retryable writes specification.

      1. originalError is not defined, but it is used in multiple blocks, such as:

            if (currentError is not DriverException && ! originalError.hasErrorLabel("NoWritesPerformed")) {
              previousError = currentError;
            } 

      2. The following case is not handled in the pseudo code:

          - CSOT is not enabled and one retry was attempted.

      3. Syntax error, specifically a missing parenthesis here:

          /* CSOT is enabled and the operation has timed out. */
          if (timeoutMS != null && isExpired(timeoutMS) {
            throw previousError;
          }

       

      Motivation

      Who is the affected end user?

      Who are the stakeholders?
      This affects the readers of the specification because the pseudo code disagrees with the prose spec.

      How does this affect the end user?

      Are they blocked? Are they annoyed? Are they confused?
      As far as I know this is not a blocker – rather a point of confusion.

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

      Main path? Edge case?

      This problem will only occur for driver developers who are very closely inspecting the specification, perhaps during implementation or when debugging this path in a driver.

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

      Minor annoyance at a log message? Performance concern? Outage/unavailability? Failover can't complete?

      Worst case scenario is inconsistencies in how drivers handle retryable writes due to ambiguities in the pseudo code for the specification.

      Is this issue urgent?

      Does this ticket have a required timeline? What is it?

      Not urgent, no timeline.

      Is this ticket required by a downstream team?

      Needed by e.g. Atlas, Shell, Compass?

      No

      Is this ticket only for tests?

      Does this ticket have any functional impact, or is it just test improvements?

      No, just the specification pseudo code.

      Acceptance Criteria

      What specific requirements must be met to consider the design phase complete?

      The prose spec and the pseudo code spec need to logically agree with each other and syntax errors and variable initialization needs to be fixed.

            Assignee:
            qingyang.hu@mongodb.com Qingyang Hu
            Reporter:
            kyle.kloberdanz@mongodb.com Kyle Kloberdanz (Inactive)
            Shane Harvey Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: