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

Enable background refreshing of the logical session cache during the fuzzer test suites

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.4, 3.7.3
    • Component/s: Testing Infrastructure
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v3.6
    • Sprint:
      TIG 2018-03-26

      Description

      The "race-y" behavior is likely beneficial for the fuzzer's ability to find concurrency-related bugs around sessions. We should therefore enable the background refreshing of the logical session cache by explicitly setting mongod_options.set_parameters.disableLogicalSessionCacheRefresh=false in the following test suites:

      • jstestfuzz.yml
      • jstestfuzz_replication.yml
      • jstestfuzz_replication_initsync.yml
      • jstestfuzz_replication_resync.yml
      • jstestfuzz_replication_session.yml
      • jstestfuzz_sharded.yml
      • jstestfuzz_sharded_causal_consistency.yml
      • jstestfuzz_sharded_continuous_stepdown.yml
      • jstestfuzz_sharded_session.yml

      The following patch to the jstestfuzz_sharded.yml test suite would have immediately caught SERVER-33376 (as would running any sharding-related test suite that didn't require the use of the of the "refreshLogicalSessionCacheNow" command). Thanks to Esha Maharishi for determining SERVER-33376 was missed due to how all MongoDB deployments started by both resmoke.py and the mongo shell specify --setParameter=disableLogicalSessionCacheRefresh=true.

      diff --git a/buildscripts/resmokeconfig/suites/jstestfuzz_sharded.yml b/buildscripts/resmokeconfig/suites/jstestfuzz_sharded.yml
      index 94b96613e2..7de220b60b 100644
      --- a/buildscripts/resmokeconfig/suites/jstestfuzz_sharded.yml
      +++ b/buildscripts/resmokeconfig/suites/jstestfuzz_sharded.yml
      @@ -34,6 +34,7 @@ executor:
           mongod_options:
             set_parameters:
               enableTestCommands: 1
      +        disableLogicalSessionCacheRefresh: false
               numInitialSyncAttempts: 1
               writePeriodicNoops: 1
             verbose: ''
      

      # The LogicalSessionCache does automatic background refreshes in the server. This is
      # race-y for tests, since tests trigger their own immediate refreshes instead. Turn off
      # background refreshing for tests. Set in the .yml file to override this.
      if "disableLogicalSessionCacheRefresh" not in suite_set_parameters:
          suite_set_parameters["disableLogicalSessionCacheRefresh"] = True
      

      https://github.com/mongodb/mongo/blob/r3.6.2/buildscripts/resmokelib/core/programs.py#L48-L52
      https://github.com/mongodb/mongo/blob/r3.6.2/src/mongo/shell/servers.js#L1059-L1060

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ian.whalen Ian Whalen
              Reporter:
              max.hirschhorn Max Hirschhorn
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: