Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-1577

Workarounds for killAllSessions in unified test runner

    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-3950 Backlog
      CXX-2222 Backlog
      CSHARP-3534 Fixed 2.13.0
      GODRIVER-1949 Fixed 1.6.0
      JAVA-4097 Won't Fix
      NODE-3189 Gone away
      MOTOR-704 Duplicate
      PYTHON-2636 Done
      PHPLIB-640 Fixed 1.9.0
      RUBY-2574 Fixed 2.15.0
      RUST-733 Duplicate
      SWIFT-1176 Won't Do
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-3950 Backlog CXX-2222 Backlog CSHARP-3534 Fixed 2.13.0 GODRIVER-1949 Fixed 1.6.0 JAVA-4097 Won't Fix NODE-3189 Gone away MOTOR-704 Duplicate PYTHON-2636 Done PHPLIB-640 Fixed 1.9.0 RUBY-2574 Fixed 2.15.0 RUST-733 Duplicate SWIFT-1176 Won't Do

      Action for Drivers

      The unified test format spec clarifies additional error codes that may be ignored when executing killAllSessions to work around SERVER-54216 and Atlas prohibiting usage of the command. Additionally, it suggests several approaches to disable killAllSessions behavior for Atlas (e.g. detecting "mongodb.net" hostnames, implementing a configuration option for the test runner).

      Original Description

      Unified test format currently contains the recommendation to kill all sessions before every test:

      Terminating Open Transactions

      Open transactions can cause tests to block indiscriminately. Test runners SHOULD terminate all open transactions at the start of a test suite and after each failed test by killing all sessions in the cluster. Using the internal MongoClient, execute the killAllSessions command on either the primary or, if connected to a sharded cluster, all mongos servers.

      killAllSessions command does not work in Atlas (HELP-22193). The closest workaround is killing the user's own sessions, but this currently doesn't work due to server bug (SERVER-54216).

      Until SERVER-54216 is fixed, unified test runners should provide an option to not run killAllSessions at all, and the workload executor should request this option when instantiating the test runner.

      When SERVER-54216 is fixed, unified test runners may switch to killing only sessions of their user, at which point the option to not kill sessions may be removed, OR outside of Atlas the test runners could continue killing all sessions but for Atlas testing the test runners would only kill their own sessions.

      Note that killing sessions is not strictly necessary in the test runner unless transactions are actually being used, and currently Atlas planned maintenance tests do not use transactions.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: