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

Flip order of assert.lte arguments in logical_time_metadata.js

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v4.2, v4.0, v3.6

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: