Closed tsegismont closed 3 months ago
Hi @loiclefevre , I would appreciate your advice on this. Is the SOCKET
connection validation level appropriate (non-blocking)? Or should we consider something lower, like INBAND_DOWN
or LOCAL
?
cc @DavideD
Hey @tsegismont,
@loiclefevre is on his well-deserved holiday, hence I'm adding @jeandelavarene to this thread to provide guidance on your question about OracleConnection.ConnectionValidation.
and which mode to use.
Meanwhile, according to the JavaDoc it would seems indeed that SOCKET
does not involve a network call but just checks whether the socket is still alive.
Here is a description of the different validation modes in decreasing order of validation strength:
Note that, for example, a "SOCKET" validation may return a false positive (it may not always detect all socket defects). On the other hand, a "SOCKET" validation is much faster than "NETWORK". In most cases, we recommend using "SOCKET" validation at connection borrow (in UCP for example). For applications that can't tolerate an error on the connection, turning on "SERVER" or "NETWORK" would be more appropriate.
CC @gvenzl
Thank you @gvenzl and @jeandelavarene
In this part of our code we can't tolerate the driver to block (event not every time). And for the other clients (Pg, MySQL, ...etc) where Vert.x manages the connection, we only check the connection's lifecycle (variable check):
So I think the appropriate setting is NONE
in our case. This will provide the same experience as with other clients.
See #1450