[SERVER-46694] Make hedging_metrics_server_status.js determinstic Created: 06/Mar/20  Updated: 29/Oct/23  Resolved: 06/Mar/20

Status: Closed
Project: Core Server
Component/s: Internal Code
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
Duplicate
is duplicated by SERVER-46692 Only increment numTotalOperations onc... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Sharding 2020-03-23
Participants:
Linked BF Score: 39

 Description   

Make the following changes to make hedging_metrics_server_status.js more robust and testing hedge reads easier.

  • Use assert.soon in checkServerStatusHedgingMetrics instead of assert.eq since the the other host might not have responded to the command request when the command finishes.
  • Add a failpoint to SeverSelector that forces the replica set monitor to return all eligible hosts (ignore isMaster latency).
  • Add a failpoint to NetworkInterfaceTL that forces startCommand to target the eligible hosts in alphabetical order (hedging_metrics_server_status.js assumes that it always target the primary first which is not always true).


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

Author:

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

Message: SERVER-46694 Make hedging_metrics_server_status.js determinstic

(cherry picked from commit 3c0fa6f8e04a518f9e05b1117d3478e5c9262ea6)
Branch: v4.4
https://github.com/mongodb/mongo/commit/04db5f40a3ee67334b0bbba6f937f33c5bb36b42

Comment by Githook User [ 06/Mar/20 ]

Author:

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

Message: SERVER-46694 Make hedging_metrics_server_status.js determinstic
Branch: master
https://github.com/mongodb/mongo/commit/3c0fa6f8e04a518f9e05b1117d3478e5c9262ea6

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