tet123/debezium-connector-sqlserver
Vadzim Ramanenka 2917b78881 DBZ-7889: Multiple completed reading from a capture instance notifications
There is a small chance the connector doesn't advance and re-reads
the same LSN range. This happens under the following conditions:
* a new capture instance has been added in the current LSN range;
* while reading CDC changes one of existing capture instances
  dissapears.
The dissapeared capture instance causes an exception which is catched
and processed in `processErrorFromChangeTableQuery`. This leads to
the current connector iteration to be correctly exited without
advancing. On the next iteration the connector starts from the same
LSN as the previous iteration and finds the same new capture instance.
Although `Set` was used to track the list of tables to be removed
`SqlServerChangeTable` doesn't implement `hashCode` so same table
could be added multiple times to the same set.

The fix is to implement `hashCode` and `equals` methods in `ChangeTable`
which is the parent class of `SqlServerChangeTable`.

Additionally a synchronisation block is needed where the tables
are added to the hash map as it happens in a different thread from
the one that removes the tables from the hash map.
2024-05-31 07:24:40 +02:00
..
src DBZ-7889: Multiple completed reading from a capture instance notifications 2024-05-31 07:24:40 +02:00
pom.xml [maven-release-plugin] prepare for next development iteration 2024-05-13 06:42:03 +00:00