Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1149

mongosh is dropping the ADL { background: true} argument to $out aggregation

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: Shell API
    • Labels:
      None
    • Environment:
      Connected to an Atlas Data Lake.
    • Not Needed

      Problem Statement/Rationale

      What is going wrong? What action would you like the Engineering team to take?
      Atlas Data Lake, when using $out, supports running the operation in the background to support large $out operations that exceed timeouts in the infrastructure. We use background: true to do this. Check out the documentation on it here.

      Steps to Reproduce

      How could an engineer replicate the issue you’re reporting?
      Try connecting to a data lake (you can make one in Atlas). Connect it to an Atlas cluster source (this is not necessary, as this bug will reproduce any time you use background: true with $out, but using Atlas data sources is simpler than hooking up S3). Try running a $out as described in the above docs link with background: true in both shells. Try running it on a reasonably large collection so that the command take some time to run.

      The legacy shell will immediately return from the command and give you a prompt again. The command is running in the background on the ADL servers.

      Mongosh will be stuck on the command waiting for it to return, as usual, despite the presence of background: true.

      Expected Results

      What do you expect to happen?
      background: true should be honored as it is in mongo.

      Actual Results

      What do you observe is happening?
      It is dropped, likely because it is an extra?

      Additional Notes

      Any additional information that may be useful to include.
      Here is an example query that reproduces it:

      db.atlascoll.aggregate([{"$out": {"atlas": {"projectId": "5dd5e901f10fab59f2aa4207", "clusterName": "adl-testing-auto-upgrade", "db": "mayhoquetest", "coll": "outtest"}}}], { background: true })
      

      I've also linked this ticket to HELP-32055, which ran into this issue. See the discussion in the comments.

      Feel free to reach out to me or the Atlas Data Lake team if you have questions!!!

            Assignee:
            Unassigned Unassigned
            Reporter:
            may.hoque@mongodb.com May Hoque
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: