[SERVER-21170] NetworkInterface::startCommand should be able to reject requests due to shutdown Created: 27/Oct/15 Updated: 26/Apr/16 Resolved: 31/Mar/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Networking |
| Affects Version/s: | None |
| Fix Version/s: | 3.3.5 |
| Type: | Improvement | Priority: | Critical - P2 |
| Reporter: | Andy Schwerin | Assignee: | Waley Chen |
| 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: | Platforms 12 (04/01/16) | ||||
| Participants: | |||||
| Linked BF Score: | 0 | ||||
| Description |
|
In order to allow the ThreadPoolTaskExecutor to issue NetworkInterface::startCommand outside the executor's mutex, it is necessary that startCommand return some indication as to whether or not the network interface takes ownership of the operation. Proposed behavior: NetworkInterface::startCommand returns false if NetworkInterface::shutdown has already started, and true otherwise. If it returns true, then the onFinish argument will be executed by NetworkInterface eventually; otherwise, it will not. setAlarm should behave similarly NetworkInterface::shutdown blocks until callbacks assocated with all accepted commands and alarms have executed. It is OK (preferred?) for shutdown() to cause some or all pending callbacks to execute with a "CallbackCanceled" status in order to expedite shutdown. |
| Comments |
| Comment by Githook User [ 04/Apr/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: |
| Comment by Githook User [ 01/Apr/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: Revert " This reverts commit dfabadb09387a4236ee7675cd02d39b17affaf39. |
| Comment by Githook User [ 01/Apr/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: Revert " This reverts commit ada50f9f409afdccb40038b3ba182bf4e81e0490. |
| Comment by Githook User [ 31/Mar/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: |
| Comment by Andrew Morrow (Inactive) [ 28/Oct/15 ] |
|
I'm bumping this out to 3.3 required. I agree that if ThreadPooTaskExecutor already handles this that there is no work we need to do now. However, we may want to use NetworkInterfaceASIO in other contexts in the future, and I'd like to ensure that it offers orderly shutdown. |
| Comment by Andy Schwerin [ 27/Oct/15 ] |
|
Turns out that ThreadPoolTaskExecutor engages in a safe shutdown procedure wrt this behavior. I don't think this ticket is necessary. |