[SERVER-38062] Add assert.commandWorked() to commands in read_pref_cmd.js Created: 09/Nov/18  Updated: 29/Oct/23  Resolved: 10/Dec/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.4.19, 3.6.10, 4.0.6, 4.1.7

Type: Bug Priority: Major - P3
Reporter: Blake Oler Assignee: Blake Oler
Resolution: Fixed Votes: 0
Labels: neweng, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0, v3.6, v3.4
Sprint: Sharding 2018-12-17
Participants:
Linked BF Score: 40

 Description   

Multiple times in read_pref_cmd.js, the test marches forward assuming commands worked without actually verifying that they work. This can lead to race conditions and unlikely bugs, especially on slow machines.

These lines in particular need to be changed as part of the linked BF, but we should add the assertion to other commands as well.



 Comments   
Comment by Githook User [ 28/Dec/18 ]

Author:

{'username': 'BlakeIsBlake', 'email': 'blake.oler@mongodb.com', 'name': 'Blake Oler'}

Message: SERVER-38062 Add assertions to commands in read_pref_cmd.js

(cherry picked from commit 7b1e64f12e855d979232ef7b185002d5c8103353)
Branch: v3.4
https://github.com/mongodb/mongo/commit/3cf1a9edcdb9761a94ec4b37e3156c91cb4d7c7d

Comment by Githook User [ 28/Dec/18 ]

Author:

{'username': 'BlakeIsBlake', 'email': 'blake.oler@mongodb.com', 'name': 'Blake Oler'}

Message: SERVER-38062 Add assertions to commands in read_pref_cmd.js

(cherry picked from commit 7b1e64f12e855d979232ef7b185002d5c8103353)
Branch: v3.6
https://github.com/mongodb/mongo/commit/11f1cd95a26d94bb5c5298ed34c0fd4a857c35c5

Comment by Githook User [ 28/Dec/18 ]

Author:

{'username': 'BlakeIsBlake', 'email': 'blake.oler@mongodb.com', 'name': 'Blake Oler'}

Message: SERVER-38062 Add assertions to commands in read_pref_cmd.js

(cherry picked from commit 7b1e64f12e855d979232ef7b185002d5c8103353)
Branch: v4.0
https://github.com/mongodb/mongo/commit/5e3ff3ab9acc0540088437207c1552872eb8dcc0

Comment by Githook User [ 10/Dec/18 ]

Author:

{'name': 'Blake Oler', 'email': 'blake.oler@mongodb.com', 'username': 'BlakeIsBlake'}

Message: SERVER-38062 Add assertions to commands in read_pref_cmd.js
Branch: master
https://github.com/mongodb/mongo/commit/7b1e64f12e855d979232ef7b185002d5c8103353

Generated at Thu Feb 08 04:47:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.