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

New 7.0.6 bug: Limit code returned unexpected value

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 7.0.6
    • Component/s: None
    • Labels:
      None
    • Server Release
    • ALL
    • Hide

      Run the following script in mongosh to reproduce the error:

      db.foo.insert({x:1, y: 2})
      db.bar.insert({z: 2})
      
      db.foo.aggregate(
        {$sort:{"x": 1}},
        {$skip: 2},
        {$limit: 20},
        {$lookup:{
          from: "bar",
          localField: "y",
          foreignField: "z",
          as: "xx"
        }}
      )

       
      Result / output:

      MongoServerError[Location8349205]: Limit code returned unexpected value
      Show
      Run the following script in mongosh to reproduce the error: db.foo.insert({x:1, y: 2}) db.bar.insert({z: 2}) db.foo.aggregate( {$sort:{ "x" : 1}}, {$skip: 2}, {$limit: 20}, {$lookup:{ from: "bar" , localField: "y" , foreignField: "z" , as: "xx" }} )   Result / output: MongoServerError[Location8349205]: Limit code returned unexpected value

      I noticed a new bug with the MongoDB Community Server 7.0.6 release (Ubuntu Linux), using $sort, $skip and $lookup in an aggregation. I did not experience this bug with 7.0.5.
       
      The error when reproduced in mongosh:
       
      MongoServerError[Location8349205]: Limit code returned unexpected value

            Assignee:
            Unassigned Unassigned
            Reporter:
            iczaaa@gmail.com András Belicza
            Votes:
            1 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:
              Resolved: