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

2018-03-07 Thread Ben Nemec



On 02/27/2018 11:55 PM, Vitalii Solodilov wrote:

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.


That sounds like it would result in a DBConnectionError since we would 
be unable to connect.  Is that not the case, and if so what exception is 
raised instead?


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


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

2018-03-01 Thread Anton Kazakov
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 :

> 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
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


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

2018-02-28 Thread Matt Riedemann

On 2/28/2018 5:55 AM, Vitalii Solodilov 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?


--

Thanks,

Matt

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev