[SERVER-44809] When we wait for the cloners, we also must deliver the callback to the network thread. Created: 22/Nov/19  Updated: 29/Oct/23  Resolved: 25/Nov/19

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.3.3

Type: Bug Priority: Major - P3
Reporter: Matthew Russotto Assignee: Matthew Russotto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-44808 When we wait for the cloners, we also... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2019-12-02
Participants:
Linked BF Score: 0

 Description   

The interaction between the mock network thread and the cloner thread is somewhat perilous. In this case, we wait for the cloner by waiting on its future. This assures the callback has been scheduled to the mock network thread, but it has not actually been run. This results in a tiny race if the next operation is a runUntil and the scheduler is a bit slow at scheduling the callback.

Solution is to call runReadyNetworkOperations after waiting for the cloner in that case.



 Comments   
Comment by Githook User [ 25/Nov/19 ]

Author:

{'email': 'matthew.russotto@mongodb.com', 'name': 'Matthew Russotto', 'username': 'mtrussotto'}

Message: SERVER-44809 When we wait for the cloners, we also must deliver the callback to the network thread.
Branch: master
https://github.com/mongodb/mongo/commit/077c58726ada28ec107cc9749bd5a45e7c938359

Generated at Thu Feb 08 05:07:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.