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

list_local_sessions.js can fail if $listLocalSessions occurs during a cache refresh

    • Fully Compatible
    • ALL
    • v6.0
    • Hide

      Create a failpoint to pause after releasing the lock when swapping during LogicalSessionCacheImpl::_refresh() and wait for it to be entered before calling $listLocalSessions in the test.

      Show
      Create a failpoint to pause after releasing the lock when swapping during LogicalSessionCacheImpl::_refresh() and wait for it to be entered before calling $listLocalSessions in the test.
    • Sharding NYC 2022-06-13, Sharding 2022-06-27
    • 15
    • 2

      list_local_sessions.js will create a session and then will use $listLocalSessions to retrieve all sessions and the current user's sessions and verify that the created session is present.

      The logical session cache will return these sessions from its _activeSessions. However, during a cache refresh (which happens periodically), these sessions will be temporarily swapped out until the backswapper goes out of scope. It is therefore possible for the $listLocalSessions command to fail to return the created session if the request is processed during this period of time when _activeSessions has been swapped.

            Assignee:
            nandini.bhartiya@mongodb.com Nandini Bhartiya
            Reporter:
            brett.nawrocki@mongodb.com Brett Nawrocki
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: