You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "bharos (via GitHub)" <gi...@apache.org> on 2026/08/26 17:48:29 UTC

[PR] Core: Retry dropped JDBC connections reported as SQLRecoverableException [iceberg]

bharos opened a new pull request, #17828:
URL: https://github.com/apache/iceberg/pull/17828

   `JdbcClientPool` recovers from connection failures by reconnecting, but only for
   `SQLTransientException` and the SQLSTATEs in `COMMON_RETRYABLE_CONNECTION_SQL_STATES`.
   Drivers that report a dropped connection as `SQLRecoverableException` match neither, so
   the operation fails and `ClientPoolImpl.release` returns the dead connection to the head
   of the pool for the next caller.
   
   MySQL is one such driver: `CommunicationsException` extends `SQLRecoverableException` and
   carries SQLSTATE `08S01`, which is not in the default set.
   
   This treats `SQLRecoverableException` as retryable. The JDBC contract for that type is that
   recovery requires closing the connection and getting a new one, which is what `reconnect`
   does. `maxRetries` is unchanged, so a non-recoverable case costs one reconnect attempt
   before the original exception propagates.
   
   ---
   **AI Disclosure**
   - Model: Claude Opus 4.6
   - Platform/Tool: GitHub Copilot
   - Human Oversight: partially reviewed
   - Prompt Summary: Diagnose why a MySQL-backed JDBC catalog never recovers from a dropped connection, and implement the fix with a test.
   


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Core: Retry dropped JDBC connections reported as SQLRecoverableException [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17828:
URL: https://github.com/apache/iceberg/pull/17828#issuecomment-6115645854

   This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Core: Retry dropped JDBC connections reported as SQLRecoverableException [iceberg]

Posted by "manuzhang (via GitHub)" <gi...@apache.org>.
manuzhang commented on PR #17828:
URL: https://github.com/apache/iceberg/pull/17828#issuecomment-5490279988

   LGTM


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Core: Retry dropped JDBC connections reported as SQLRecoverableException [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17828:
URL: https://github.com/apache/iceberg/pull/17828#issuecomment-5986081400

   This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Core: Retry dropped JDBC connections reported as SQLRecoverableException [iceberg]

Posted by "bharos (via GitHub)" <gi...@apache.org>.
bharos commented on PR #17828:
URL: https://github.com/apache/iceberg/pull/17828#issuecomment-5546396688

   @amogh-jahagirdar can you please review this PR, it's already approved by 2 members. Thanks


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Core: Retry dropped JDBC connections reported as SQLRecoverableException [iceberg]

Posted by "bharos (via GitHub)" <gi...@apache.org>.
bharos commented on PR #17828:
URL: https://github.com/apache/iceberg/pull/17828#issuecomment-5488800402

   > @manuzhang in #14317 you suggested catching the exception and creating a new client - that path already exists in `JdbcClientPool`, it just doesn't match `SQLRecoverableException`, which is what MySQL's `CommunicationsException` extends. This adds it.
   > 
   > @amogh-jahagirdar flagging you since this extends the retry check you added in #10140
   > 
   > PTAL, thanks!
   
   @manuzhang / @amogh-jahagirdar gentle ping, if you can review this PR. Thanks


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Core: Retry dropped JDBC connections reported as SQLRecoverableException [iceberg]

Posted by "uros-b (via GitHub)" <gi...@apache.org>.
uros-b commented on PR #17828:
URL: https://github.com/apache/iceberg/pull/17828#issuecomment-5452038832

   Thank you for the well scoped fix. `SQLRecoverableException` is a direct sibling of `SQLTransientException` (not a subtype), so it fell through both existing guards. The new `instanceof` clause closes that gap, its semantics precisely match what `reconnect()` does (close + new connection), `maxRetries=1` bounds retries, and the unit test isolates the new path using a SQLSTATE deliberately absent from the pre-existing retryable set.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Core: Retry dropped JDBC connections reported as SQLRecoverableException [iceberg]

Posted by "bharos (via GitHub)" <gi...@apache.org>.
bharos commented on PR #17828:
URL: https://github.com/apache/iceberg/pull/17828#issuecomment-5429740457

   @manuzhang in #14317  you suggested catching the exception and creating a new client - that
   path already exists in `JdbcClientPool`, it just doesn't match `SQLRecoverableException`,
   which is what MySQL's `CommunicationsException` extends. This adds it.
   
   @amogh-jahagirdar flagging you since this extends the retry check you added in #10140 
   
   PTAL, thanks!


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Core: Retry dropped JDBC connections reported as SQLRecoverableException [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #17828: Core: Retry dropped JDBC connections reported as SQLRecoverableException
URL: https://github.com/apache/iceberg/pull/17828


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org