Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-2607

"Parse lastWriteDate" test requires a larger periodic noop write interval

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Description of Drivers Ticket:

      The "Parse lastWriteDate" from the Max Staleness tests may not succeed if mongod is configured with periodicNoopIntervalSecs of 1.

      The test verifies that the client observes an increase in lastWriteDate after performing these steps (copied verbatim):

      1. Insert a document and wait one second.
      2. Get the client's ServerDescription for the server. It must have a non-zero lastWriteDate.
      3. Insert a document and wait one second.
      4. Get the client's ServerDescription for the server.

      I believe this is due to setting the periodicNoopIntervalSecs to 1 in mongo orchestration from this change.

      libmongoc's implementation of this test was inconsistently failing. And the resulting investigation (CDRIVER-2985) observed this was due to the periodic noop writer inserting shortly before step 2. Since lastWriteDate has second-level granularity, the insert of step 3 is applied within the same second. And both ServerDescriptions may end up reporting the same lastWriteDate by the end of the test.

      I think the most straightforward fix is to add another sleep between the first server selection and the insert, so they do not end up falling within the same second.
      See DRIVERS-1215 for updated details.

            Assignee:
            Unassigned Unassigned
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: