-
Bug
-
Resolution: Done
-
Major
-
0.8.3.Final
-
None
Extended summary:
When:
- You setup a connector with one single table whitelisted
- The table is always (and only) modified in a transaction
- The transaction performs some other operations
Then
- The replication slot will never be updated
In the context of a transaction, the connector can receive multiple change events. Only when the last change event of the transaction is processed the lastProcessedLsn value will be updated.
But if the last change performed by the transaction affects a table that is not whitelisted then it won't even be processed, resulting in the same (old) lsn being commited once and again:
(tableSchema will be null if the table is filtered out: https://github.com/debezium/debezium/blob/v0.8.3.Final/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/RecordsStreamProducer.java#L498)
It took me a while to follow what was going on. I can provide some further explanations on why exactly this is happening but I hope it will be clear enough for anyone familiar with the code.
I tried and failed to fix it myself and do a PR. I didn't find an easy way to do it without making major design changes (or minor super dirty hacks). But I'm totally new to this, so maybe someone else can fix it neatly in five minutes.
Might (or might not) be related to:
https://issues.jboss.org/projects/DBZ/issues/DBZ-926
and
https://issues.jboss.org/projects/DBZ/issues/DBZ-892