Description
Related dev. issue(s): tarantool/tarantool#9930
Parent doc. issue(s): #4129
Product: Tarantool
Since: 3.1
Root document: not created yet (#4129)
SME: @ ImeevMA
Details
The new mode
option is now supported by the call()
and filter()
functions from the experimental.connpool
module. This option allows to
filter candidates based on their read-only
status.
The filter()
function supports three values of the mode
option:
nil
means that theread_only
status of the instance is not
checked;ro
means that only instances withread_only == true
are
considered;rw
means that only instances withread_only == false
are
considered.
The call()
function supports five values of the mode
option:
nil
means that theread_only
status of the instance is not
checked when instance is selected to executecall()
;ro
means that only instances withread_only == true
are
considered when instance is selected to executecall()
;rw
means that only instances withread_only == false
are
considered when instance is selected to executecall()
.prefer_ro
means thatcall()
will only be executed on instances
withread_only == false
if it is not possible to execute it on
instances withread_only == true
;prefer_rw
means thatcall()
will only be executed on instances
withread_only == true
if it is not possible to execute it on
instances withread_only == false
.
Note that if this option is not nil
, a connection will be attempted to
each instance in the config if a connection does not exist. This means
that any of these functions can potentially block for a maximum of
<number of instances> * 10
seconds.
Requested by @ ImeevMA in tarantool/tarantool@60fdffb.