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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.4.0-rc0, 4.7.0
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Sharding 2020-03-23
    • 49
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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. 

       

            Assignee:
            Cheahuychou Mao
            Reporter:
            Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: