Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-45512

mongod uses of completeAndLogOperation call shouldDBProfile twice

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying, Write Ops
    • Query Execution

      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().

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            kevin.pulo@mongodb.com Kevin Pulo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: