File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -232,8 +232,6 @@ with client.start_session() as s:
232232 coll.find_one(session = s) # Error: "read preference in a transaction must be primary"
233233```
234234
235- In the future, we might relax this restriction and allow any read preference on a transaction.
236-
237235#### maxCommitTimeMS
238236
239237NOTE: This option is deprecated in favor of
@@ -926,6 +924,11 @@ won't be possible in the future for startTransaction to check that the read pref
926924application will perform in the transaction. Therefore, we specify now that the readPreference must be checked
927925per-operation. (However, we have not completely planned how read preference validation will behave in MongoDB 4.2.)
928926
927+ * Update 28.Oct.20214*
928+
929+ Note this section is retained in the spec for historical reasons and that the read preference in transactions must
930+ always be primary.
931+
929932### Users cannot pass readConcern or writeConcern to operations in transactions
930933
931934For drivers that allow readConcern and/or writeConcern to be passed to a particular operation, If the driver did not
@@ -1070,6 +1073,8 @@ objective of avoiding duplicate commits.
10701073
10711074## ** Changelog**
10721075
1076+ - 2024-10-28: Note read preference must always be primary in a transaction.
1077+
10731078- 2024-05-08: Add bulkWrite to the list of commands allowed in transactions.
10741079
10751080- 2024-02-15: Migrated from reStructuredText to Markdown.
You can’t perform that action at this time.
0 commit comments