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

Make the test update_node_clustertime_replset.js more resilient to $$NOW

    • Query Optimization
    • Fully Compatible
    • v8.0, v7.3, v7.0, v6.0, v5.0
    • 0

      A part of this test is to check if an inserted document can be successfully removed by findAndModify. Specifically, the deletion query checks if the current time $$NOW is greater than the insertion time.

      In BF-32629, we observed that the deletion wasn't successful and hence failed the test. Given the low frequency of the BF, there are 2 possible causes:

      1. The insertion and the deletion happened under one millisecond.
      2. NTP adjusted the system clock and caused the clock going backward for a few milliseconds between the two commands.

      Even though there's little we can prevent the test failure for the cause #2, we can improve the test to make it not subject to the cause #1 by changing $lt to $lte in the query of the deletion command. This change wouldn't deviate from the original goal of the test.

            Assignee:
            chii.huang@mongodb.com Chi-I Huang
            Reporter:
            chii.huang@mongodb.com Chi-I Huang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: