Transient errors inside transaction unpins the session.
Add brief docs about sharded transactions and add 3.9 changelog.
Tests changes:
Add spec tests for sharded transaction recoveryToken.
Speed up txn tests by reducing SDAM waiting time after a network error.
Remove outdated test workaround for killAllSessions.
In a sharded transaction, a session is pinned to the mongos server
selected for the initial command. All subsequent commands in the same
transaction are routed to the pinned mongos server.
Return proper BulkWriteResult after a retryable write succeeds.
Reduce retryable writes test suite time from 90 to 30 seconds by
reducing the heartbeat interval.
Ordered op_insert should check for errors on the last insert.
Use _Bulk API for Collection.insert.
Avoid sending acknowledged inserts as much as possible.
max_cmd_size already accounts for trailing null bytes.
This commit add the pymongo.collation.Collation class and associated enums. A
collation may be sent with individual write operations when connected to MongoDB
3.4+. Unlike read and write concern, a collation may not be attached to a
database or collection instance.
This change removes the u() helper from bson.py3compat
and all of its uses in the driver and tests. PyPy3 continues
to be supported since, even though it is based on python 3.2.5,
it has always supported the u string prefix.
The README and install docs are now explicit about PyPy(3) support.
This commit implements the following simplifications and improvements:
- The Subscriber ABC has been renamed to CommandListener
- The subscribe function has been renamed to register
- The COMMAND constant has been removed
- The get_subscribers function has been removed
- Command listeners can now be registered per MongoClient instance
instead of just globally
This change adds monitoring of bulk write operations (i.e.
Collection.bulk_write, Collection.insert_many, Collection.insert with multiple
documents, Bulk.execute, etc.). It also fixes bugs in conversion of legacy
write results to write command result format and conversion of legacy queries
to find command documents. Finally, it adds an operation_id attribute to the
published events to tie related events together.
Prepare to solve the wire protocol race in the Bulk API. Acquire a socket
before calling Collection._insert, _update, or _remove.
Remove _Bulk.legacy_insert, which was obsoleted when we decided to ignore wnote
and jnote from legacy servers in #645fc3a65 for PYTHON-684.