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

Make DocumentSourceCursor release storage engine resources

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • Fully Compatible
    • CAR Team 2024-03-18, CAR Team 2024-04-01
    • 159

      With the work done in order to enable having additional participants in multi-shard transactions we can end up in a situation where the following happens for a given session:

      • Operation 1 (Op1) reads some documents from a local WT cursor via DocumentSourceCursor
      • Op1 then performs a remote call and checks in the session + transaction resources to prevent a deadlock
      • The node then receives an abort transaction command (Operation 2)
      • Op2 checks out the session and we end up in a situation where both Op1 and Op2 have resources for the transaction

      To avoid this we should make sure we do not hold any resources after reading the data. This way we can maintain the invariant that only one operation at a time has full ownership of the session and its resources.

            Assignee:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Reporter:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: