Noah Stapp
e1751ff253
PYTHON-5668 - Merge backpressure branch into mainline ( #2729 )
...
Co-authored-by: Steven Silvester <steve.silvester@mongodb.com>
Co-authored-by: Shane Harvey <shnhrv@gmail.com>
Co-authored-by: Steven Silvester <steven.silvester@ieee.org>
Co-authored-by: Iris <58442094+sleepyStick@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Albertson <kevin.albertson@mongodb.com>
Co-authored-by: Casey Clements <caseyclements@users.noreply.github.com>
Co-authored-by: Sergey Zelenov <mail@zelenov.su>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-14 12:25:29 -04:00
Noah Stapp
df30eff390
PYTHON-5135 - Rename WriteConcernFailed code name to WriteConcernTimeout ( #2214 )
2025-03-24 15:37:00 -04:00
Shane Harvey
8fa6750a7e
PYTHON-5042 Resync transaction spec tests ( #2058 )
2025-01-16 12:14:25 -08:00
Noah Stapp
260322277d
PYTHON-4926 - Skip tests with errorCodeName on Serverless ( #1989 )
2024-11-01 13:20:37 -04:00
Shruti Sridhar
4dde30147c
PYTHON-4671 Skip client.bulk_write tests on Atlas Serverless ( #1807 )
2024-08-22 14:06:02 -07:00
Shruti Sridhar
d08fec6342
PYTHON-4550 Add MongoClient.bulk_write API ( #1745 )
2024-08-06 11:10:01 -07:00
Steven Silvester
e37394d402
PYTHON-2723 Convert transactions spec tests to unified test format ( #1543 )
2024-03-26 17:28:32 -05:00
Steven Silvester
0793138d7f
PYTHON-4117 Require 4.3.1+ server version when using failCommand errorLabels option ( #1526 )
2024-02-20 13:28:08 -06:00
Shane Harvey
f5ac946020
PYTHON-3368 Add test that reads are not retried in a transaction ( #1020 )
2022-07-25 15:19:22 -07:00
Shane Harvey
890cd26e1a
PYTHON-3288 Implement client side operation timeout ( #954 )
...
Add timeoutMS URI option and MongoClient keyword argument.
Add provisional/beta pymongo.timeout() api to set a deadline for a block of operations.
2022-06-06 15:36:52 -04:00
Shane Harvey
f8f34b0438
PYTHON-2951 Test that handshake errors are retryable ( #846 )
2022-02-23 14:00:43 -08:00
Shane Harvey
2af521ec03
PYTHON-2984 Fix retry behavior for bulk write writeConcernError ( #800 )
2021-11-19 12:15:23 -08:00
Shane Harvey
968ee7ba96
PYTHON-2868 Test Serverless behind a load balancer ( #742 )
2021-09-23 15:57:57 -07:00
Shane Harvey
2a74601572
PYTHON-2676 Unified Test Runner changes in preparation for Load Balancer Support ( #623 )
...
Resync crud, change stream, SDAM, server_selection, transactions, uri-options, tests.
PYTHON-2348 Correctly express lack of event assertions in change stream tests.
2021-05-18 10:20:36 -07:00
Shane Harvey
61c6876872
PYTHON-2635 Unpin sessions after all abortTransaction attempts ( #609 )
...
Add unified test runner for transactions.
2021-04-28 12:38:13 -07:00
Shane Harvey
45a7963aac
PYTHON-2082 Retryable writes use the RetryableWriteError label
...
Use retryable write logic for transaction commit/abort.
Do not assign the TransientTransactionError label to errors outside a
transaction.
2020-05-19 10:49:28 -07:00
Shane Harvey
fb7533e888
PYTHON-2099 Make ExceededTimeLimit a retryable writes error
...
Reinstate DuplicateKey code assertions.
2020-05-12 14:41:11 -07:00
Shane Harvey
fd64f4dd64
PYTHON-2030 Support collection and index creation in multi-doc transactions
2020-04-02 12:20:50 -07:00
Shane Harvey
243307be16
PYTHON-1901 Avoid using readConcern snapshot in sharded txn tests
2019-08-12 10:20:12 -07:00
Shane Harvey
4170d8ac7f
PYTHON-1829 Support maxTimeMS for commitTransaction
...
Add max_commit_time_ms to TransactionOptions.
MaxTimeMSExpired errors on commit are labelled UnknownTransactionCommitResult.
with_transaction does not retry commit after MaxTimeMSExpired errors.
2019-06-04 15:44:32 -07:00
Shane Harvey
c29c21449e
PYTHON-1828 Send recoveryToken on abortTransaction
2019-04-29 14:57:50 -07:00
Shane Harvey
05a3825cc2
PYTHON-1816 Test writes in transactions are compatible with w=0 collection
2019-04-25 14:16:42 -07:00
Shane Harvey
f09d6fa052
PYTHON-1801 Update transactions count test for MongoDB >= 4.0.7
2019-04-08 11:43:04 -07:00
Shane Harvey
9cccada41e
PYTHON-1794 Add runOn support to transaction tests
2019-04-02 13:15:08 -07:00
Shane Harvey
244e7ffa12
PYTHON-1793 Use _id:1 in countDocuments to follow the updated CRUD spec
2019-04-01 11:32:19 -07:00
Bernie Hackett
9ca4800543
PYTHON-1740 - Fix up transaction tests
2019-03-13 16:10:03 -07:00
Bernie Hackett
7409f844e6
PYTHON-1740 - retryWrites defaults to true
2019-03-06 16:32:53 -08:00
Shane Harvey
e64945101b
PYTHON-1684 Support sharded transactions recovery token ( #406 )
...
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.
2019-02-27 15:59:18 -08:00
Shane Harvey
3030a5a094
PYTHON-1730 Use w:majority when retrying commitTransaction ( #393 )
2019-02-27 15:56:48 -08:00
Shane Harvey
6bab444bd7
PYTHON-1673 Mongos pinning for sharded transactions
...
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.
2019-02-27 15:56:48 -08:00
Shane Harvey
9902d239b4
PYTHON-1751 Resync transaction spec tests for bulk write error reporting change ( #402 )
2019-02-20 11:14:28 -08:00
Shane Harvey
c200c2cd0e
PYTHON-1658 Test that transaction reads ignore db/collection readConcern ( #384 )
...
Fix: properly skip tests that include 'skipReason'.
Revendor transaction spec tests at commit 367842f1ee4b80f75664a05c6b9d5b2498cf856d
2018-11-14 11:47:53 -08:00
Shane Harvey
3b9e99015f
PYTHON-1508 Only send readConcern on first command in a transaction
2018-06-24 11:39:23 -04:00
Shane Harvey
b5e9007af0
PYTHON-1508 PYTHON-1589 Expand where unknown commit label is raised
...
Remove has_label api.
Bump required server version for transactions.
2018-06-15 11:29:11 -07:00
Shane Harvey
e4317d286b
PYTHON-1508 Retryable commit/abort, has_error_label api
...
Retryable commitTransaction/abortTransaction.
Retry writes after certain writeConcernErrors.
Add has_error_label api.
Update unacknowledged write concern error messge.
Resync transaction tests and update test runner.
2018-06-07 14:39:52 -07:00
Shane Harvey
ca6a34f51d
PYTHON-1508 SPEC-1097 Resync transaction tests
...
Database.command without a read_preference defaults to the
transaction's or Primary if the session is not in a transaction
Add runCommand transaction tests.
Update count tests.
2018-06-01 16:29:11 -07:00
Shane Harvey
714577c83e
PYTHON-1508 commitTransaction can be called multiple times
...
This change allows applications to check if their transaction was commited or
not by repeatedly calling commit until the transaction state is known.
If a session is used after a commit for any operation (not including
another commit), the operation is not part of a transaction and the session's
transaction state is reset.
2018-05-29 14:33:21 -07:00
Shane Harvey
cac0d5548f
PYTHON-1508 Remove autoStartTransaction and resync tests
...
Also use the test file's database name and collection name.
2018-05-22 13:29:41 -07:00
Shane Harvey
5a652be993
PYTHON-1508 Add read_preference to TransactionOptions
...
All read operations use the transaction's read preference.
Add transaction read preference spec tests.
Remove write test in test_read_preferences.
2018-05-08 11:38:28 -07:00
Shane Harvey
7aeec7b56b
PYTHON-1508 Remove stmtId from transaction commands
...
The statement identifier is no longer required by the server.
2018-04-25 16:04:13 -07:00
Shane Harvey
a9b48a1242
PYTHON-1508 Remove obsolete transaction tests
2018-04-17 13:23:52 -07:00
A. Jesse Jiryu Davis
e945190688
Sync transactions spec tests
2018-04-17 09:37:48 -04:00
A. Jesse Jiryu Davis
c194109c0f
Test aggregate in transactions
2018-04-16 14:56:11 -07:00
A. Jesse Jiryu Davis
95d8f783c0
Resync transactions spec tests
2018-04-16 09:57:45 -04:00
Shane Harvey
ab73a7a164
Re-sync transactions tests
2018-04-16 09:57:45 -04:00
Shane Harvey
b4f153a811
Add and test default_transaction_options
2018-04-16 09:57:45 -04:00
Shane Harvey
c66235176e
Test find/getMore with stmtId in transactions
2018-04-16 09:57:45 -04:00
Shane Harvey
3b02e59b70
Add errorCodeName assertion to transaction tests
2018-04-16 09:57:45 -04:00
Shane Harvey
0967c7ed6c
Add startTransaction:true to the start of all transactions
...
Also add autocommit:false to all commands in transactions.
2018-04-16 09:57:45 -04:00
A. Jesse Jiryu Davis
4579cd1eb0
Test multi-deletes in transactions
2018-04-16 09:57:45 -04:00