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

What is the correct way to access the OperationContext in the commit method of a RecoveryUnit::Change implementation?

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.2.0-rc0
    • None
    • Storage
    • None
    • Fully Compatible
    • Execution Team 2022-09-19, Execution Team 2022-10-03

    Description

      The opCtx we were under when the handler was created is not valid during commit. What is the prescribed way to access the current opCtx? The approach we are currently using is to retrieve the opCtx from the current client:

      auto opCtx = cc().getOperationContext();

       

       

      Attachments

        Activity

          People

            henrik.edin@mongodb.com Henrik Edin
            alex.taskov@mongodb.com Alexander Taskov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: