Uploaded image for project: 'PHP Legacy Driver'
  1. PHP Legacy Driver
  2. PHP-1510

Route unacknowledged writes through legacy op codes

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.6.13
    • Fix Version/s: 1.6.14
    • Component/s: pecl-mongo
    • Labels:
      None
    • # Replies:
      10
    • Last comment by Customer:
      false

      Description

      Proposed conditional for electing to use a write command:

      if (supports_command && (is_acknowledged || !supports_opcode)) {
          /* do write command */
      } else if (supports_opcode) {
          /* do opcode */
      } else {
          /* error (i.e. "Cannot determine how to write documents to the server") */
      }
      

      Truth table:

      is_acknowledged supports_command supports_opcode use_command
      T T T T
      T T F T
      T F T F
      T F F F
      F T T F
      F T F T
      F F T F
      F F F F

      This would change existing behavior, which uses write commands whenever they are supported, to only use them when:

      • supported and GLE
      • supported and not GLE, but only if opcodes are not supported

      The last case is not likely, but may come up if a future version of the server decides to drop support for legacy opcodes.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jmikola Jeremy Mikola
              Reporter:
              jmikola Jeremy Mikola
              Participants:
              Last commenter:
              Rathi Gnanasekaran
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since reply:
                4 years, 6 weeks, 1 day ago
                Date of 1st Reply: