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

Change tests to properly count the number of sessions used

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Cluster Scalability

      The following list of tests expect a very specific number of sessions being used in the cluster:

      1. list_all_local_sessions.js
      2. transaction_reaper.js
      3. kill_sessions.js
      4. txn_commit_optimizations_for_read_only_shards
      5. sessions.js
      6. router_transactions_metrics.js

      However, some internal operations (like the one added by SERVER-74107) might add extra sessions as normal part of the cluster inner workings. We should find definite fixes to those tests, so future features that add sessions and transactions in the cluster do not need to also take into account these tests. The following proposals can be applied for the tests:

      • list_all_local_sessions.js and transaction_reaper.js could start tracking all the sessions being created, and then at the end of the test we could verify their existence in the config.system.sessions collection.
      • transaction_reaper.js could be change to capture the session ID used for the test, and then search for it in the test logs.
      • kill_sessions.js and sessions.js should remove the maxSessions, and create a unittest like this one that checks the parent and the child transaction are tracked as one logical session in the LogicalSessionCache, where we call vivify() against the parent and child session and make sure there is only one on the LogicalSessionCache

            Assignee:
            Unassigned Unassigned
            Reporter:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: