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

XMLWordPrintableJSON

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

      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 (Inactive)
            Reporter:
            James Wahlin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: