Details
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.