[openstack-dev] [oslo.db] oslo_db "max_retries" option

Anton Kazakov ton.kazakov at gmail.com
Thu Mar 1 12:20:08 UTC 2018


Hi all,
Matt wrote:

> Wouldn't it be a good idea to check for more general DBError?
>
> So like catching Exception? How are you going to distinguish from
> IntegrityErrors which shouldn't be retried, which are also DBErrors?
>

Are IntegrityErrors really possible when testing new engine's connection?
Usually, test queries are simple, like SELECT 1;


2018-02-28 9:55 GMT+04:00 Vitalii Solodilov <mcdkr at yandex.ru>:

> Hi folks!
>
> I have a question about oslo_db "max_retries" option.
> https://github.com/openstack/oslo.db/blob/master/oslo_db/
> sqlalchemy/engines.py#L381
> Why only DBConnectionError is considered as a reason for reconnecting here?
> Wouldn't it be a good idea to check for more general DBError?
> For example, DB host is down at the time of engine creation, but will
> become running some time later.
>
> --
> Best regards,
>
> Vitalii Solodilov
>
>

-- 
Best regards,
Anton Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20180301/a223de3a/attachment.html>


More information about the OpenStack-dev mailing list