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

Sharded write commands should evaluate 'let' parameter once

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Query Execution
    • Fully Compatible
    • ALL
    • QE 2023-11-27, QE 2023-12-11, QE 2023-12-25

      Write commands that take 'let' parameters should ensure those expressions are evaluated once, instead of once per shard. For example, in a multi-update you should be able to use {let: {r: {$rand: {}}}} to pick a single random value and use it consistently when updating each document.

      SERVER-75927 fixes this for the 'find' command.

            Assignee:
            mihai.andrei@mongodb.com Mihai Andrei
            Reporter:
            david.percy@mongodb.com David Percy
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: