[CDRIVER-609] Stream handlers need to differentiate between closing a stream due to error or normal cleanup Created: 07/Apr/15 Updated: 07/Oct/15 Resolved: 08/Apr/15 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | 1.1.4 |
| Fix Version/s: | 1.2-beta0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Hannes Magnusson | Assignee: | Hannes Magnusson |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
The stream handler expose a way to destruct (close (if needed) and free) a stream resource – but that doesn't tell you why it is requested at all. We need a way to differentiate between closing a stream due to error (e.g. connection failure, replicaset reconfigured without that node, invalid reply from server, ... ..) vs closing the stream due to normal cleanup routines (mongoc_destroy(), ...). The handling of these two cases is vastly different for language bindings, as in the first case the stream really needs to be killed dead - while in the second case it does not. The language binding may want to keep it around for other purposes – or resume it for next client. This is especially important for the PHP bindings as we implement "persistent streams" across requests (and manager – and background sdam checks). |
| Comments |
| Comment by Githook User [ 07/Oct/15 ] |
|
Author: {u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}Message: Merge branch 'bjori-
|
| Comment by Githook User [ 07/Oct/15 ] |
|
Author: {u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}Message: Merge branch 'bjori-
|
| Comment by Githook User [ 07/Oct/15 ] |
|
Author: {u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}Message: Merge branch 'bjori-
|
| Comment by Githook User [ 07/Oct/15 ] |
|
Author: {u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}Message: This adds a new `failed` handler to the mongoc_stream_t, along with The failed handler shall be called when the stream truely needs to be By default, for BC, if no failed handler is provided we will fallback |
| Comment by Githook User [ 08/Apr/15 ] |
|
Author: {u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}Message: Merge branch 'bjori-
|
| Comment by Githook User [ 08/Apr/15 ] |
|
Author: {u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}Message: Merge branch 'bjori-
|
| Comment by Githook User [ 08/Apr/15 ] |
|
Author: {u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}Message: Merge branch 'bjori-
|
| Comment by Githook User [ 08/Apr/15 ] |
|
Author: {u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}Message: This adds a new `failed` handler to the mongoc_stream_t, along with The failed handler shall be called when the stream truely needs to be By default, for BC, if no failed handler is provided we will fallback |
| Comment by Hannes Magnusson [ 07/Apr/15 ] |