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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.6.0
    • Affects Version/s: 4.5.0
    • Component/s: None
    • 2
    • Not Needed

      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

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            daria.pardue@mongodb.com Daria Pardue
            Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: