-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Cluster Scalability
-
ALL
Some write commands run on sharded collections return different values compared to replica-sets. See the TODOs in jstests/libs/write_commands.js as they are tested via jstests/sharding/mongos_writes_wait_for_write_concern.js – tests written in SERVER-80103.
- Duplicate 'update', mongos returns n:0. In replica-set, returns n:1.
- 'update' on multiple docs, mongos returns n:0, nModified:0. In replica-set, returns n:2, nModified:2.
- 'createIndexes' where index already exists, mongos returns numIndexesAfter:2. In replica-set, returns numIndexesAfter:1.
- 'insert' where document with same _id already exists, mongos returns n:1. In replica-set, returns n:0 and writeErrors:DuplicateKey.
- 'findAndModify' where the update violates unique index or attempts to change immutable field, mongos returns ok:1. In unsharded coll and replica-set, returns IllegalOperation or ImmutableField error.
- related to
-
SERVER-80103 Mongos WriteConcernError Behavior Differs from Mongod
- Closed