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

Error getting the collection indexes from mongo 3.0.6

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

      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.

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

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            jlorgal Jorge Lorenzo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: