ServerParameter onUpdate handlers should accept OperationContext

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Server Programmability
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The callback registered for an IDL on_update definition currently only receives the updated value of the server parameter. When the update is performed as the result of a setParameter command, users need to use the following pattern:

       if (auto client = Client::getCurrent()) { 
           ... get the svxCtx or opCtx from client and use it
       }
       return Status::OK();

       Since the update handler is being invoked from a command, we already have a client and an OperationContext for the command, and we should pass that in to the handler. 

              Assignee:
              Unassigned
              Reporter:
              Matt Broadstone
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: