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

Use a mockable time source for shard_connection_tests.cpp

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: 4.4.0
    • Fix Version/s: Backlog
    • Component/s: Sharding
    • Labels:
      None
    • Operating System:
      ALL
    • Linked BF Score:
      20

      Description

      checkNewConns utility function in shard_connection_test.cpp is creating new connections and tries to differentiate them from older ones using the creation timestamp. On certain hardware the clock resolution is not high enough and the new connections end up getting the same time, which makes the test unreliable.

      An attempt to fix this was already done by Kaloian Manassiev (SERVER-34857) back in 2018 for version 4.0.

      Moreover this test was recently removed in master (SERVER-47426)

      Either we find out that this test is obsolete and can be now removed also from 4.4 or we will need to fix it in a proper way using a mockable time source to explicitly advance the time between different connection creations.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-sharding-nyc Backlog - Sharding NYC
              Reporter:
              tommaso.tocci Tommaso Tocci
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: