DBZ-2625 Retry on transaction deadlock

When CDC is reconfigured while connector is running it is possbile to
end up in tx deadlock. Such situation is only temporary and connector
could recover from it upon restart.
This commit is contained in:
Jiri Pechanec 2020-11-06 08:32:05 +01:00 committed by Chris Cranford
parent c41aa0e70f
commit 3b1f3e7454

View File

@ -30,6 +30,8 @@ protected boolean isRetriable(Throwable throwable) {
|| throwable.getMessage().contains("Connection reset")
|| throwable.getMessage().contains("SHUTDOWN is in progress")
|| throwable.getMessage()
.startsWith("An insufficient number of arguments were supplied for the procedure or function cdc.fn_cdc_get_all_changes_"));
.startsWith("An insufficient number of arguments were supplied for the procedure or function cdc.fn_cdc_get_all_changes_")
|| throwable.getMessage()
.endsWith("was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction."));
}
}