[SERVER-10079] Cannot use $query together with $comment Created: 02/Jul/13 Updated: 06/Dec/22 Resolved: 05/Jul/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Johnny Boy | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | query-44-grooming | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
I wanted to use the special $comment field with pymongo for adding generic information about what code triggered the query. To do this you need to do collection.find( {"$query": ..., "$comment": ...}). Same goes for the cli. This makes the usability of $comment much more complicated since you need to keep track of when your code might count on the cursor. |
| Comments |
| Comment by David Storch [ 05/Jul/19 ] |
|
This ticket is referring to some oddities around the old OP_QUERY wire format for find operations. The modern way to express such operations, which all currently supported drivers use, is a find command using the OP_MSG wire protocol format. The find command supports the comment parameter in combination with all other options. Closing this ticket as Won't Do. |