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

Not able to identify the transaction boundaries using ChangeStream

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      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?

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: