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

Investigate moving the validate command to IDL

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Service Arch

      The validate command does not currently have access an OpMsgRequest in order to reliably access the `ValidatedTenancyScope`.  We use this to populate the SerializationContext object for building command replies, which generally happens closer to the end of the operation.  While we can currently access the `ValidatedTenancyScope` on the opCtx, this is not ideal as the `ValidatedTenancyScope` only exists on the opCtx if the thread holding this opCtx  obj processed the request at the service entry point.

      While we can currently access the `ValidatedTenancyScope` on the opCtx for the validate command, this may not necessarily be true for all commands, so Service Arch has recommended changing the currently hand-rolled command to an IDL type to take advantage of the `TypedCommand` interface, which provides access to the OpMsgRequest.  We need to check with Storage Execution if they are good with this, and investigate what it would take to port this command over, paving the way for porting other commands that may actually encounter issues with pulling the `ValidatedTenancyScope` off the opCtx.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            hugh.tong@mongodb.com Hugh Tong (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: