Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-42610

Flip order of assert.lte arguments in shards_and_config_return_last_committed_optime.js

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.2
    • Sprint:
      Sharding 2019-08-26
    • 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.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: