-
Type: Task
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Component/s: Docs Examples
-
None
-
Needed
-
Summary
What is the problem or use case, what are we trying to achieve?
The Convenient API for Transactions examples in the MongoDB manual use the following options:
- "local" read concern
- "primary" read preference
- "majority" write concern with wTimeoutMS=1000
These no longer seem relevant and I propose removing them.
- The "local" read concern is already the default.
- The callback function is only executing write operations so a read preference is unnecessary
- Atlas connection strings include w=majority by default, although perhaps we'd want to keep that in place for non-Atlas users.
- I don't know what the purpose of wTimeoutMS is here, or why we'd want to invite a replication timeout
This came up while reviewing the Unit 2 Lesson 6 script for upcoming PHP courses, which copied with_transaction() examples from
https://www.mongodb.com/docs/manual/core/transactions/.
Motivation
Who is the affected end user?
Documentation readers.
How does this affect the end user?
The documentation may be unnecessarily verbose.
Is this issue urgent?
No.
Is this ticket required by a downstream team?
The docs team would need to be informed to republish language examples after drivers implement this change.
Is this ticket only for tests?
Yes (since documentation examples are run in driver test suites).
- is related to
-
DRIVERS-655 Provide transaction example using new withTransaction API
- Closed
- split to
-
NODE-5210 Simplify transaction options in convenient API doc example code
- Backlog
-
RUBY-3243 Simplify transaction options in convenient API doc example code
- Backlog
-
GODRIVER-2814 Simplify transaction options in convenient API doc example code
- Backlog
-
MOTOR-1123 Simplify transaction options in convenient API doc example code
- Backlog
-
PYTHON-3674 Simplify transaction options in convenient API doc example code
- Backlog
-
CDRIVER-4618 Simplify transaction options in convenient API doc example code
- Closed
-
CSHARP-4620 Simplify transaction options in convenient API doc example code
- Closed
-
CXX-2679 Simplify transaction options in convenient API doc example code
- Closed
-
JAVA-4945 Simplify transaction options in convenient API doc example code
- Closed
-
PHPLIB-1120 Simplify transaction options in convenient API doc example code
- Closed
-
RUST-1637 Simplify transaction options in convenient API doc example code
- Closed