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

Fix profiler query in read_pref_cmd.js and not assert that the command runs on two nodes when hedging is enabled

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.4.0-rc0, 4.7.0
    • None
    • Sharding
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Sharding 2020-03-23
    • 49

    Description

      The profiler query that read_pref_cmd.js currently uses could match profiler docs for failed executions (e.g. due to StaleDbVersion) and for $out aggregation stage that the secondary routes to the primary for non-inline mapreduce. So the test sometimes overcounts the number nodes that the command successfully runs on (see the comment in BF-16548). To fix this, we need to include "ns" and "errCode" in the query. 

      Also, the test assumes that when hedging is enabled, the additional request always gets sent successfully and runs to completion on the other eligible node. This is not true since the AsyncRequestSender detaches the SubBaton for the command request as soon as the command finishes, after that the connection is returned so the additional request cannot be sent. So it should assert that the command runs on at least one node. 

       

      Attachments

        Activity

          People

            cheahuychou.mao@mongodb.com Cheahuychou Mao
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: