Description
Hi there!
In errRecover
, net.OpError
s are turned into driver.ErrBadConn
. My understanding is that drivers should never return driver.ErrBadConn
if work may been completed on the server. The net.OpError
handling was added with b48e1a2, but I don't see an explanation for the original intent of the current behavior. I assume it was for handling initial connection errors, but isn't it reasonable that a net.OpError
may be triggered on an existing connection, potentially in the middle of a query?
My particular use case is: I've implemented a custom driver that wraps pq
and sets a connection read and write deadline on every Read()
and Write()
. If the timeout hits, it will return a net.OpError
. In this case, the connection should be marked bad, but the query not retried.
Am I missing something about the way pq handles this error?