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

Only register/deregister opCtx with the Scope during reattach/detach

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Query 2020-03-23

      Currently, every time we call a JS function on a Scope, the Scope reregisters itself on the OperationContext, and then deregisters itself before returning. In a typical query this might happen many times on the same OperationContext. It seems like it would be simpler to only register/deregister once.

      We have a similar mechanism already, called reattachToOperationContext() / detachFromOperationContext(), so let's try using that hook to register and deregister the Scope as well.

            Assignee:
            david.percy@mongodb.com David Percy
            Reporter:
            james.wahlin@mongodb.com James Wahlin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: