[GODRIVER-1114] RunCommandCursor always fails and returns an error message referencing internal driver details Created: 05/Jun/19 Updated: 28/Oct/23 Resolved: 20/Jun/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Command & Dispatch |
| Affects Version/s: | 1.1.0 |
| Fix Version/s: | 1.1.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Aaron Szymanski | Assignee: | Emmanuel Eppinger (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Example code:
This simpler example fails in the same way:
Error:
It's quite possible that i'm just doing something wrong. In which, case the bug is just that the error message does not indicate what I did wrong. However, im pretty sure there's a real bug here preventing this from working. I see that `RunCommandCursor` calls `ResultCursor`, which calls `NewCursorResponse` with `c.result`. `c.result` only appears to ever be set by `Execute` which, is never called. `NewCursorResponse` then returns the above error when it tries to verify the type of the "cursor" field on a nil document. |
| Comments |
| Comment by Jacob Bills [ 13/May/23 ] |
|
Just ran into this issue as well and its 2023 |
| Comment by Githook User [ 21/Jun/19 ] |
|
Author: {'name': 'Emmanuel', 'email': 'manny.eppinger@mongodb.com', 'username': 'eppingere'}Message: Fix command cursors so that they are able to accept commands Change-Id: I9ccced4ccc5fac5ed972954d5249e4b3b5d37c8e |
| Comment by Emmanuel Eppinger (Inactive) [ 20/Jun/19 ] |
|
https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/457956 |
| Comment by Emmanuel Eppinger (Inactive) [ 13/Jun/19 ] |
| Comment by Emmanuel Eppinger (Inactive) [ 13/Jun/19 ] |
|
https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/457956 |
| Comment by Emmanuel Eppinger (Inactive) [ 13/Jun/19 ] |
|
https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/457956 |
| Comment by Emmanuel Eppinger (Inactive) [ 12/Jun/19 ] |
|
So a fix is in the works but just as a heads up the command that you run must return a cursor. Ping doesn't return a cursor so that will always return an error. |