Update handshake spec to allow using OP_MSG exclusively

XMLWordPrintableJSON

    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      NODE-6287 Backlog
      CDRIVER-6231 Backlog
      CXX-3412 Backlog
      CSHARP-5865 Backlog
      GODRIVER-3807 Backlog
      JAVA-6088 Backlog
      PYTHON-5713 Fixed 4.18.0
      PHPLIB-1780 Blocked
      RUBY-3766 Backlog
      RUST-2355 Works as Designed
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } #scriptField td.willNotDo { background-color: #FF0000; /* Red color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion NODE-6287 Backlog CDRIVER-6231 Backlog CXX-3412 Backlog CSHARP-5865 Backlog GODRIVER-3807 Backlog JAVA-6088 Backlog PYTHON-5713 Fixed 4.18.0 PHPLIB-1780 Blocked RUBY-3766 Backlog RUST-2355 Works as Designed

      Summary

      The handshake spec requires drivers to use OP_QUERY for the initial handshake if not connecting to a load balancer and not specifying an API version:

      If server API version is not requested and loadBalanced: False, drivers MUST use legacy hello for the first message of the initial handshake with the OP_QUERY protocol (before switching to OP_MSG if the maxWireVersion indicates compatibility), and include helloOk:true in the handshake request.

      Motivation

      The initial handshake is the only place where OP_QUERY is still used; all subsequent operations (e.g. findOne/find operations, command executions, and hello calls for monitoring) will always use OP_MSG as every server we connect to supports it. Making this spec change would thus allow drivers to remove their legacy OP_QUERY and OP_REPLY logic entirely and only support OP_MSG going forward.

      Furthermore, the server still supports OP_QUERY due to drivers sending the initial handshake with that opcode. Once the change is rolled out across all drivers, we can start the process of deprecating OP_QUERY to eventually remove it from the server.

      Acceptance Criteria

      With support for MongoDB 3.4 gone, we now only support servers that support OP_MSG. The handshake spec should thus be updated:

      • Drivers MUST use OP_MSG if their minWireVersion is 6 (MongoDB 3.6) or higher (which is all drivers now!)

            Assignee:
            Iris Ho
            Reporter:
            Andreas Braun
            Jib Adegunloye Jib Adegunloye
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: