-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Trivial - P5
-
None
-
Affects Version/s: None
-
Component/s: libmongoc
-
None
Scope Remove unnecessary driver-side validation on options passed via bson_t in functions like mongoc_database_create_collection.
Motivation Driver-side validation checks on bson_t options that are validated server-side do not provide value to users. Relying on the server to error in these cases helps with forward compatibility.
Example mongoc_database_create_collection validates a subset of options that are supported on the create command. If future versions of the server support additional types on those values, it will require a driver change. The validation does not help users. Without the validation, they will still be informed of a wrong type from a server-side error.
Notes
- There are still requirements of driver side checks on some options. For example – some CRUD options, like hint have associated wire version checks. The rationale is that the user will otherwise be uninformed if the server does not support the option: https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#:~:text=why%20are%20client-side%20errors%20raised%20for%20some%20unsupported%20options%3F.
- When determining which checks can be relaxed, consider the behavior of the oldest supported server version.