Allow session reuse for transactions with arbitrary atClusterTime timestamp

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • Execution Team 2024-06-24, Execution Team 2024-07-22
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Kiro Morkos
              Votes:
              0 Vote for this issue
              Watchers:
              14 Start watching this issue

                Created:
                Updated: