-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
Affects Version/s: 1.1.7
-
Component/s: Embedded Shell
-
None
-
Needed
-
Problem Statement/Rationale
The documentation says you must add the option --retryWrites to enable retryable writes|https://docs.mongodb.com/manual/core/retryable-writes/#enabling-retryable-writes].
Rather, experimentation with mongosh 1.1.7 shows that retryable writes are enabled by default, and you must add the option --retryWrites=false to disable them.
Steps to Reproduce
1. Create a replica set on MongoDB 4.4.10. (I'm sure other releases would exhibit the same behavior)
2. Connect with mongosh as a replica set.
3. Run a script that inserts and/or updates a bunch of documents.
4. Observe the FTDC metric "transactionsCollectionWriteCount". (or you can use the serverStatus command)
5. Note that metrics spikes exactly as the updates spike.
6. Now run mongosh again with the --retryWrites=false option.
7. Observe that the "transactionsCollectionWriteCount" metric does not spike, indicating retryable writes are not being used.
This behavior is inconsistent with the mongo shell, which disables retryable writes by default. The documentation is also incorrect.
Fixing the documentation is one option here.
Expected Results
What do you expect to happen?
Actual Results
What do you observe is happening?
Additional Notes
Any additional information that may be useful to include.
- is related to
-
MONGOSH-1150 Help text for retryWrites needs to be updated
- Closed