When using a client pool with a uri that has the ?appName=<something> option specified, none of the clients received from the pool will have the name passed to it. This is caused by the following lines 752-757 of mongoc-client.c, duplicated here:
appname = mongoc_uri_get_option_as_utf8 (client->uri, MONGOC_URI_APPNAME, NULL); if (appname && client->topology->single_threaded) { /* the appname should have already been validated */ BSON_ASSERT (mongoc_client_set_appname (client, appname)); }
single_threaded is set to false when using a pool, as set at mongoc-client-pool.c:111.
This seems like a bug to me, but I could be misunderstanding how pools are meant to interact with the appName. The setting is explicitly excluded for multi-threaded contexts, so maybe this is intended. If it is indeed a bug, it should be fixed.
- has to be done before
-
CXX-1340 Write integration tests for client metadata handshake feature
- Closed