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

Replace explicit instantiation of OperationContextImpl with cc().makeOperationContext()

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.5
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
      None
    • Fully Compatible
    • Sharding 13 (04/22/16)
    • 0

      Rather than instantiating OperationContextImpl directly on the stack and letting its constructor use thread-local variables to initialize itself, tests and other code needing an OperationContext should construct it from the current thread's client object, via cc().makeOperationContext(). This is more consistent with the Service/Client/Operation software architecture in place, and is what mongod and mongos user operations already do.

            Assignee:
            schwerin@mongodb.com Andy Schwerin
            Reporter:
            schwerin@mongodb.com Andy Schwerin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: