johnou commented on PR #421:
URL: https://github.com/apache/commons-dbcp/pull/421#issuecomment-2296671772

   > Can you name a few of those codes you would want to whitelist and also 
explain why they trigger the disconnect check in the first place?
   
   "08S02" and "08007", because the current logic for commons-dbcp is to 
terminate the connection for all sql state codes beginning with "08" [1]. 
Please see [2] for a more thorough explanation of why this is required for 
Aurora, iirc there is also another code for postgres related to queries timing 
out but does not indicate that the connection is unusable.
   
   [1] 
https://github.com/apache/commons-dbcp/blob/master/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java#L271
   [2] 
https://github.com/awslabs/aws-mysql-jdbc?tab=readme-ov-file#connection-pooling


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