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

Fix list_all_sessions.js assertion on the ordering of $listSession output

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc6
    • Affects Version/s: None
    • Component/s: None
    • Server Security
    • Fully Compatible
    • v8.0
    • Security 2024-05-13, Security 2024-05-27
    • 200

      In the sharded cluster case, these lines in list_all_sessions.js, where it asserts that the first session ID in the $listSession output will always match the session ID started by the user1@admin user, will sometimes fail because it relies on the assumption that only that session is active when it refreshed the config.system.sessions collection through the preceding refreshLogicalSessionCacheNow command.

      Recent changes to FTDC breaks this assumption, since the ClusterServerParameterRefresher (which services a getClusterParameter command by the FTDC periodic metadata collector during startup) starts its own internal session. By the time refreshLogicalSessionCacheNow is called, there may be more than one active session to be upserted into the session collection with the same lastUse timestamp. This causes the success of the assertion to depend on the ordering of the $listSesisons aggregation output.

            Assignee:
            erwin.pe@mongodb.com Erwin Pe
            Reporter:
            erwin.pe@mongodb.com Erwin Pe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: