[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: |
|
||||||||
| 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: (cherry picked from commit d101a617bada9252a4f0a29b8f615ee62abb979b) |
| Comment by Githook User [ 08/Aug/19 ] |
|
Author: {'name': 'Jamie Heppenstall', 'email': 'jamie.heppenstall@mongodb.com', 'username': 'JamesHeppenstall'}Message: |