[SERVER-28489] MockStream should handle cancellation while it is paused Created: 24/Mar/17 Updated: 15/Aug/17 Resolved: 24/Mar/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Networking |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.13, 3.4.4, 3.5.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Samantha Ritter (Inactive) | Assignee: | Samantha Ritter (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v3.4, v3.2
|
||||||||
| Sprint: | Platforms 2017-03-27 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 0 | ||||||||
| Description |
|
The MockStream class used in network_interface_asio_test works by pausing itself as certain key Events occur (like reading, writing, connecting) to allow the test thread to investigate the state of the connection. The MockStream contains a set of states that show where it has paused itself (kBlockedBeforeConnect, kBlockedBeforeRead, kBlockedAfterWrite, kCanceled). We have made an assumption that the state of the stream will not change while it is paused. However, it is perfectly valid for the NIA to call cancel() on the MockStream while we have it paused. Currently, if this happens, we may invariant. The methods that operate on MockStream while it is paused (pushRead(), popWrite()) should account for possible cancellation by the NIA. |
| Comments |
| Comment by Githook User [ 10/Apr/17 ] |
|
Author: {u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'}Message: (cherry picked from commit 0230175542488b48a2976e87d9c24e720f2488c4) |
| Comment by Githook User [ 10/Apr/17 ] |
|
Author: {u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'}Message: (cherry picked from commit cdf2e4cc29f7df5a702ceb62102ac28c589e7e0d) |
| Comment by Githook User [ 09/Apr/17 ] |
|
Author: {u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'}Message: (cherry picked from commit 0230175542488b48a2976e87d9c24e720f2488c4) |
| Comment by Githook User [ 09/Apr/17 ] |
|
Author: {u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'}Message: (cherry picked from commit cdf2e4cc29f7df5a702ceb62102ac28c589e7e0d) |
| Comment by Githook User [ 24/Mar/17 ] |
|
Author: {u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'}Message: |
| Comment by Githook User [ 24/Mar/17 ] |
|
Author: {u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'}Message: |