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

Not able to identify the transaction boundaries using ChangeStream

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      The MongoDB documentation (https://www.mongodb.com/docs/manual/reference/change-events/) specifies that for a change event, the transaction associated with that event can be uniquely identified by the lsid and txnNumber fields in the ChangeStream document.

      The problem during change data capture using ChangeStream is that I'm not able to determine whether the transaction has ended or not unless and otherwise, the next transaction comes in (different txnNumber) or a non-transactional database operation (lsid and txnNumber are null using the Java driver) is performed. Is there any way to determine if the current transaction has ended or not from the ChangeStream without needing another consecutive operation?

            Assignee:
            yuan.fang@mongodb.com Yuan Fang
            Reporter:
            kirupha2000@gmail.com Kiruphasankaran Nataraj
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: