[GODRIVER-1016] Get current op on MongoDB 2.6 Created: 03/May/19 Updated: 28/Oct/23 Resolved: 05/Jun/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Administrative Commands |
| Affects Version/s: | 1.0.1 |
| Fix Version/s: | 1.0.3 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Pierre Durand | Assignee: | Divjot Arora (Inactive) |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
OS: Linux |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
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 ? |
| Comments |
| Comment by Pierre Durand [ 06/Jun/19 ] |
|
Thank you for the fix, I'll test tomorrow ! |
| Comment by Githook User [ 29/May/19 ] |
|
Author: {'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com', 'username': 'divjotarora'}Message: Change Find and FindOne to use FindOperation Change-Id: I1ab89cc11921e1d3158f263dbe19b24f1ca2de9e |
| Comment by Divjot Arora (Inactive) [ 24/May/19 ] |
|
CR: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/455709 |
| Comment by Ian Whalen (Inactive) [ 23/May/19 ] |
|
note to implementer: we should set a limit of -1 when doing a findOne. this will likely happen in |