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

Workload connection cache in FSM suite is not nulled out properly

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Sprint:
      TIG F (01/29/16)

      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

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: