[SERVER-20190] ASIO cancel() should preempt any outstanding network requests Created: 28/Aug/15 Updated: 07/Oct/15 Resolved: 17/Sep/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Networking |
| Affects Version/s: | None |
| Fix Version/s: | 3.1.9 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Eric Milkie | Assignee: | Adam Midvidy |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Platform 9 (09/18/15) | ||||||||
| Participants: | |||||||||
| Description |
|
If I have an outstanding ASIO network request waiting for a response, I should be able to asynchronously cancel the request from another thread, and such a request should abandon any current network operation and return immediately with some sort of "cancelled" error response. |
| Comments |
| Comment by Githook User [ 16/Sep/15 ] |
|
Author: {u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}Message: |
| Comment by Githook User [ 16/Sep/15 ] |
|
Author: {u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}Message: |
| Comment by Githook User [ 15/Sep/15 ] |
|
Author: {u'username': u'samantharitter', u'name': u'Samantha Ritter', u'email': u'samantha.ritter@10gen.com'}Message: Signed-off-by: Adam Midvidy <amidvidy@gmail.com> |
| Comment by Andy Schwerin [ 02/Sep/15 ] |
|
Specifically, if I have a CallbackHandle from a TaskExecutor, and I call cancel on it, the callback associated with the handle should execute promptly in the "canceled" mode. It should not need to wait for the remove host to respond or the operation to timeout. Hypothetically, this could be implemented in the TaskExecutor, but I think it would be pretty difficult to avoid double-executing the callback. |
| Comment by Adam Midvidy [ 28/Aug/15 ] |
|
this is related to the work Jason has done on timeouts. Note that we need to give each socket its own strand to make this safe with multiple io_service worker threads. |