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

$out incorrectly throws BSONObj size error on v5.0.8

    XMLWordPrintable

Details

    • Fully Compatible
    • ALL
    • v6.0, v5.0, v4.4
    • Hide

      Steps followed:

      1. Launch M10 cluster on Atlas and load sample dataset.
      2. In the shell, use sample_mflix db
      3. Run aggregation command: db.movies.aggregate([{$out: "movies2"}])

       

      On version 4.4.13:

      The command runs successfully and movies2 collection is created.

       

      On version 5.0.8:

      The command fails with the error:

      PlanExecutor error during aggregation :: caused by :: BSONObj size: 16836845 (0x100E8ED) is invalid. Size must be between 0 and 16793600(16MB) First element: insert: "tmp.agg_out.045d5052-e014-4830-8d16-5b985ebfc46e"

      Show
      Steps followed: Launch M10 cluster on Atlas and load sample dataset. In the shell, use sample_mflix db Run aggregation command: db.movies.aggregate( [{$out: "movies2"}] )   On version 4.4.13: The command runs successfully and movies2 collection is created.   On version 5.0.8: The command fails with the error: PlanExecutor error during aggregation :: caused by :: BSONObj size: 16836845 (0x100E8ED) is invalid. Size must be between 0 and 16793600(16MB) First element: insert: "tmp.agg_out.045d5052-e014-4830-8d16-5b985ebfc46e"
    • QE 2022-05-30, QE 2022-06-13, QE 2022-06-27, QE 2022-07-11, QE 2022-07-25, QE 2022-08-08, QE 2022-08-22
    • 170

    Description

      In version 5, aggregation with $out as final stage is throwing BSONObj size (16MB) error even though individual documents are much smaller. It seems to be measuring the total size of all the documents in the result set.

      Attachments

        1. screenshot-1.png
          screenshot-1.png
          27 kB
        2. screenshot-2.png
          screenshot-2.png
          36 kB
        3. screenshot-3.png
          screenshot-3.png
          76 kB

        Issue Links

          Activity

            People

              mihai.andrei@mongodb.com Mihai Andrei
              awanish@assetplus.io Awanish Raj
              Votes:
              2 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: