The implementation of $out involves calling several sub-routines like creating a temporary collection, getting the index and collection options, doing the inserts, and renaming the collection into place. In SERVER-45968 we verified these work correctly in a replica set deployment, but we have separate implementations of these helpers on a shard server, which should similarly attach writeConcern.
SERVER-45968 wrote a javascript integration test which verifies the aggregate and $out machinery above this layer will propagate the error appropriately to the client. As such, it's probably sufficient to just write unit tests to verify the remote requests all have the appropriate writeConcern attached. Another javascript test would also be acceptable though if unit testing proves difficult.
- duplicates
-
SERVER-45968 Test behavior of $merge/$out on secondaries with writeConcern
- Closed
- is related to
-
SERVER-44979 MongoInterfaceShardServer must check result of getDatabase
- Closed
-
SERVER-44897 Remove DBDirectClient from process_interface_standalone createIndexes
- Closed