- 
    Type:Bug 
- 
    Resolution: Unresolved
- 
    Priority:Major - P3 
- 
    None
- 
    Affects Version/s: None
- 
    Component/s: API
- 
    None
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
While auditing the codebase for incorrect usage of constness, we found several places where fixing issues would break the API.
Methods incorrectly marked as const:
- mongocxx::client::list_databases() - calls mongoc_database_has_collection, which takes a non-const pointer to a mongoc_database_t
- mongocxx::collection::list_indexes() - connects to the server through libmongoc, which is not threadsafe
- mongocxx::insert_many_builder::insert() - non-threadsafe and will yield different results when called subsequently on the same collection
Additionally, the getter mongocxx::options::bulk_write::bypass_document_validation() should return a const ref, as the other getters return const refs.
- is related to
- 
                    CXX-869 mongocxx::result::insert_many::inserted_ids() should be const -         
- Closed
 
-