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
    • Labels:
      None

      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:
            9 Start watching this issue

              Created:
              Updated: