[SERVER-44130] Flip order of assert.lte arguments in logical_time_metadata.js Created: 21/Oct/19  Updated: 29/Oct/23  Resolved: 21/Oct/19

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

Type: Task Priority: Major - P3
Reporter: Jack Mulrow Assignee: Jack Mulrow
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.2, v4.0, v3.6
Participants:

 Description   

This check in logical_time_metadata.js is meant to succeed if the cluster time in a command response is >= the last applied opTime returned from replSetGetStatus. The timestamps are compared using timestampCompare, which returns -1 if the first argument is smaller and 0 if the two arguments are equal. Currently the test uses assert.lte(0, <timestampCompare result>), which throws if 0 is not less than or equal to the result, so the test 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 [ 24/Jan/20 ]

Author:

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

Message: SERVER-44130 Flip order of assert.lte arguments in logical_time_metadata.js

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

Comment by Githook User [ 24/Jan/20 ]

Author:

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

Message: SERVER-44130 Flip order of assert.lte arguments in logical_time_metadata.js

(cherry picked from commit c1405c9ec65d1e57b5c9a1ee3d3c8d7f97f06a28)
Branch: v4.0
https://github.com/mongodb/mongo/commit/14bb8bc411c66518dc31529778e3b59b90609512

Comment by Githook User [ 24/Jan/20 ]

Author:

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

Message: SERVER-44130 Flip order of assert.lte arguments in logical_time_metadata.js

(cherry picked from commit c1405c9ec65d1e57b5c9a1ee3d3c8d7f97f06a28)
Branch: v3.6
https://github.com/mongodb/mongo/commit/63744c0404eb7c17dfb107b03b85c87ac69c9159

Comment by Githook User [ 21/Oct/19 ]

Author:

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

Message: SERVER-44130 Flip order of assert.lte arguments in logical_time_metadata.js
Branch: master
https://github.com/mongodb/mongo/commit/c1405c9ec65d1e57b5c9a1ee3d3c8d7f97f06a28

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