Jul 2, 2021
Yes, there could be multiple transactions happening in the DB simultaneously. To tackle that, when we use the START_TRANSACTION and COMMIT_TRANSACTION events, we need to use it within the scope of a transaction id (TX_ID). So, the event buffer state can be thought of as a key:value pair where key is the TX_ID and value being a list of RowEvents.
Having said this, TX_ID needs to be supported by the DB. AFAIK, newer versions of MySQL and Postgres supports GTID, which can be used. If not, we would need to
Please let me know if I answered your question.