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

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



    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.7.0
    • manual, Server
    • None
    • 5
    • ServerDocs2020: Sep28 - Oct5, ServerDocs2020: Oct5 - Oct12, ServerDocs2020: Oct13 - Oct19, ServerDocs2020: Oct20 - Oct27, ServerDocs2020: Oct27 - Nov3, ServerDocs2020: Nov3 - Nov 10, ServerDocs2020: Nov10 - Nov 17



      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.)


        Issue Links



              jason.price@mongodb.com Jason Price
              backlog-server-pm Backlog - Core Eng Program Management Team
              Jess Mokrzecki Jess Mokrzecki
              0 Vote for this issue
              2 Start watching this issue


                2 years, 46 weeks, 5 days ago