Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-58035

Remove db.runCommandWithMetadata from mongo shell

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: None
    • Operating System:
      ALL
    • Linked BF Score:
      43

      Description

      The db.runCommandWithMetadata shell helper was used to send messages to the server in the OP_COMMAND wire protocol message format, which has been deprecated since 3.6 (and was only used in 3.2). Currently, it takes both the "metadata" and "command body" bsonobjs that would be used to build a OP_COMMAND, and builds a single bsonobj out of both, which it then packs into an OP_MSG to send to the server as the message's body. This can generate BFs when the fuzzer generates metadata and command body bsonobjs that share a field name, as a bson with duplicate keys will then be created after these are concatenated and packed into an OP_MSG. (In invariant here will be hit when the OP_MSG is serialized in preparation of the shell sending it to the server)

      Because this helper is meant to test a protocol that has been out-of-use since 3.6, we should just remove it entirely from the shell and the fuzzer to prevent further BFs/required maintenance. This should also let us clean up a fair amount of supporting code in the shell for this function.

        Attachments

          Activity

            People

            Assignee:
            backlog-server-servicearch Backlog - Service Architecture
            Reporter:
            george.wangensteen George Wangensteen
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: