-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: CLI Module
-
None
-
Not Needed
Problem Statement/Rationale
What is going wrong? What action would you like the Engineering team to take?
Update the deprecation warning to be more relevant.
Steps to Reproduce
How could an engineer replicate the issue you’re reporting?
Enterprise replset [direct: primary] test> rs.secondaryOk(); DeprecationWarning: .setSecondaryOk() is deprecated. Use .setReadPref("primaryPreferred") instead Setting read preference from "primary" to "primaryPreferred" Enterprise replset [direct: primary] test> .setReadPref("primaryPreferred") Invalid REPL keyword Enterprise replset [direct: primary] test> db.setReadPref("primaryPreferred") TypeError: db.setReadPref is not a function Enterprise replset [direct: primary] test> rs.setReadPref("primaryPreferred") TypeError: rs.setReadPref is not a function
Expected Results
What do you expect to happen?
The command provided by the depreciation warning is actually usable. I believe it should be
db.getMongo().setReadPref()
Actual Results
What do you observe is happening?
No series of commands actually matches the warning.
Additional Notes
Any additional information that may be useful to include.
- duplicates
-
MONGOSH-1031 Better guidance for what to use other than {{.setSecondaryOk()}}
- Ready for Work