[SERVER-75981] Output of db.getProfilingStatus() misleadingly uses past tense Created: 11/Apr/23 Updated: 11/May/23 Resolved: 11/May/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 6.0.5, 4.4.20, 5.0.16 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Trivial - P5 |
| Reporter: | Ladan Nekuii | Assignee: | Backlog - Query Optimization |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Optimization
|
| Participants: | |
| Case: | (copied to CRM) |
| Description |
|
To view the profiling level we need to issue the following from mongosh:
The shell returns a document similar to the following:
The was field indicates the current profiling level, which is confusing and makes users think it is showing the previous level of profiling since it uses past tense.
|
| Comments |
| Comment by Anna Henningsen [ 28/Apr/23 ] |
|
david.storch@mongodb.com It’s something we could do from a technical point of view. Wouldn’t it be confusing for the output to differ from what the raw command returns though? If you feel confident that addressing this on the shell side is a good idea, feel free to open a MONGOSH ticket. |
| Comment by David Storch [ 27/Apr/23 ] |
|
anna.henningsen@mongodb.com I'm curious if this is something that you would consider fixing on the mongosh side. While we could change the response format of the command on the server side, perhaps mongosh could replace the name "was" with a more obvious name ("is" or "currentValue") on the client-side? Just an idea to avoid a potentially breaking server-side change, though it also seems plausible that we could change the response format safely on the server side. |
| Comment by Kyle Suarez [ 11/Apr/23 ] |
|
db.getProfilingStatus() is shell sugar for running the profile command with level -1 to get the current status. The implementation for this command always sets the was field with the current state. I wonder if there's anything within our own tooling that depends on this particular output format. |