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

    • 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

      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.

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

              Created:
              Updated:
              Resolved: