-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.4, 3.5, 3.6
-
Component/s: None
-
None
The following helpers raise WriteConcernError instead of the more specific WTimeoutError:
- MongoClient.drop_database
- Database.create_collection
- Database.drop_collection
- Collection.aggregate with $out
- Collection.create_index
- Collection.create_indexes
- Collection.drop_index
- Collection.rename
For example:
>>> c = MongoClient(w='majority', wtimeoutms=1) >>> c.t.create_collection("test") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "pymongo/database.py", line 377, in create_collection read_concern, session=s, **kwargs) File "pymongo/collection.py", line 181, in __init__ self.__create(kwargs, collation, session) File "pymongo/collection.py", line 260, in __create collation=collation, session=session) File "pymongo/collection.py", line 245, in _command retryable_write=retryable_write) File "pymongo/pool.py", line 515, in command collation=collation) File "pymongo/network.py", line 126, in command parse_write_concern_error=parse_write_concern_error) File "pymongo/helpers.py", line 104, in _check_command_response raise WriteConcernError(wce['errmsg'], wce['code'], wce) pymongo.errors.WriteConcernError: waiting for replication timed out
- is caused by
-
PYTHON-1101 Support sending writeConcern for commands that write
- Closed
- is depended on by
-
PYTHON-1557 Release PyMongo 3.7
- Closed