-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.7.3
-
Component/s: Sharding
-
None
-
ALL
Sending the create command with a nonsensical write concern to a 3.7 replica set with three members results in a write concern error:
>>> c = pymongo.MongoClient() >>> c.foo.command('create', 'bar', writeConcern={'w': 1000}) {'ok': 1.0, 'operationTime': Timestamp(1518570804, 1), 'writeConcernError': {'codeName': 'CannotSatisfyWriteConcern', 'errmsg': 'Not enough data-bearing nodes', 'code': 100}, '$clusterTime': {'signature': {'keyId': 0, 'hash': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'}, 'clusterTime': Timestamp(1518570804, 1)}} >>> c.admin.command('buildInfo')['version'] '3.7.1-370-gfab8bda846'
Sending the same command to a mongos in front of a single three member shard does not cause a write concern error:
>>> c = pymongo.MongoClient() >>> c.foo.command('create', 'bar', writeConcern={'w': 1000}) {'ok': 1.0, '$clusterTime': {'signature': {'keyId': 0, 'hash': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'}, 'clusterTime': Timestamp(1518571939, 3)}, 'operationTime': Timestamp(1518571939, 2)} >>> c.admin.command('buildInfo')['version'] '3.7.1-370-gfab8bda846'
- is depended on by
-
PYTHON-1470 Fix test_collection.TestCollection.test_create for MongoDB 3.7
- Closed
- is related to
-
SERVER-33332 mongos create command should preserve wtimeout option given by user
- Closed
-
SERVER-34776 dropDatabase should respect user provided writeConcern
- Closed