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

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

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Gone away
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query 2020-03-23

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: