-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
The options validator currently validates user-provided options and applies default options, including dynamic defaults like readPreference. We should separate this logic so every operation makes a call to validate and then a call to applyDefaults. This enables us to skip validate and only use applyDefaults at the bottom level of operations (collection_ops.js, db_ops.js, mongo_client_ops.js, etc.).