fivetran-ashokborra opened a new pull request, #3566:
URL: https://github.com/apache/polaris/pull/3566

   <!--
   ๐Ÿ“ Describe what changes you're proposing, especially breaking or user-facing 
changes. 
   ๐Ÿ“– See https://github.com/apache/polaris/blob/main/CONTRIBUTING.md for more.
   -->
   ### Description
   When the Agroal connection pool is exhausted, requests fail with 
"Acquisition timeout while waiting for new connection". This error is often 
transient during traffic spikes and should be retried.
   
   Added "acquisition timeout" to the list of retryable error patterns in 
DatasourceOperations.isRetryable() method.
   
   #### Stack trace: 
   `Caused by: java.sql.SQLException: Failed due to 'Acquisition timeout while 
waiting for new connection' (error code 0, sql-state 'null'), after 1 attempts 
and 5000 milliseconds
        at 
org.apache.polaris.persistence.relational.jdbc.DatasourceOperations.withRetries(DatasourceOperations.java:300)
        at 
org.apache.polaris.persistence.relational.jdbc.DatasourceOperations.executeSelectOverStream(DatasourceOperations.java:153)
        at 
org.apache.polaris.persistence.relational.jdbc.DatasourceOperations.executeSelect(DatasourceOperations.java:134)
        at 
org.apache.polaris.persistence.relational.jdbc.JdbcBasePersistenceImpl.lookupEntities(JdbcBasePersistenceImpl.java:399)
        ... 68 more
   Caused by: java.sql.SQLException: Acquisition timeout while waiting for new 
connection
        at 
io.agroal.pool.ConnectionPool.handlerFromSharedCache(ConnectionPool.java:367)
        at io.agroal.pool.ConnectionPool.getConnection(ConnectionPool.java:293)
        at io.agroal.pool.DataSource.getConnection(DataSource.java:86)
        at 
io.agroal.api.AgroalDataSource_sqqLi56D50iCdXmOjyjPSAxbLu0_Synthetic_ClientProxy.getConnection(Unknown
 Source)
        at 
org.apache.polaris.persistence.relational.jdbc.DatasourceOperations.borrowConnection(DatasourceOperations.java:339)
        at 
org.apache.polaris.persistence.relational.jdbc.DatasourceOperations.lambda$executeSelectOverStream$2(DatasourceOperations.java:156)
        at 
org.apache.polaris.persistence.relational.jdbc.DatasourceOperations.withRetries(DatasourceOperations.java:271)
        ... 71 more
   Caused by: java.util.concurrent.TimeoutException
        at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:204)
        at 
io.agroal.pool.ConnectionPool.handlerFromSharedCache(ConnectionPool.java:344)
        ... 77 more`
   
   ## Checklist
   - [ ] ๐Ÿ›ก๏ธ Don't disclose security issues! (contact [email protected])
   - [x] ๐Ÿ”— Clearly explained why the changes are needed, or linked related 
issues: Fixes #
   - [x] ๐Ÿงช Added/updated tests with good coverage, or manually tested (and 
explained how)
   - [ ] ๐Ÿ’ก Added comments for complex logic
   - [ ] ๐Ÿงพ Updated `CHANGELOG.md` (if needed)
   - [ ] ๐Ÿ“š Updated documentation in `site/content/in-dev/unreleased` (if needed)
   


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