Commit Graph

468 Commits

Author SHA1 Message Date
Prashant Mital
0ca7ccd52c
SPEC 1153: Document change in aggregate command behavior (#404) 2019-02-21 09:38:32 -08:00
Prashant Mital
0b8643d144
SPEC 1153: Adding readConcern support to aggregation with $out (#400) 2019-02-20 16:21:39 -08:00
Shane Harvey
ecc852c322 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.
2018-12-06 15:28:58 -08:00
Jason R. Coombs
341b2b5964 Document find_one_and_update return value on no match. (#361)
Trim excess whitespace.
2018-10-30 11:40:14 -07:00
Petr Messner
7f1939ebcb PYTHON-1642 - Replace count() with count_documents({}) in docs (#376) 2018-09-13 16:34:35 -07:00
Shane Harvey
4f3b6467ab PYTHON-1598 Fix transaction write concern inheritance 2018-06-26 12:07:12 -04:00
Shane Harvey
98e77ba1d2 PYTHON-1483 Prohibit unack'ed writes with explicit sessions 2018-06-25 13:55:50 -05:00
Bernie Hackett
1bf9b461b0 PYTHON-1595 - Document operator migrations for count_documents 2018-06-23 13:39:57 -07:00
Shane Harvey
05c7c65470 PYTHON-1329 OP_MSG with unacknowledged writes
Replace OP_INSERT/OP_UPDATE/OP_DELETE usage with OP_MSG with moreToCome
flag when the server is 3.6 or greater.
Unack'ed OP_MSG supports bypass_document_validation.
getLastError updatedExisting is always false on mongos after an OP_MSG
unack'ed update.
2018-06-23 11:46:50 -04:00
Prashant Mital
96291c88b0
PYTHON-1565 Add helpers and options for Change Streams Follow-on Work (#355)
PYTHON-1565 Add helpers and options for Change Streams Follow-on Work (#355)

Add MongoClient.watch() and Database.watch().
Add start_at_operation_time to all watch() helpers.
2018-06-21 12:22:59 -07:00
Bernie Hackett
388339e187 PYTHON-1591 - Deprecate Collection.parallel_scan 2018-06-21 12:03:42 -07:00
Bernie Hackett
e6b0f3847d PYTHON-1581 - Deprecate Collection/Cursor count 2018-06-18 10:50:26 -07:00
Shane Harvey
622d33d0cb PYTHON-1545 Support for retryable writeConcernErrors
Return proper BulkWriteResult after a retryable write succeeds.
Reduce retryable writes test suite time from 90 to 30 seconds by
reducing the heartbeat interval.
2018-06-14 09:51:08 -07:00
Bernie Hackett
91c3793703 PYTHON-1580 - Implement new count API 2018-06-08 14:27:04 -07:00
Bernie Hackett
64cf053092 PYTHON-1524 - Fix Collection options handling 2018-06-07 07:11:26 -07:00
Bernie Hackett
dbf386c18c PYTHON-1527 - Fix default writeConcern override 2018-06-04 13:56:06 -07:00
Bernie Hackett
981e39281f PYTHON-1529 - No implicit sessions with parallel_scan 2018-06-01 18:32:44 -07:00
Shane Harvey
5a9b3340d9 PYTHON-1508 Fix read preference regression in mapreduce 2018-05-24 13:53:22 -07:00
Bernie Hackett
335cb97a34 PYTHON-1278, PYTHON-1553 - Support OP_COMPRESSED 2018-05-22 11:44:21 -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
a2937aa8eb Revert "Pin transactions to a single server address"
This reverts commit 25bc0858ff566abfabadeca4a3fea177e9c2697c.
2018-04-16 09:57:45 -04:00
Shane Harvey
656aa1e703 Pin transactions to a single server address 2018-04-16 09:57:45 -04:00
Shane Harvey
cd92850b36 Test changing transaction readPreference
Add original readPreference to getMores to simplify code check.
2018-04-16 09:57:45 -04:00
Bernie Hackett
0b72e369f3 PYTHON-1501 - Deprecate max_scan 2018-03-30 18:58:03 -07:00
Bernie Hackett
f847be3fcb PYTHON-1502 - Deprecate the snapshot cursor option 2018-03-22 08:47:34 -07:00
Bernie Hackett
d190b37d15 PYTHON-1440 - Use with in watch examples 2018-02-13 09:56:44 -08:00
Bernie Hackett
ba7c95a9df PYTHON-1462 - Import ABCs from collections.abc 2018-02-12 19:42:44 -08:00
Bernie Hackett
be629bd884 PYTHON-1441 - Ignore batchSize in agg with $out stage 2018-02-12 19:20:26 -08:00
Bernie Hackett
507f954ed4 Update copyright dates 2017-12-01 17:23:39 -08:00
Shane Harvey
2a05236f61 PYTHON-1332 Only gossip cluster time on >= 3.6.
Do not add readConcern to explain.
Test explain with collation.
2017-11-30 14:53:14 -08:00
Shane Harvey
47302096f9 PYTHON-1339 Retryable multi-statement writes.
MongoClient with retryWrites=true works when the cluster does not support retryable writes.
2017-11-20 12:18:00 -08:00
Shane Harvey
9d7b4c44ce PYTHON-1338 Update change stream documentation. 2017-11-17 16:17:06 -08:00
Bernie Hackett
99aefd6847 PYTHON-1413 - Restrict when we add readConcern 2017-11-16 19:12:23 -08:00
Bernie Hackett
6507d263b9 PYTHON-1398 - Raw batch methods do not support sessions 2017-11-10 10:02:29 -08:00
Shane Harvey
6c8f5a2fee PYTHON-1332 Remove session workaround for createUser.
parallel_scan does use implicit sessions.
2017-11-09 19:39:27 -08:00
Bernie Hackett
1227f5544d PYTHON-1280 - Support maxTimeMS in index management methods 2017-11-09 15:57:50 -08:00
Bernie Hackett
036188a832 PYTHON-1385 - Publish command responses in _first_batch 2017-11-09 10:24:18 -08:00
Shane Harvey
280efd2d72 PYTHON-1339 Generate a single message in _do_batched_write_command.
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.
2017-10-31 16:59:26 -04:00
Shane Harvey
8b1aa3aafa PYTHON-1339 Retryable single-statement writes.
Add retryWrites MongoClient and URI setting.
Retry once for supported single-statement write operations including:
insert_one, update_one, delete_one, find_one_and_update, find_one_and_replace,
find_one_and_delete, update and remove with multi=False, and find_and_modify.
2017-10-30 14:23:16 -04:00
Bernie Hackett
73a6356385 PYTHON-1325 - Deprecate the aggregate useCursor option 2017-10-27 13:49:31 -07:00
Bernie Hackett
f107c08754 PYTHON-1355 - list_collections improvements 2017-10-26 16:50:19 -07:00
jagrut
8468dfdd41 PYTHON-1355 Implement Collections Enumeration spec. (#336)
New method Collection.list_collections.
2017-10-24 14:15:01 -07:00
Shane Harvey
6721e0157b Revert "PYTHON-1299 Remove "safe" legacy messages."
This reverts commit da8fabc49a.
2017-10-12 12:14:33 -07:00
A. Jesse Jiryu Davis
df018e88e2 PYTHON-1332 - Gossip $clusterTime 2017-10-12 09:08:38 -04:00
Shane Harvey
f0b847adb8 PYTHON-1329 Refactor wire protocol message parsing.
Use _OpReply class instead of passing bytes around.
Remove unnecessary operation argument to receive message.
Move _first_batch to message.py to avoid circular import.
2017-10-09 15:11:50 -07:00
A. Jesse Jiryu Davis
dad61a058b PYTHON-1332 - Update session's last_use 2017-10-05 15:03:36 -04:00
Shane Harvey
da8fabc49a PYTHON-1299 Remove "safe" legacy messages. 2017-09-29 12:09:24 -07:00
Shane Harvey
01bbf19462 PYTHON-1299 Remove fallback code from user and index management helpers. 2017-09-29 12:09:24 -07:00
Shane Harvey
7bae7fdd1c PYTHON-1299 Remove useCursor wire version check. 2017-09-29 12:09:24 -07:00
Shane Harvey
715cb0d27c PYTHON-1299 Remove acknowledged legacy writes.
Ordered unacknowledged bulk writes still use legacy writes and getLastError.
2017-09-29 12:09:24 -07:00