-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Platforms 2018-05-21
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).