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

In jstests using failPoints, use waitForFailPoint command instead of checking logs

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.2.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • QE 2022-10-17
    • 44

    Description

      Based on BF-26526.

      For example this test: https://github.com/mongodb/mongo/blob/a7cda0d9cf32b7074b4c9a2efe6e6590b4dab564/jstests/core/txns/speculative_snapshot_includes_all_writes.js
      1. Setups fail point.
      2. Starts parallel shell to hit the fail point.
      3. In main shell uses checkLog to find line about hitting the fail point.
      4. Checks stuff

      It can fail when between steps 2 and 3 too many events will happen so message about hitting the fail point will be pushed out of RAM log cache.

      To avoid it, we need to replace checkLog with waitForFailPoint command, created specifically for this case: https://github.com/mongodb/mongo/wiki/The-%22failCommand%22-fail-point

      Also, we should check other tests that may contain similar problems.

      Attachments

        Activity

          People

            ivan.fefer@mongodb.com Ivan Fefer
            ivan.fefer@mongodb.com Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: