[CDRIVER-2218] Only topology scanner performs MongoDB Handshake Created: 19/Jul/17 Updated: 28/Oct/23 Resolved: 08/Aug/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | None |
| Fix Version/s: | 1.8.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Patrick Freed | Assignee: | Hannes Magnusson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
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:
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. |
| Comments |
| Comment by Githook User [ 08/Aug/17 ] |
|
Author: {'username': 'bjori', 'email': 'bjori@php.net', 'name': 'Hannes Magnusson'}Message: Merge branch '
|
| Comment by Githook User [ 08/Aug/17 ] |
|
Author: {'username': 'bjori', 'email': 'bjori@php.net', 'name': 'Hannes Magnusson'}Message: Merge branch '
|
| Comment by Githook User [ 08/Aug/17 ] |
|
Author: {'username': 'bjori', 'email': 'bjori@php.net', 'name': 'Hannes Magnusson'}Message: Merge branch '
|
| Comment by Githook User [ 08/Aug/17 ] |
|
Author: {'username': 'bjori', 'email': 'bjori@php.net', 'name': 'Hannes Magnusson'}Message: |
| Comment by A. Jesse Jiryu Davis [ 20/Jul/17 ] |
|
Good catch. bjori I think he's right that it's a bug. The handshake spec says,
Therefore, the cluster handshake from a pooled client should send appName. This will be easy to check with a mock server test. |