potiuk commented on code in PR #38707:
URL: https://github.com/apache/airflow/pull/38707#discussion_r1555010713


##########
airflow/providers/jdbc/hooks/jdbc.py:
##########
@@ -152,7 +153,8 @@ def set_autocommit(self, conn: jaydebeapi.Connection, 
autocommit: bool) -> None:
         :param conn: The connection.
         :param autocommit: The connection's autocommit setting.
         """
-        conn.jconn.setAutoCommit(autocommit)
+        with suppress(jaydebeapi.Error):
+            conn.jconn.setAutoCommit(autocommit)

Review Comment:
   Should we print a warning instead? That seems like pretty unexpected state 
and might be difficult to debug problems when someone expects autocommit to be 
effective.



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