Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-46821

NetworkingBaton should pass tasks to ASIOReactor upon detach.

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.0-rc0, 4.7.0
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v4.4
    • Hide

      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

      Show
      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
    • Service Arch 2020-03-23, Service Arch 2020-04-06
    • 0

      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

            Assignee:
            ben.caimano@mongodb.com Benjamin Caimano (Inactive)
            Reporter:
            misha.tyulenev@mongodb.com Misha Tyulenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: