-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
mongoc_cluster_fetch_stream_single calls BSON_ASSERT if it is passed a server_id that is either not present or is marked "retired" in the topology scanner. However, it is possible for a user to call this method with an arbitrary server_id via mongoc_cluster_stream_for_server. Calling BSON_ASSERT should be reserved for logical invariants in the code; since this condition can be triggered by user input, we should fail gracefully rather than crash.