-
Feature Request
-
Resolution: Done
-
Major
-
None
-
False
-
None
-
False
Feature request or enhancement
For feature requests or enhancements, provide this information, please:
Which use case/requirement will be addressed by the proposed feature?
As docs state ts_ms is the time that the change is applied to the database. For other connectors this is explicitly stated as the commit timestamp. For Vitess docs, it's a bit vague, but it would make sense that this is commit timestamp.
However, in the code we are actually sending the timestamp of the BEGIN event. This means that ordering has issues. For example, txA begins at t1, txB begins at t2 and commits at t3, then txA commits at t4. Then the downstream user will see that the ts_ms actually decreases which is incorrect. It should only be equal or increasing if it is the time the change is applied to the database
Implementation ideas (optional)
Modify message decoder interface to have another method for setting the commit timestamp. Set this when we receive commit events. Use that for DML events, not the cached begin timestamp value.