Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-13620

Investigate changes in SERVER-46708: Support 'let' variables in update command

      Description

      Downstream Change Summary

      This patch allows users to specify let variables in update commands, through
      both a top-level request parameter ('let') and a parameter ('c') for each update in the batch request. This currently focuses on unsharded deployments, with work on sharded environments to come in another ticket.

      Description of Linked Ticket

      Replace the 'runtimeConstants' support with the new 'let' syntax from the aggregate command in the update command. Similar to how that works, we should support both a top-level 'let' parameter to the update request and also a parameter for each update in the batch request. For now, let's stick with the name 'c' for the constants for each update in the batch, though we may revisit this name later.

      Note that we will have to preserve support for 'runtimeConstants' for compatibility during upgrade. There will be a problem where an internal update request built on behalf of $merge will need to specify variables. This is done here. It's important for those variables/constants to be serialized as runtimeConstants, again for compatibility during upgrade. I would recommend making this work as part of this ticket, but if it becomes obvious how to split it into follow-up work we should do that.

      For this work, focus only on unsharded deployments.

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

            Assignee:
            jason.price@mongodb.com Jason Price
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              3 years, 23 weeks, 5 days ago