[SERVER-21940] Workload connection cache in FSM suite is not nulled out properly Created: 18/Dec/15  Updated: 18/Nov/16  Resolved: 19/Jan/16

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: 3.2.0
Fix Version/s: 3.2.3, 3.3.1

Type: Bug Priority: Minor - P4
Reporter: Kamran K. Assignee: Jonathan Abrahams
Resolution: Done Votes: 0
Labels: test-only
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-20297 Add the ability to connect to all clu... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Sprint: TIG F (01/29/16)
Participants:

 Description   

max.hirschhorn noticed that the code to null out the (currently unused) workload connection cache doesn't actually null out the connections: https://github.com/mongodb/mongo/blob/r3.2.0/jstests/concurrency/fsm_libs/fsm.js#L48-L54

You can repro the bug by applying this patch to master and then running the sharded concurrency suite:

diff --git a/jstests/concurrency/fsm_libs/fsm.js b/jstests/concurrency/fsm_libs/fsm.js
index 7ba2544..a8bc323 100644
--- a/jstests/concurrency/fsm_libs/fsm.js
+++ b/jstests/concurrency/fsm_libs/fsm.js
@@ -20,7 +20,7 @@ var fsm = (function() {
         // allows state functions to access arbitrary cluster nodes for verification checks.
         // See fsm_libs/cluster.js for the format of args.cluster.
         var connCache;
-        if (args.passConnectionCache) {
+        if (true) {
             connCache = {
                 mongos: [],
                 config: [],
@@ -45,13 +45,14 @@ var fsm = (function() {
             currentState = nextState;
         }
 
-        if (args.passConnectionCache) {
+        if (true) {
             connCache.mongos.forEach(conn => conn = null);
             connCache.config.forEach(conn => conn = null);
 
             var shardNames = Object.keys(connCache.shards);
             shardNames.forEach(name => connCache.shards[name].forEach(conn => conn = null));
             gc();
+            printjson(connCache);
         }
     }
 

Run the suite with this command:

python buildscripts/resmoke.py --suites=concurrency_sharded



 Comments   
Comment by Githook User [ 19/Jan/16 ]

Author:

{u'username': u'hptabster', u'name': u'Jonathan Abrahams', u'email': u'jonathan@mongodb.com'}

Message: SERVER-21940 Workload connection cache in FSM suite is not nulled out properly

(cherry picked from commit 39be026de1627f3d93d9cdd9528c17b16667402f)
Branch: v3.2
https://github.com/mongodb/mongo/commit/c6a984212348346b8c11e1d5d73f1dd52269014d

Comment by Githook User [ 19/Jan/16 ]

Author:

{u'username': u'hptabster', u'name': u'Jonathan Abrahams', u'email': u'jonathan@mongodb.com'}

Message: SERVER-21940 Workload connection cache in FSM suite is not nulled out properly
Branch: master
https://github.com/mongodb/mongo/commit/39be026de1627f3d93d9cdd9528c17b16667402f

Generated at Thu Feb 08 03:58:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.