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

Error getting the collection indexes from mongo 3.0.6

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Works as Designed
    • Affects Version/s: 2.0.27, 2.0.46
    • Fix Version/s: None
    • Component/s: MongoDB 3.2
    • Labels:
    • Environment:
      Red Hat Enterprise Linux Server release 6.5 (Santiago)
      node v0.10.33
      MongoDB 3.0.6

      Description

      Our nodejs server gets all the indexes from a collection with:

      db.collection(collectionName).indexes(function onIndexes(err, mongoIndexes)

      { ... }

      This code works correctly with mongo 2.4 and 2.6, but it does not work with mongo 3.0.6. The callback returns an error:

      {"name":"MongoError","message":"no database","ok":0,"errmsg":"no database","code":26}

      I receive the same error with "listIndexes.toArray(...)". However, other operations on the collection work successfully (there is a valid connection to mongo).

      We use mongo driver "mongodb": "2.0.27", but I've just tested with the latest version as well: "mongodb": "2.0.46" getting the same results.

      NOTE: Although I've selected mongodb 3.2 as component, we actually are using mongodb 3.0.6 because that's an external requirement.

        Attachments

        1. package.json
          0.2 kB
        2. test.js
          0.4 kB

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: