[CDRIVER-2333] Deprecate mongoc_client_get_server_status and others Created: 24/Oct/17  Updated: 28/Oct/23  Resolved: 17/Apr/18

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: None
Fix Version/s: 1.10.0

Type: New Feature Priority: Minor - P4
Reporter: A. Jesse Jiryu Davis Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: Post-3.6 cleanup

 Description   

mongoc_client_get_server_status
mongoc_collection_stats
mongoc_collection_validate

These helper functions don't work with sessions. Instead of adding session-capable functions like mongoc_client_get_server_status_with_opts, mongoc_collection_stats_with_opts, etc., just deprecate the functions. Applications can use mongoc_client_read_command_with_opts easily.

Also deprecate mongoc_database_create_collection, which doesn't properly handle write concern.

The C Driver provides helper functions for MongoDB operations that are implemented differently according to which server is selected, and for MongoDB operations that require complex logic which should be implemented once in C to benefit HLL wrappers. These functions don't fit either criterion, just deprecate them.



 Comments   
Comment by Githook User [ 17/Apr/18 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: CDRIVER-2333 deprecate three helper methods

mongoc_client_get_server_status, mongoc_collection_stats, and
mongoc_collection_validate do not work with mongoc_client_session_t. They are
deprecated in favor of running MongoDB commands directly with a function like
mongoc_client_read_command_with_opts.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/8f11ee6b9958656fe2a185332cbc21405fa271d1

Generated at Wed Feb 07 21:14:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.