Unverified Commit c3826170 authored by Dimitri Fontaine's avatar Dimitri Fontaine Committed by GitHub
Browse files

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: default avatarShubham Dhama <shubhamdhamaofficial@gmail.com>
parent 5cb32c6a
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment