Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1016

Get current op on MongoDB 2.6

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.0.3
    • Affects Version/s: 1.0.1
    • None
    • Environment:
      OS: Linux
      MongoDB: 2.6

      I'm migrating a MongoDB monitoring tool from mgo to new official mongo driver.

      One of my MongoDB version uses the version 2.6 (yes I know, it's very old, and my team is migrating it)

      In my code, I'm doing a "find one" query on the "$cmd.sys.inprog" collection.

      With the old mgo library, it was working fine. With the official mongo driver, it returns an error message:

      query failure: {"$err": "bad numberToReturn (0) for $cmd type ns - can only be 1 or -1","code": {"$numberInt":"16978"}}

      I provided in attachment my old and new code.

      Any idea ?

        1. mgocurrentop.go
          0.4 kB
        2. mongocurrentop.go
          0.7 kB

            Assignee:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Reporter:
            pierrre Pierre Durand
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: