Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4156

Comment should not be applied to list* operations for server versions <4.4

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • 4.5.0
    • 4.6.0
    • None
    • None
    • 2
    • Not Needed

    Description

      The spec says that we should not send comments on server versions <4.4 for listIndexes, listDatabases, and listCollections operations. However, we have a bug in the `CommandOperation` class that will apply the comment to any command as long as it's of type "string", which overrides any operation-specific filtering of comments that is done prior to invoking executeCommand.

      We missed this in testing because our custom format tests did not use the `comment:

      { $$exists: false }

      ` assertion in the corresponding event checks.

      AC

      • Remove the override logic in command.ts
      • Fix tests to correctly assert the nonexistence of the property

      Attachments

        Activity

          People

            neal.beeken@mongodb.com Neal Beeken
            daria.pardue@mongodb.com Daria Pardue
            Bailey Pearson Bailey Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: