[SERVER-46821] NetworkingBaton should pass tasks to ASIOReactor upon detach. Created: 12/Mar/20  Updated: 29/Oct/23  Resolved: 02/Apr/20

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 4.4.0-rc0, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Misha Tyulenev Assignee: Benjamin Caimano (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
depends on SERVER-47139 Introduce GuaranteedExecutor class Closed
is depended on by SERVER-46512 Ensure that connections acquired for ... Closed
is depended on by SERVER-46051 Change stream sys-perf regression due... Closed
Problem/Incident
Related
related to SERVER-46617 Improve NetworkInterfaceTL performance Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Steps To Reproduce:

Issue a hedged read

   const st = new ShardingTest({shards: 2, rs: {nodes: 2}});
   const dbName = "foo";
   const collName = "bar";
   const ns = dbName + "." + collName;
   const testDB = st.s.getDB(dbName);
 
    assert.commandWorked(testDB.runCommand({
        query: {
            find: collName,
            filter: {$where: "sleep(100); return true;"},
            $readPreference: {mode: "nearest"}
        }
    }));

and verify that the hedged read connection returns failed status

Sprint: Service Arch 2020-03-23, Service Arch 2020-04-06
Participants:
Linked BF Score: 0

 Description   

The issue is manifested when a hedge read finishes after the original read by marking the connection as failed
It happens because of the baton used for sending the RemoteCommandRequest is detached when the request returns.
The baton is owned by ARS which goes out of scope when the primary request finishes



 Comments   
Comment by Githook User [ 06/Apr/20 ]

Author:

{'name': 'Ben Caimano', 'email': 'ben.caimano@10gen.com'}

Message: SERVER-46821 Allow NetworkingBatons to send work to ASIOReactor after detach
Branch: v4.4
https://github.com/mongodb/mongo/commit/22e37d4959198d64c9422e1433e7066cb454d216

Comment by Githook User [ 01/Apr/20 ]

Author:

{'name': 'Ben Caimano', 'email': 'ben.caimano@10gen.com'}

Message: SERVER-46821 Allow NetworkingBatons to send work to ASIOReactor after detach
Branch: master
https://github.com/mongodb/mongo/commit/40a3ba610db44735061b13f0a1703de1bc0a6f37

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