Skip to content

Commit 8dc8ffb

Browse files
findinpathebyhr
authored andcommitted
Relax the recoverable exception matching for concurrent transactions
Make sure to retry as well on exceptions with the following message ``` Caused by: com.amazon.redshift.util.RedshiftException: ERROR: could not complete because of conflict with concurrent transaction ``` Apparently, the previous matching for concurrent transactions exceptions relied on an exception message that did not end with "concurrent transaction" phrase.
1 parent cc67110 commit 8dc8ffb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/trino-redshift/src/test/java/io/trino/plugin/redshift/TestingRedshiftServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static <T, E extends Exception> T executeWithRedshift(HandleCallback<T, E
6666
public static boolean isExceptionRecoverable(Throwable exception)
6767
{
6868
return exception != null && (
69-
exception.getMessage().matches(".* concurrent transaction .*")
69+
exception.getMessage().matches(".* concurrent transaction.*")
7070
|| exception.getMessage().matches(".*deadlock detected.*")
7171
|| exception.getMessage().matches(".*could not open relation with OID.*")
7272
|| exception.getMessage().matches(".*The connection attempt failed.*"));

0 commit comments

Comments
 (0)