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

Logical sessions cache refresh ignores write errors from updating session document, leading to cursors being killed early

    XMLWordPrintableJSON

Details

    • Sharding NYC
    • Fully Compatible
    • ALL
    • v6.3, v6.2, v6.0, v5.0, v4.4
    • Sharding NYC 2023-04-03, Sharding NYC 2023-04-17
    • 2

    Description

      The changes from 46ab40a as part of SERVER-42508 removed the usage of BatchedCommandResponse::toStatus() and left only the usage of getStatusFromCommandResult(). These behaviors aren't equivalent because it means write errors are silently ignored by the LogicalSessionCacheRefresh background job. This leads the LogicalSessionCacheRefresh background job to call killCursorsWithMatchingSessions() and kill cursors which don't have documents in the config.system.sessions collection despite flushing the cache to disk not persisting at least some of the documents to the config.system.sessions collection.

      The intended behavior would be for refreshSessions() to thrown an exception and skip calling killCursorsWithMatchingSessions() in that round of the LogicalSessionCacheRefresh background job.

      Attachments

        Activity

          People

            abdul.qadeer@mongodb.com Abdul Qadeer
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            1 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: