Fix transform process to handle endpos in between transactions. (#166)
* tests: Add test for scenario when endpos is set between BEGIN and COMMIT.
This test reproduces the issue mentioned in #154.
* Add new test to run-tests.yml
* Fix transform process to handle endpos in between transactions.
We might have a transaction that spans over multiple JSON files, and in that
case we always have a SWITCH WAL message at the end of the current file,
within the current transaction.
When we reach the end of file and we're in the middle of a transaction but
we don't have a SWITCH WAL message, it means that we have reached endpos. In
that case just ignore the currently opened transaction and replace its
contents by a synthetic KEEPALIVE message to advance the target system.
* Code cleanup.
* Review and fix to account for target case only...
Co-authored-by:
Shubham Dhama <shubhamdhamaofficial@gmail.com>
parent
5cb32c6a
Please register or sign in to comment