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

Remove db.runCommandWithMetadata from mongo shell

    • Fully Compatible
    • ALL
    • v5.0
    • Service Arch 2021-12-13, Service Arch 2022-1-10
    • 142

      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.

            blake.oler@mongodb.com Blake Oler
            george.wangensteen@mongodb.com George Wangensteen
            0 Vote for this issue
            5 Start watching this issue