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

specifying maxTimeMS on find causes all fields to be omitted from result

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.0.5
    • Affects Version/s: 2.0
    • Component/s: None
    • Labels:

      When performing a find query using the maxTimeMS option, documents are returned without fields. The problem seems to be that specifying this option is somehow interpreted the same as specifying the fields:[] option.

      See the attached example. First try node max.js. This will return the full document with all fields. Next try node max.js 1000. This specifies the maxTimeMS: 1000 query option. Notice that the document is returned without the color property.

      Add options.fields = []; at line 21, then run node max.js 1000. Notice that the full document is now returned despite having specified the maxTimeMS option.

        1. max.js
          0.7 kB
          Alex Wolfe

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            alexkwolfe Alex Wolfe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: