vincbeck commented on code in PR #59017:
URL: https://github.com/apache/airflow/pull/59017#discussion_r2586475232
##########
providers/amazon/src/airflow/providers/amazon/aws/hooks/redshift_sql.py:
##########
@@ -206,6 +207,14 @@ def get_table_primary_key(self, table: str, schema: str |
None = "public") -> li
pk_columns = [row[0] for row in self.get_records(sql, (schema, table))]
return pk_columns or None
+ @tenacity.retry(
+ stop=tenacity.stop_after_attempt(5),
+ wait=tenacity.wait_exponential(max=20),
+ # OperationalError is thrown when the connection times out
+ # InterfaceError is thrown when the connection is refused
Review Comment:
I think the timeout hides the connection refused (I might be wrong). But I
first retry on `OperationalError` only to fix the time out issue and got some
connection refused. So I added `InterfaceError`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]