You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "lorransr (via GitHub)" <gi...@apache.org> on 2023/03/22 15:21:18 UTC
[GitHub] [iceberg] lorransr opened a new issue, #7173: Does JDBC connector uses any retry mechanism
lorransr opened a new issue, #7173:
URL: https://github.com/apache/iceberg/issues/7173
### Query engine
Trino
### Question
As mentioned in this [issue](https://github.com/trinodb/trino/issues/16284), we have an aurora serverless database, and we use it as our iceberg catalog. The serverless db scales up and down during the day and can reach to 0 instances, when it happens, all connections are lost. The expected behavior for the jdbc connection in this case would be to try to reconnect to the database, since it will be the trigger for starting the db instances.
Should it be possible to implement this connection retry feature? Or is it expected, the non retry behavior?
--
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.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: [I] Does JDBC connector uses any retry mechanism? [iceberg]
Posted by "cccs-eric (via GitHub)" <gi...@apache.org>.
cccs-eric commented on issue #7173:
URL: https://github.com/apache/iceberg/issues/7173#issuecomment-1790553419
> I see the PR didn't make it to a release. Do you need any help with it?
As I [stated ](https://github.com/apache/iceberg/pull/7561#issuecomment-1591804604) in the linked PR, I think those codes should be configurable. We don't have much cycles to spare on our side right now, but if you can help, that would be great. We can test your fix easily.
--
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
[GitHub] [iceberg] netanelm-upstream commented on issue #7173: Does JDBC connector uses any retry mechanism?
Posted by "netanelm-upstream (via GitHub)" <gi...@apache.org>.
netanelm-upstream commented on issue #7173:
URL: https://github.com/apache/iceberg/issues/7173#issuecomment-1525770899
We are encountering the same problem as well.
--
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: [I] Does JDBC connector uses any retry mechanism? [iceberg]
Posted by "anfy2002us (via GitHub)" <gi...@apache.org>.
anfy2002us commented on issue #7173:
URL: https://github.com/apache/iceberg/issues/7173#issuecomment-1789990297
I see the PR didn't make it to a release. Do you need any help with it?
--
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
[GitHub] [iceberg] amogh-jahagirdar commented on issue #7173: Does JDBC connector uses any retry mechanism?
Posted by "amogh-jahagirdar (via GitHub)" <gi...@apache.org>.
amogh-jahagirdar commented on issue #7173:
URL: https://github.com/apache/iceberg/issues/7173#issuecomment-1532410512
I think I have some bandwidth to try and get a fix in for this before next release, I'm assigning to myself
--
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
[GitHub] [iceberg] lorransr commented on issue #7173: Does JDBC connector uses any retry mechanism?
Posted by "lorransr (via GitHub)" <gi...@apache.org>.
lorransr commented on issue #7173:
URL: https://github.com/apache/iceberg/issues/7173#issuecomment-1485064575
Unfortunnely I don't 😢 And also not sure how
--
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
[GitHub] [iceberg] lorransr commented on issue #7173: Does JDBC connector uses any retry mechanism?
Posted by "lorransr (via GitHub)" <gi...@apache.org>.
lorransr commented on issue #7173:
URL: https://github.com/apache/iceberg/issues/7173#issuecomment-1532288751
I end up solving by ditching the serverless approach and provisioning a common database on aws
--
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
[GitHub] [iceberg] jackye1995 commented on issue #7173: Does JDBC connector uses any retry mechanism?
Posted by "jackye1995 (via GitHub)" <gi...@apache.org>.
jackye1995 commented on issue #7173:
URL: https://github.com/apache/iceberg/issues/7173#issuecomment-1483260163
Cool, in that case I think we can add a code change to check that error code and retry. @lorransr unfortunately I am a bit short of capacity, but I can help with review, do you have time to make the code change?
--
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
[GitHub] [iceberg] amogh-jahagirdar commented on issue #7173: Does JDBC connector uses any retry mechanism?
Posted by "amogh-jahagirdar (via GitHub)" <gi...@apache.org>.
amogh-jahagirdar commented on issue #7173:
URL: https://github.com/apache/iceberg/issues/7173#issuecomment-1481884000
I think it should be feasible, I took a look at the code to see how the `JdbcCatalog` works. By default we retry `SQLNonTransientException` https://github.com/apache/iceberg/blob/master/core/src/main/java/org/apache/iceberg/jdbc/JdbcClientPool.java#L46
and the exception that gets thrown in your case is ` org.postgresql.util.PSQLException` so we don't retry it.
Few things:
1.) SQLNonTransientConnectionException seems to be the wrong thing to even retry. The docs say the following (and it makes sense, it's non-transient, we should only retry transient failures)
```
/**
* The subclass of {@link SQLException} thrown for the SQLState
* class value '<i>08</i>', or under vendor-specified conditions. This
* indicates that the connection operation that failed will not succeed if
* the operation is retried without the cause of the failure being corrected.
* <p>
* Please consult your driver vendor documentation for the vendor-specified
* conditions for which this <code>Exception</code> may be thrown.
* @since 1.6
*/
```
2.) we probably want a better mechanism for specifying exception types to retry to ClientPoolImpl rather than just a single class.
I'll let others comment, cc @jackye1995 @rdblue
--
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: [I] Does JDBC connector uses any retry mechanism? [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #7173: Does JDBC connector uses any retry mechanism?
URL: https://github.com/apache/iceberg/issues/7173
--
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
[GitHub] [iceberg] jackye1995 commented on issue #7173: Does JDBC connector uses any retry mechanism?
Posted by "jackye1995 (via GitHub)" <gi...@apache.org>.
jackye1995 commented on issue #7173:
URL: https://github.com/apache/iceberg/issues/7173#issuecomment-1481954608
> The serverless db scales up and down during the day and can reach to 0 instances, when it happens, all connections are lost.
As Amogh suggested the code can definitely be updated to accommodate more exception cases for retry. I guess the question is if there is anything more than just `org.postgresql.util.PSQLException`, like an error code, that can be used to detect the issue? Using error message like "This connection has been closed" seems to be too specific.
--
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
[GitHub] [iceberg] lorransr commented on issue #7173: Does JDBC connector uses any retry mechanism?
Posted by "lorransr (via GitHub)" <gi...@apache.org>.
lorransr commented on issue #7173:
URL: https://github.com/apache/iceberg/issues/7173#issuecomment-1483215420
It seems to be related to this code:
https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main/java/org/postgresql/util/PSQLState.java#L29
Since it is the one used here:
https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main/java/org/postgresql/jdbc/PgConnection.java#L991
--
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: [I] Does JDBC connector uses any retry mechanism? [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7173:
URL: https://github.com/apache/iceberg/issues/7173#issuecomment-2423396446
This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'
--
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: [I] Does JDBC connector uses any retry mechanism? [iceberg]
Posted by "kkd927 (via GitHub)" <gi...@apache.org>.
kkd927 commented on issue #7173:
URL: https://github.com/apache/iceberg/issues/7173#issuecomment-2017211752
Is there any progress on this issue? I have the same issue.
--
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