-
Notifications
You must be signed in to change notification settings - Fork 43
Document the 'experimental.connpool' module #4329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e99352a
to
d684baf
Compare
d684baf
to
334ddfa
Compare
e946a48
to
daf4375
Compare
|
||
``experimental.connpool`` is an experimental module and is subject to changes. | ||
|
||
An ``experimental.connpool`` module provides a set of features for connecting to remote cluster instances and for executing remote procedure calls on an instance that satisfies the specified criteria. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An ``experimental.connpool`` module provides a set of features for connecting to remote cluster instances and for executing remote procedure calls on an instance that satisfies the specified criteria. | |
The ``experimental.connpool`` module provides a set of features for connecting to remote cluster instances and for executing remote procedure calls on an instance that satisfies the specified criteria. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that elsewhere in the doc we keep using a definite article before module names, even when introduced for the first time (e.g. https://docs.d.tarantool.io/en/doc/connpool-api/reference/reference_lua/iconv/), with the only exception of explicitly adding "new" like in "a new XXX module" in release notes, but not in the main doc.
|
||
.. NOTE:: | ||
|
||
You need to grant the ``execute`` :ref:`permission <configuration_credentials_managing_users_roles_granting_privileges>` for the specified function to a user used for replication to execute this function on a remote instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to grant the ``execute`` :ref:`permission <configuration_credentials_managing_users_roles_granting_privileges>` for the specified function to a user used for replication to execute this function on a remote instance. | |
You need to grant the ``execute`` :ref:`permission <configuration_credentials_managing_users_roles_granting_privileges>` for the specified function to users with the ``replication`` :ref:`role <box_space-user>` to execute this function on a remote instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically speaking, a user used for replication and a user with the replication role might be different entities. In particular, user used for replication maintains inter-cluster communications while a user with the replication role can be created to allow some third-party system to get data from a Tarantool cluster (for example, CDC).
local connpool = require('experimental.connpool') | ||
local conn = connpool.connect("storage-b-002", { fetch_schema = true }) | ||
|
||
Once you have a connection, you can execute requests on a remote instance, for example, select data from a space using :ref:`conn.space.\<space-name\>:select() <conn-select>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once you have a connection, you can execute requests on a remote instance, for example, select data from a space using :ref:`conn.space.\<space-name\>:select() <conn-select>`. | |
Once you have a connection, you can execute requests on the remote instance, for example, select data from a space using :ref:`conn.space.\<space-name\>:select() <conn-select>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meaning "the instance to which the connection is established". As I understand, within a single connect()
function call a connection can be established to only 1 instance, so the instance is unique in this context.
cb846a0
to
28ba672
Compare
Documented a new
experimental.connpool
module.This PR fixes the following doc issues:
mode
option forcall()
andfilter()
#4151instances
,replicasets
andgroups
options #4156Staging: https://docs.d.tarantool.io/en/doc/connpool-api/reference/reference_lua/connpool/
Note
The code samples used in this document are created using the sharded_cluster_crud_docker demo application.