[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: |
|
||||
| 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: (cherry picked from commit c1405c9ec65d1e57b5c9a1ee3d3c8d7f97f06a28) |
| Comment by Githook User [ 24/Jan/20 ] |
|
Author: {'username': 'jsmulrow', 'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com'}Message: (cherry picked from commit c1405c9ec65d1e57b5c9a1ee3d3c8d7f97f06a28) |
| Comment by Githook User [ 24/Jan/20 ] |
|
Author: {'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow', 'name': 'Jack Mulrow'}Message: (cherry picked from commit c1405c9ec65d1e57b5c9a1ee3d3c8d7f97f06a28) |
| Comment by Githook User [ 21/Oct/19 ] |
|
Author: {'name': 'Jack Mulrow', 'username': 'jsmulrow', 'email': 'jack.mulrow@mongodb.com'}Message: |