-
Type: Investigation
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Tools and Replicator
When running the `findAndModify` command against a sharded cluster, mongos could previously discard the `writeConcernError` field retrieved from a shard in case the shard response also contained an error, i.e. `
{"ok":0}`.
This was a behavior difference to how replica sets respond: replica sets will keep the `writeConcernError` field even in case the command fails with `
`.
This change adjusts the mongos response in sharded clusters so that it does not discard the `writeConcernError` field if a shard responds to a `findAndModify` command with `
`.
In case a `findAndModify` command was answered by a shard with `
`, mongos did not previously discard the `writeConcernError` field. This case thus remains unchanged.
Description of Linked Ticket
The changes for SERVER-78311 introduces mongos_noop_writes_wait_for_write_concern.js, a variant of noop_writes_wait_for_write_concern.js that goes through mongos. SERVER-78311 addresses inconsistencies that caused the update/insert commands to fail, but there are still a number of commands whose tests cases are disabled due to differing behavior.
This ticket is spawned off from SERVER-80103 to investigate/address findAndModify.
- depends on
-
SERVER-97470 findAndModify: Mongos WriteConcernError Behavior Differs from Mongod
- Closed