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

Add "lastCommittedOpTime" field to scrub() function in set_param1.js

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Server Serverless 2022-07-25, Server Serverless 2022-08-08
    • 0

    Description

      set_param1.js starts with a test that attempts to update a logLevel field, revert it, then check for equivalency between the new and old documents.  However, the assertion performs the check on the entire document, which contains many fields outside the scope of the test.  This opens the test up to issues involving concurrency when other threads or processes modify the underlying document between the time we retrieve the old document and when we retrieve the new document, making the test brittle.  Previously, another team has attempted to address the brittleness by adding a scrub() function that removes fields from the documents outside the scope of the test, but a more robust test would be simply to assert on fields within the scope of the test, in this case logLevel.  In their case, they needed to deal with fields starting with "failpoint.", and in our case the affect field is "lastCommittedOpTime".

      As a race-type issue, occurrences are rare, but it may still be worth asking around to determine the intent of the test and see if we might be able to modify it to assert only on the logLevel field, otherwise the suggested course of action is to add the "lastCommittedOpTime" to the scrub() function.

      Attachments

        Activity

          People

            hugh.tong@mongodb.com Hugh Tong (Inactive)
            hugh.tong@mongodb.com Hugh Tong (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: