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

Error executing aggregate with $out with "available" read concern on sharded clusters

    XMLWordPrintable

Details

    • Fully Compatible
    • ALL
    • v5.1, v5.0, v4.4
    • QE 2021-10-18
    • 15

    Description

      One of our drivers spec tests has started failing when testing against "latest" sharded clusters with the following error:

      PlanExecutor error during aggregation :: caused by :: failed while running command { internalRenameIfOptionsAndIndexesMatch: 1, from: "crud-v2.tmp.agg_out.20aa8895-2d27-49ac-ae5c-9fd62b3ba9f7", to: "crud-v2.other_test_collection", collectionOptions: {}, indexes: [ { v: 2, key: { _id: 1 }, name: "id" } ], writeConcern: { w: "majority", wtimeout: 0, provenance: "implicitDefault" } } :: caused by :: Request sent without attaching database version

       
      I'm seeing this locally and on Evergreen against the "latest" build, which is currently v5.1.0-alpha-881-g17427b8.

      I've reproduced this in mongosh as follows:

      Enterprise [mongos] test> db.outTest.insertMany([{_id: 1, x: 11}, {_id: 2, x: 22}, {_id: 3, x: 33}])
      { acknowledged: true, insertedIds: { '0': 1, '1': 2, '2': 3 } }
      Enterprise [mongos] test> db.outTest.aggregate([{$out: "outputColl"}], {readConcern: "available"})
      MongoServerError: PlanExecutor error during aggregation :: caused by :: failed while running command { internalRenameIfOptionsAndIndexesMatch: 1, from: "test.tmp.agg_out.52b84e2e-8589-4b78-9d4a-46584ebae867", to: "test.outputColl", collectionOptions: {}, indexes: [], writeConcern: { w: "majority", wtimeout: 0, provenance: "implicitDefault" } } :: caused by :: Request sent without attaching database version

       
      This seems related to the recent changes in SERVER-59756.

      Attachments

        Issue Links

          Activity

            People

              eric.cox@mongodb.com Eric Cox (Inactive)
              kaitlin.mahar@mongodb.com Kaitlin Mahar
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: