[SERVER-45512] mongod uses of completeAndLogOperation call shouldDBProfile twice Created: 13/Jan/20 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Querying, Write Ops |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kevin Pulo | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | qexec-team | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Execution
|
| Participants: |
| Description |
|
completeAndLogOperation() returns the result of calling shouldDBProfile(shouldSample). However, the mongod callers of this function, which are in service_entry_point_common and write_ops_exec, take the result and pass it into shouldDBProfile() again. (The mongos callers in service_entry_point_mongos ignore the result, since profiling isn't possible on mongos.) Either completeAndLogOperation() should return only shouldSample, or the mongod callers of completeAndLogOperation() should just use the result directly and refrain from calling shouldDBProfile(). |