[SERVER-46879] Fix profiler query in read_pref_cmd.js and not assert that the command runs on two nodes when hedging is enabled Created: 16/Mar/20  Updated: 29/Oct/23  Resolved: 16/Mar/20

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

Type: Bug Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Cheahuychou Mao
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Sharding 2020-03-23
Participants:
Linked BF Score: 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. 

 



 Comments   
Comment by Githook User [ 18/Mar/20 ]

Author:

{'email': 'cheahuychou.mao@mongodb.com', 'name': 'Cheahuychou Mao', 'username': 'cheahuychou'}

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

(cherry picked from commit 86550d35274473e6aee443c8fa2e4544c043941d)
Branch: v4.4
https://github.com/mongodb/mongo/commit/d3557c5e90827b274dff3bcf91a5a4246ed10b38

Comment by Githook User [ 16/Mar/20 ]

Author:

{'name': 'Cheahuychou Mao', 'username': 'cheahuychou', 'email': 'cheahuychou.mao@mongodb.com'}

Message: SERVER-46879 Fix profiler query in read_pref_cmd.js and not assert that the command runs on two nodes when hedging is enabled
Branch: master
https://github.com/mongodb/mongo/commit/86550d35274473e6aee443c8fa2e4544c043941d

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