<div dir="ltr">Hi all,<div>Matt wrote:</div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-quote gmail-quote-1" style="font-family:Arial,Helvetica,"Luxi Sans",sans-serif;padding-left:10px;color:blue;border-left:2px solid blue;font-size:14.4px;white-space:pre"><p style="padding:0px;margin:0px">Wouldn't it be a good idea to check for more general DBError?
</p></div><p style="padding:0px;margin:0px;color:rgb(0,0,0);font-family:Arial,Helvetica,"Luxi Sans",sans-serif;font-size:14.4px;white-space:pre">
So like catching Exception? How are you going to distinguish from 
IntegrityErrors which shouldn't be retried, which are also DBErrors?</p></blockquote><div><br></div><div>Are <span style="color:rgb(0,0,0);font-family:Arial,Helvetica,"Luxi Sans",sans-serif;font-size:14.4px;white-space:pre">IntegrityErrors really possible when testing new engine's connection? Usually, test queries are simple, like SELECT 1;</span></div><div> <br></div><div class="gmail_extra"><br><div class="gmail_quote">2018-02-28 9:55 GMT+04:00 Vitalii Solodilov <span dir="ltr"><<a href="mailto:mcdkr@yandex.ru" target="_blank">mcdkr@yandex.ru</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi folks!<br>
<br>
I have a question about oslo_db "max_retries" option.<br>
<a href="https://github.com/openstack/oslo.db/blob/master/oslo_db/sqlalchemy/engines.py#L381" rel="noreferrer" target="_blank">https://github.com/openstack/<wbr>oslo.db/blob/master/oslo_db/<wbr>sqlalchemy/engines.py#L381</a><br>
Why only DBConnectionError is considered as a reason for reconnecting here?<br>
Wouldn't it be a good idea to check for more general DBError?<br>
For example, DB host is down at the time of engine creation, but will become running some time later.<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
-- <br>
Best regards,<br>
<br>
Vitalii Solodilov<br>
<br>
</font></span></blockquote></div><br><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Best regards,</div><div>Anton Kazakov</div></div></div></div></div>
</div></div></div>