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

libmongodb_capi errors when aggregating with $out

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.0.0-rc0
    • None
    • None
    • Fully Compatible
    • Platforms 2018-05-21

    Description

      Running the following command via the embedded java driver: 

      { "aggregate" : "com.mongodb.embedded.client.CrudTest", "pipeline" : [{ "$sort" : { "x" : 1 } }, { "$match" : { "_id" : { "$gt" : 1 } } }, { "$out" : "other_test_collection" }], "cursor" : { }, "$db" : "JavaDriverTest", "$readPreference" : { "mode" : "primaryPreferred" } } 

      Throws a:

      { "ok" : 0.0, "errmsg" : "insert for $out failed: { ok: 0.0, errmsg: "no such command: 'getlasterror'", code: 59, codeName: "CommandNotFound" }", "code" : 16996, "codeName" : "Location16996" }

      The server logging callback returns:

      11:07:23.359 [main] INFO  org.mongodb.driver.embedded.server - STORAGE   [initandlisten] createCollection: JavaDriverTest.tmp.agg_out.1 with generated UUID: a57bc19d-7ee9-4495-8a00-16100e35d91d
      11:07:23.375 [main] INFO  org.mongodb.driver.embedded.server - COMMAND   [initandlisten] CMD: drop JavaDriverTest.tmp.agg_out.1
      11:07:23.375 [main] INFO  org.mongodb.driver.embedded.server - STORAGE   [initandlisten] Finishing collection drop for JavaDriverTest.tmp.agg_out.1 (a57bc19d-7ee9-4495-8a00-16100e35d91d). 

      Attachments

        Activity

          People

            henrik.edin@mongodb.com Henrik Edin
            ross@mongodb.com Ross Lawley
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: