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

Fix skipping streaming messages when resuming from latest JSON file. (#359)

* Fix skipping streaming messages when resuming from latest JSON file.

It might happen that several JSON messages have the same LSN in our stream,
usually that concerns KEEPALIVE and BEGIN and COMMIT message. Unless paying
attention to the latest message action, we could skip a BEGIN message that
has the same LSN as the latest message even if that message was a KEEPALIVE.

Fix this by keeping around the latest message action. It should be all we
need to distinguish a new message from the latest one.

* Registering latest message at resume properly.

It could be that we have several messages with the same LSN: I, L, E, for
instance. Take that into account in streamCheckResumePosition.

* Code review.
parent d1cceab4
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