[SERVER-20187] drain mode must wait for synctail to unblock from blockingPeek call Created: 28/Aug/15 Updated: 25/Jan/17 Resolved: 03/Sep/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 3.1.8 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Eric Milkie | Assignee: | Benety Goh |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | RPL 9 (09/18/15) |
| Participants: |
| Description |
|
The server does not exit drain mode until the timeout on the condvar waiting for more ops in the queue. This can delay stepping up to primary for up to one second. |
| Comments |
| Comment by Githook User [ 03/Sep/15 ] |
|
Author: {u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}Message: |
| Comment by Githook User [ 03/Sep/15 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: |
| Comment by Githook User [ 03/Sep/15 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: |
| Comment by Githook User [ 03/Sep/15 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: |
| Comment by Githook User [ 03/Sep/15 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: This function notifies the BackgroundSync thread to cancel find/getMore commands that are |
| Comment by Githook User [ 03/Sep/15 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: |
| Comment by Githook User [ 02/Sep/15 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: Not implemented for NetworkInterfaceImpl or NetworkInterfaceMock |
| Comment by Eric Milkie [ 02/Sep/15 ] |
|
We're going to use the Network ASIO functionality to cancel the outstanding network call. We can make a passthrough function in bgsync to call cancel on either the task executor or the network interface, whichever is more appropriate. |
| Comment by Eric Milkie [ 28/Aug/15 ] |
|
In order to wake it up early, we need to make the NetworkInterface close the socket associated with a task when cancel is called. This will wake up the Fetcher. |
| Comment by Eric Milkie [ 28/Aug/15 ] |
|
In addition, the bgsync thread blocks waiting for getMore to return; we need to wake it up early when transitioning to primary and entering drain mode. |