o-nikolas commented on code in PR #59017:
URL: https://github.com/apache/airflow/pull/59017#discussion_r2586453231


##########
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),

Review Comment:
   Given the time that redshift_connector waits plus 5 retries with the 
exponential wait. How long will this wait in total? My guess is pretty long? 
Maybe we do 2 or 3 retires?
   
   This will immediately take effect in people's workflows and I don't want to 
delay them too long. But, I hear the argument that delay is better than 
failure. 



##########
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:
   Are we seeing this one regularly?



-- 
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]

Reply via email to