[SERVER-42610] Flip order of assert.lte arguments in shards_and_config_return_last_committed_optime.js Created: 02/Aug/19  Updated: 29/Oct/23  Resolved: 08/Aug/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.2.1, 4.3.1

Type: Bug Priority: Major - P3
Reporter: Jack Mulrow Assignee: James Heppenstall (Inactive)
Resolution: Fixed Votes: 0
Labels: esha-summer-2019-neweng, neweng, sharding-wfbf-day
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.2
Sprint: Sharding 2019-08-26
Participants:
Linked BF Score: 12

 Description   

This check in shards_and_config_return_last_committed_optime.js is meant to succeed if the opTime in a command response is <= the last committed opTime returned from replSetGetStatus. The timestamps are compared using bsonWoCompare, which returns -1 if the first argument is smaller and 0 if the two arguments are equal. Currently the test uses assert.lte(0, <bsonWoCompare result>), which throws if 0 is not less than or equal to the result, so will incorrectly fail if the result is -1. The order of the arguments passed to assert.lte should be flipped.



 Comments   
Comment by Githook User [ 07/Oct/19 ]

Author:

{'name': 'Jack Mulrow', 'username': 'jsmulrow', 'email': 'jack.mulrow@mongodb.com'}

Message: SERVER-42610 Flip order of assert.lte arguments in shards_and_config_return_last_committed_optime.js

(cherry picked from commit d101a617bada9252a4f0a29b8f615ee62abb979b)
Branch: v4.2
https://github.com/mongodb/mongo/commit/2dafb9056da73883a4955726a2cbc31aa704aaee

Comment by Githook User [ 08/Aug/19 ]

Author:

{'name': 'Jamie Heppenstall', 'email': 'jamie.heppenstall@mongodb.com', 'username': 'JamesHeppenstall'}

Message: SERVER-42610 Flip order of assert.lte arguments in shards_and_config_return_last_committed_optime.js
Branch: master
https://github.com/mongodb/mongo/commit/d101a617bada9252a4f0a29b8f615ee62abb979b

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