--
You received this message because you are subscribed to the Google Groups "golang-sql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-sql+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-sql/8823a416-52d0-4e46-9324-40636adacceb%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to golan...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-sql+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-sql/00927b69-14a9-4425-ac38-6ef8757ee9e8%40googlegroups.com.
Other then possibly a Conn.Close() (due to expired connections, or similar), no queries would be executed between IsValid and ResetConnection(). However, these won't always be called now that I'm thinking about it more. Oh, wait, I think there might be a subtle bug in current master where the connection isn't always reset in a certain condition in the pool. Also, it may be possible when the the pool is under load that "IsValid" won't be called, but ResetConnection will be (where a returned connection is given directly to a new waiting query (this is by design and not a but).
To be useful for our purpose, the hooks need to be called
consistently so the Oracle libraries can keep in sync with the
database/sql pool and know when connections are in use in the
application, and when they are idle in the pool. We want to be
able to do Oracle-level connection validity checks, reset user
state, and enable & disable the necessary state for high
availability features, etc.
A completely swappable implementation in database/sql/v2 would be ideal, though the above hooks would allow us to do any state changes on connections and not even need Oracle's "session pool" under the covers.
What is the design reason isValid isn't called in all cases?
Chris
IsValid won't be called if the connection doesn't pass through the connection pool, but is directly passed from an returning connection to a new query.In this case, ResetSession is only called. If for some reason isn't valid, it can also return ErrBadConn.
Thank you.
Chris