ExportXMLWordPrintableJSON

    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Current behavior

      ServerSession.hasTimedOut computes idle minutes as round(((elapsedMs % 86400000) % 3600000) / 60000) and returns idleTimeMinutes > sessionTimeoutMinutes - 1. The modulo folds idle time into minutes past the hour. A session idle for 60 minutes with logicalSessionTimeoutMinutes of 30 is compared as 0 > 29 and is reused.

      Expected behavior

      Idle time is the elapsed minutes since lastUse. The session is not reused when that value is greater than logicalSessionTimeoutMinutes - 1. The one-minute margin stays. The hour and day modulo does not. The sessions spec says a driver must not send an lsid the server may have expired.

      Scope

      src/sessions.ts ServerSession.hasTimedOut, used by ServerSessionPool.acquire and release. Present on main. It does not depend on a server version. The server default for logicalSessionTimeoutMinutes is 30. When the topology has not reported a timeout, the pool uses 10.

      Pull request

      PR 5102

            Assignee:
            Unassigned
            Reporter:
            Luke Prochazka (EXT)
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: