[CDRIVER-565] mongoc_cluster_fetch_stream needs to hold topology mutex Created: 09/Mar/15 Updated: 15/Oct/15 Resolved: 15/Oct/15 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | 1.2.0 |
| Fix Version/s: | 1.2-beta0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Samantha Ritter (Inactive) | Assignee: | Samantha Ritter (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | SDAM | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
We get a reference to a topology_scanner_node_t and use it throughout the function, but in the multi-threaded case the topology may alter or remove that scanner node while we hold the reference. |
| Comments |
| Comment by A. Jesse Jiryu Davis [ 15/Oct/15 ] |
|
Oh, my mistake, I confused mongoc_topology_server_by_id (a thread-safe function) for mongoc_topology_description_server_by_id (an unsafe function). We use the safe function where appropriate. |
| Comment by A. Jesse Jiryu Davis [ 15/Oct/15 ] |
|
I broke mongoc_cluster_fetch_stream's thread safety, in this refactoring: https://github.com/ajdavis/mongo-c-driver/commit/73f04b86dc61afcf8f922c9e46bddeec621f23f4 |
| Comment by Githook User [ 07/Oct/15 ] |
|
Author: {u'username': u'samantharitter', u'name': u'Samantha Ritter', u'email': u'samantha.ritter@10gen.com'}Message: |
| Comment by Githook User [ 17/Mar/15 ] |
|
Author: {u'username': u'samantharitter', u'name': u'Samantha Ritter', u'email': u'samantha.ritter@10gen.com'}Message: |
| Comment by Samantha Ritter (Inactive) [ 13/Mar/15 ] |
|
code review: https://github.com/mongodb/mongo-c-driver/pull/197 |