[SERVER-33520] Enable background refreshing of the logical session cache during the fuzzer test suites Created: 27/Feb/18  Updated: 29/Oct/23  Resolved: 09/Mar/18

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.6.4, 3.7.3

Type: Task Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Ian Whalen (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-33376 MongoDB 3.6.3-rc0 config server segfa... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v3.6
Sprint: TIG 2018-03-26
Participants:

 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



 Comments   
Comment by Githook User [ 27/Mar/18 ]

Author:

{'email': 'ian.whalen@gmail.com', 'name': 'Ian Whalen', 'username': 'IanWhalen'}

Message: SERVER-33520 Enable background refreshing of the logical session cache during the fuzzer test suites
Branch: v3.6
https://github.com/mongodb/mongo/commit/63ddf5e50ffeb06ceae25ff5f9c6a577d4dc6a09

Comment by Githook User [ 09/Mar/18 ]

Author:

{'email': 'ian.whalen@gmail.com', 'name': 'Ian Whalen', 'username': 'IanWhalen'}

Message: SERVER-33520 Enable background refreshing of the logical session cache during the fuzzer test suites
Branch: master
https://github.com/mongodb/mongo/commit/9658c59d2dd31280952c747791e1fec048889cf8

Generated at Thu Feb 08 04:33:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.