[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:
Backports
Depends
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: SERVER-28489 MockStream hook methods may still be used if the stream gets canceled

(cherry picked from commit 0230175542488b48a2976e87d9c24e720f2488c4)
Branch: v3.2
https://github.com/mongodb/mongo/commit/ff4f28367d83e9b4b7a0629aa6c7a6b919c5ecba

Comment by Githook User [ 10/Apr/17 ]

Author:

{u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'}

Message: SERVER-28489 Add documentation to mock stream framework

(cherry picked from commit cdf2e4cc29f7df5a702ceb62102ac28c589e7e0d)
Branch: v3.2
https://github.com/mongodb/mongo/commit/bf7687a12861291447d8e0e2a021ed8f44408021

Comment by Githook User [ 09/Apr/17 ]

Author:

{u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'}

Message: SERVER-28489 MockStream hook methods may still be used if the stream gets canceled

(cherry picked from commit 0230175542488b48a2976e87d9c24e720f2488c4)
Branch: v3.4
https://github.com/mongodb/mongo/commit/9a2d97742f34b54a35360b8f711d0b1e3e547202

Comment by Githook User [ 09/Apr/17 ]

Author:

{u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'}

Message: SERVER-28489 Add documentation to mock stream framework

(cherry picked from commit cdf2e4cc29f7df5a702ceb62102ac28c589e7e0d)
Branch: v3.4
https://github.com/mongodb/mongo/commit/9661c01fac46b8541e7a491a4b018de9ee41a5c3

Comment by Githook User [ 24/Mar/17 ]

Author:

{u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'}

Message: SERVER-28489 MockStream hook methods may still be used if the stream gets canceled
Branch: master
https://github.com/mongodb/mongo/commit/0230175542488b48a2976e87d9c24e720f2488c4

Comment by Githook User [ 24/Mar/17 ]

Author:

{u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'}

Message: SERVER-28489 Add documentation to mock stream framework
Branch: master
https://github.com/mongodb/mongo/commit/cdf2e4cc29f7df5a702ceb62102ac28c589e7e0d

Generated at Thu Feb 08 04:18:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.