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

Cursor options tailable and awaitData are not really boolean.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.4
    • Affects Version/s: 1.3
    • Component/s: None
    • Environment:
      ubuntu: 12.04 LTS
      node: 0.10.22
      mongodb module: 1.3.19
      mongodb server: 2.4.8 git version: a350fc38922fbda2cec8d5dd842237b904eafc14

      The cursor options tailable and awaitData are documented as boolean but they are actually active if not null.
      var cursor = find({},

      {tailable: false, awaitData: false}

      );
      is the same as
      var cursor = find({},

      {tailable: true, awaitData: true}

      );

      I was exploring error handling behavior in a test and toggling awaitData from true to false had no effect. The mongodb module code checks if options.awaitData != null. Same thing with tailable.

      Work around:
      To turn these options off, you need to set them to null or not include them in your options object at all.

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            sbeaule Stéphane Beaulé
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: