Commit Graph

78 Commits

Author SHA1 Message Date
Steven Silvester
cfa2d990f0
PYTHON-3228 _tmp_session should validate session input (#930) 2022-04-18 20:38:46 -05:00
Shane Harvey
484058e18d
PYTHON-3160 Fix MMAPv1 tests (#914) 2022-03-30 21:50:22 -07:00
Julius Park
b737b843e9
PYTHON-2956 Drivers should check out an implicit session only after checking out a connection (#876) 2022-03-01 15:44:05 -08:00
Shane Harvey
a3f0f91588
PYTHON-3123 Convert sessions spec tests to unified test format (#888)
Create implicit session _before_ starting a retryable read.
2022-02-25 10:36:05 -08:00
Steven Silvester
a0fe7c03af
PYTHON-3120 Set up flake8 linting (#868) 2022-02-17 06:44:08 -06:00
Steven Silvester
5578999a90
PYTHON-1834 Use a code formatter (#852) 2022-02-09 06:44:28 -06:00
Steven Silvester
f4cef37328
PYTHON-3064 Add typings to test package (#844) 2022-02-07 19:33:41 -06:00
Shane Harvey
b342990934
PYTHON-2164 Add MongoClient.options, remove redundant properties (#772) 2021-11-03 11:21:33 -07:00
Shane Harvey
f4eb8f93fd
PYTHON-2966 Make MongoClient.event_listeners work as expected (#761) 2021-10-22 14:43:20 -07:00
Shane Harvey
11752ed594
PYTHON-2899 Remove code for MongoDB <= 3.4 (#729)
Remove unneeded memoryview to bytes conversion.
2021-09-16 16:53:50 -07:00
Julius Park
4e086ba218
PYTHON-1915 Prohibit copying ClientSession objects (#726) 2021-09-15 12:05:09 -07:00
Bernie Hackett
ad4315134c PYTHON-2803 Get rid of most uses of 'master'
This change also resolves PYTHON-2848 for MongoDB 4.0.
2021-09-13 12:50:49 -07:00
Shane Harvey
65aa7c86d5
PYTHON-2850 Remove map_reduce/inline_map_reduce (#703) 2021-08-12 09:44:52 -07:00
Shane Harvey
e1b068d37a
PYTHON-2525 Remove Collection.count and Cursor.count (#700) 2021-08-10 13:52:29 -07:00
Shane Harvey
edda903b5b
PYTHON-2711 Remove profile command helpers (#693) 2021-08-06 12:54:52 -07:00
Shane Harvey
69dee51b90
PYTHON-1318 Remove initialize_unordered_bulk_op and initialize_ordered_bulk_op (#692)
PYTHON-2436 Unskip test_large_inserts_ordered on MongoDB 5.0.
2021-08-05 17:58:15 -07:00
Shane Harvey
3513ab72b0 PYTHON-2528 Remove Database.current_op 2021-08-04 11:14:50 -07:00
Prashant Mital
f07da34f97
PYTHON-2545 Test Atlas Serverless (#664) 2021-07-27 16:35:09 -07:00
Prashant Mital
0e0c4fd944
PYTHON-2389 Add session support to find_raw_batches and aggregate_raw_batches (#658) 2021-06-30 19:14:22 -07:00
Shane Harvey
14160aed04
PYTHON-2767 Support snapshot reads on secondaries (#656)
Add the MongoClient.start_session snapshot option.
2021-06-25 16:12:12 -07:00
Shane Harvey
95974617bd
PYTHON-1314 Remove Database.authenticate and Database.logout (#568) 2021-02-17 14:16:07 -08:00
Shane Harvey
2565b4d291
PYTHON-1312 Remove Database.add_user and Database.remove_user (#561) 2021-01-26 12:49:49 -08:00
Bernie Hackett
cf877e95c7 PYTHON-2503 Always use time.monotonic
For monotonic time needs.
2021-01-25 12:48:31 -08:00
Shane Harvey
c65b89d8a1
PYTHON-1319 Remove Collection.ensure_index and reindex (#555) 2021-01-21 11:25:19 -08:00
Bernie Hackett
a72e8b8823 PYTHON-2133 Remove py2 support from test
Also delete bson/py3compat.py
2021-01-20 09:40:36 -08:00
Shane Harvey
6e8c3708b8
PYTHON-1587 Remove MongoClient.database_names and Database.collection_names (#551) 2021-01-15 16:53:42 -08:00
Shane Harvey
3c899aeb89
PYTHON-1592 Remove Collection.parallel_scan (#547) 2021-01-15 14:01:45 -08:00
Shane Harvey
387bfa0bfa
PYTHON-2310 Remove MongoClient.fsync, unlock, and is_locked (#546) 2021-01-15 11:29:23 -08:00
Shane Harvey
17dca5c504 Revert "PYTHON-1915: Prohibit copying ClientSession objects (#480)"
This reverts commit 959039b213.
2020-11-16 15:09:31 -08:00
ishmum123
959039b213
PYTHON-1915: Prohibit copying ClientSession objects (#480) 2020-08-21 11:10:40 -07:00
Shane Harvey
7a539f227a
PYTHON-2294 Resync SDAM spec tests to workaround slow elections Windows and macOS (#468)
PYTHON-2296 Test behavior of connectTimeoutMS=0 with streaming protocol
PYTHON-2311 Workaround inherent race in flaky streaming protocol test
2020-07-22 11:49:57 -07:00
Shane Harvey
e3f40c30ad
PYTHON-2165 Deprecate MongoClient is_locked, fsync, and unlock helpers (#459) 2020-07-08 17:18:02 -07:00
Shane Harvey
1f4123e4bf PYTHON-2123 Streaming heartbeat protocol
MongoClient now requires 2 connections and 2 threads to each MongoDB 4.4+ server.
With one connection, the server streams (or pushes) updated heartbeat info.
With the other connection, the client periodically pings the server to
establish an accurate round-trip time (RTT). This change optimizes the
discovery of server state changes such as replica set elections.

Additional changes:
- Mark server Unknown before retrying isMaster check.
- Always reset the pool _after_ marking the server unknown.
- Configure fail point before creating the client in test SpecRunner.
- Unfreeze with replSetFreeze:0 to ensure a speedy elections in test suite.
2020-07-01 14:49:46 -07:00
Shane Harvey
5b49557c59 PYTHON-2268 Close clients in test suite 2020-06-03 17:05:59 -07:00
Shane Harvey
e08ad6e8f7 PYTHON-2068 Wait for w=0 operations to complete when dropping test database 2020-01-24 17:33:51 -08:00
Shane Harvey
5c02f8bec4 PYTHON-2072 Fix tests now that "counts" is not reported in map_reduce 2019-12-26 13:49:16 -05:00
Prashant Mital
78aa667f0f
PYTHON-1934 retryWrites=True with MMAPv1 storage engine should raise an actionable error 2019-08-08 13:24:46 -07:00
Shane Harvey
fc645a248e PYTHON-1838 Discard ServerSessions involved in network errors 2019-06-04 15:43:55 -07:00
Shane Harvey
d847e01df0 PYTHON-1851 Test inline mapReduce fails in a causally consistent session on 4.2 2019-05-28 13:54:51 -07:00
Shane Harvey
956fd92e82 PYTHON-1721 Improve GridFS file download performance (#413)
This change uses a cursor to download all the chunks in a GridFS file
instead of using individual find_one operations to read each chunk.
Detect truncated/missing/extra chunks in _GridOutChunkIterator.
Only detect extra chunks after reading the final chunk, not on every
call to read().
Retry once after CursorNotFound for backward compatibility.
2019-03-13 15:44:40 -07:00
Prashant Mital
2b1fdb091d SPEC 1153: Adding readConcern support to aggregation with $out (#400) 2019-02-27 15:59:18 -08:00
Bernie Hackett
587e448b69 PYTHON-1604 - Stop testing reindex with mongos and MongoDB 4.1+ 2018-07-03 12:44:30 -07:00
Shane Harvey
98e77ba1d2 PYTHON-1483 Prohibit unack'ed writes with explicit sessions 2018-06-25 13:55:50 -05:00
Bernie Hackett
388339e187 PYTHON-1591 - Deprecate Collection.parallel_scan 2018-06-21 12:03:42 -07:00
Bernie Hackett
709b28467f PYTHON-1586 - Deprecate database_names and collection_names 2018-06-18 10:52:11 -07:00
Bernie Hackett
e6b0f3847d PYTHON-1581 - Deprecate Collection/Cursor count 2018-06-18 10:50:26 -07:00
Bernie Hackett
981e39281f PYTHON-1529 - No implicit sessions with parallel_scan 2018-06-01 18:32:44 -07:00
Bernie Hackett
5b9257644f PYTHON-1464 - Implement SCRAM-SHA-256 2018-03-06 17:54:40 -08:00
Shane Harvey
79a327b752 PYTHON-1474 Return cursor sessions as quickly as possible
Return implicit sessions to the pool as soon as the cursor is exhausted
instead of waiting for garbage collection.
2018-02-27 16:03:25 -08:00
Shane Harvey
0e6b425870 PYTHON-1475 Create shallow copy of session pool before iteration 2018-02-26 16:04:02 -08:00