Forum Discussion
I should amend my answer for the “read” operation. There are two spots in the code which acquire a connection. One is in a retry block, the other isn’t. If connection times out outside of the retry block, a timeout exception will be raised and not retried. However, if the connection times out in the retry block, it will be re-attempted per the defined interval and number of retries.
You may ask why the query path gets a connection twice. I’m not sure exactly why, and haven’t traced all of it. However, this code path is for generic database support, so is probably necessary for some backend.
Thanks @mbowen. So, for a “read” operation that times out on the initial connection attempt it won’t go into the retry block. Correct? If the “read” operation fails for some other reason will it go into the retry block? Or does the “read” operation never use the retry block?
- mbowen5 years agoEmployee
Hi Paul:
You are correct. If the “read” times out on the initial connection attempt it will raise
an exception and won’t enter the retry block. Otherwise, it will enter the retry block
and any exception raised will be caught and operation retried up to the configured
number of retries.