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

Allow session reuse for transactions with arbitrary atClusterTime timestamp

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • Execution Team 2024-06-24, Execution Team 2024-07-22

      If a session is used for a transaction that commits at a timestamp T, then that session can never be used for a transaction with an atClusterTime value <=T because it will trigger a conflict when updating the session document in the config.transactions collection, even if there are no conflicts with documents in user-space. See here for a demonstration of the issue in mongosh: https://gist.github.com/kmorkos/8b9bb5493ec0db3f64e711ae02cc0311

       

      For background on why this change would be useful: the current behavior makes it impossible to use arbitrary atClusterTime values for transactions in application code that uses a driver since the driver's session pooling makes it non-deterministic if a recycled session was used for a transaction after the given timestamp or not. IOW the current behavior violates the "statelessness" property of sessions that session pooling assumes.

            Assignee:
            Unassigned Unassigned
            Reporter:
            kiro.morkos@mongodb.com Kiro Morkos
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated: