2917b78881
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. |
||
---|---|---|
.. | ||
src | ||
pom.xml |