diff --git a/.github/workflows/push-pot.yml b/.github/workflows/push-pot.yml new file mode 100644 index 0000000000..1787996ee1 --- /dev/null +++ b/.github/workflows/push-pot.yml @@ -0,0 +1,35 @@ +name: Push POTs +on: + push: + branches: + - '3.0' + - 'lastochka42/update-po' +permissions: + contents: write +jobs: + generate-pot: + runs-on: ubuntu-latest + container: tarantool/doc-builder:fat-4.3 + steps: + - uses: actions/checkout@v3 + + - name: Generate Portable Object Templates + run: | + cmake . + make update-po + + - name: Commit generated pots + run: | + git config --global --add safe.directory /__w/doc/doc + git config --global user.name 'TarantoolBot' + git config --global user.email 'tarantoolbot@mail.ru' + + if [[ $(git status) =~ .*"nothing to commit".* ]]; then + echo "status=nothing-to-commit" + exit 0 + fi + + git add locale/ + git commit -m "updated locale" + git push origin lastochka42/update-po + diff --git a/.gitignore b/.gitignore index 6625ca321a..006e72cd83 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ webhooks/.env locale/* !locale/ru +!locale/en # redundant folders created by sphinx diff --git a/.gitmodules b/.gitmodules index cd300b8328..3955ade5ce 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,3 @@ -[submodule "modules/cartridge"] - path = modules/cartridge - url = https://github.com/tarantool/cartridge.git -[submodule "modules/cartridge-cli"] - path = modules/cartridge-cli - url = https://github.com/tarantool/cartridge-cli.git [submodule "modules/metrics"] path = modules/metrics url = https://github.com/tarantool/metrics.git diff --git a/build_submodules.sh b/build_submodules.sh index a083ebfc47..e19e7258a0 100755 --- a/build_submodules.sh +++ b/build_submodules.sh @@ -12,50 +12,6 @@ po_dest="${project_root}/locale/ru/LC_MESSAGES" cp README.rst doc/contributing/docs/_includes/README.rst -# Cartridge -cartridge_root="${project_root}/modules/cartridge" - -# Build Cartridge to extract docs -cd "${cartridge_root}" || exit -CMAKE_DUMMY_WEBUI=true tarantoolctl rocks make - -# Copy Cartridge docs, including diagrams and images -cartridge_rst_src="${cartridge_root}/build.luarocks/build.rst" -cartridge_rst_dest="${project_root}/doc/book/cartridge" -cd "${cartridge_rst_src}" || exit -mkdir -p "${cartridge_rst_dest}" -find . -iregex '.*\.\(rst\|png\|puml\|svg\)$' -exec cp -r --parents {} "${cartridge_rst_dest}" \; - -# Copy translation templates -cartridge_pot_src="${cartridge_root}/build.luarocks/build.rst/locale" -cartridge_pot_dest="${project_root}/locale/book/cartridge" -cd "${cartridge_pot_src}" || exit -mkdir -p "${cartridge_pot_dest}" -find . -name '*.pot' -exec cp -rv --parents {} "${cartridge_pot_dest}" \; - -# Copy translations -cartridge_po_src="${cartridge_root}/build.luarocks/build.rst/locale/ru/LC_MESSAGES" -cartridge_po_dest="${po_dest}/book/cartridge" -cd "${cartridge_po_src}" || exit -mkdir -p "${cartridge_po_dest}" -find . -name '*.po' -exec cp -rv --parents {} "${cartridge_po_dest}" \; - - -# Cartridge CLI -cartridge_cli_root="${project_root}/modules/cartridge-cli/doc" -cartridge_cli_dest="${cartridge_rst_dest}/cartridge_cli" -cartridge_cli_po_dest="${po_dest}/book/cartridge/cartridge_cli" - -# Copy Cartridge CLI docs, including diagrams and images -mkdir -p "${cartridge_cli_dest}" -cd ${cartridge_cli_root} || exit -find . -iregex '.*\.\(rst\|png\|puml\|svg\)$' -exec cp -rv --parents {} "${cartridge_cli_dest}" \; - -# Copy translations -mkdir -p "${cartridge_cli_po_dest}" -cd "${cartridge_cli_root}/locale/ru/LC_MESSAGES/doc/" || exit -find . -name '*.po' -exec cp -rv --parents {} "${cartridge_cli_po_dest}" \; - # Monitoring monitoring_root="${project_root}/modules/metrics/doc/monitoring" monitoring_dest="${project_root}/doc/book" diff --git a/conf.py b/conf.py index a053d601d2..dfce50f509 100644 --- a/conf.py +++ b/conf.py @@ -61,7 +61,7 @@ project = u'Tarantool' # |release| The full version, including alpha/beta/rc tags. -release = "2.11.1" +release = "3.0.0" # |version| The short X.Y version. version = '.'.join(release.split('.')[0:2]) @@ -73,10 +73,6 @@ 'how-to/using_docker.rst', 'reference/configuration/cfg_*', 'images', - 'book/cartridge/cartridge_overview.rst', - 'book/cartridge/CONTRIBUTING.rst', - 'book/cartridge/topics', - 'book/cartridge/cartridge_api/modules/cartridge.test-helpers.rst', 'reference/reference_rock/luatest/README.rst', 'reference/reference_rock/luatest/modules/luatest.rst', '**/_includes/*' diff --git a/doc/alternate_build_master.rst b/doc/alternate_build_master.rst index 6effb4edc0..002791508b 100644 --- a/doc/alternate_build_master.rst +++ b/doc/alternate_build_master.rst @@ -14,7 +14,6 @@ how-to/index concepts/index CRUD operations - book/cartridge/index book/admin/index book/connectors enterprise/index diff --git a/doc/book/admin/admin_instances_dev.png b/doc/book/admin/admin_instances_dev.png new file mode 100644 index 0000000000..7461ae40f0 Binary files /dev/null and b/doc/book/admin/admin_instances_dev.png differ diff --git a/doc/book/admin/admin_instances_prod.png b/doc/book/admin/admin_instances_prod.png new file mode 100644 index 0000000000..143cd9f832 Binary files /dev/null and b/doc/book/admin/admin_instances_prod.png differ diff --git a/doc/book/admin/instance_config.rst b/doc/book/admin/instance_config.rst index 2e4df21b38..35bacc21a2 100644 --- a/doc/book/admin/instance_config.rst +++ b/doc/book/admin/instance_config.rst @@ -1,177 +1,204 @@ .. _admin-instance_config: +.. _admin-instance-environment-overview: +.. _admin-tt_config_file: -Instance configuration -====================== +Application environment +======================= -For each Tarantool instance, you need two files: +This section provides a high-level overview on how to prepare a Tarantool application for deployment +and how the application's environment and layout might look. +This information is helpful for understanding how to administer Tarantool instances using :ref:`tt CLI ` in both development and production environments. -* [Optional] An :ref:`application file ` with - instance-specific logic. Put this file into the ``/usr/share/tarantool/`` - directory. +The main steps of creating and preparing the application for deployment are: - For example, ``/usr/share/tarantool/my_app.lua`` (here we implement it as a - :ref:`Lua module ` that bootstraps the database and - exports ``start()`` function for API calls): +1. :ref:`admin-instance_config-init-environment`. - .. code-block:: lua +2. :ref:`admin-instance_config-develop-app`. - local function start() - box.schema.space.create("somedata") - box.space.somedata:create_index("primary") - <...> - end +3. :ref:`admin-instance_config-package-app`. - return { - start = start; - } +In this section, a `sharded_cluster `_ application is used as an example. +This cluster includes 5 instances: one router and 4 storages, which constitute two replica sets. -* An :ref:`instance file ` with - instance-specific initialization logic and parameters. Put this file, or a - symlink to it, into the **instance directory** - (see ``instances_enabled`` parameter in :ref:`tt configuration file `). +.. image:: admin_instances_dev.png + :align: left + :width: 700 + :alt: Cluster topology - For example, ``/etc/tarantool/instances.enabled/my_app.lua`` (here we load - ``my_app.lua`` module and make a call to ``start()`` function from that - module): - .. code-block:: lua - #!/usr/bin/env tarantool +.. _admin-instance_config-init-environment: +.. _admin-start_stop_instance-running_locally: - box.cfg { - listen = 3301; - } +Initializing a local environment +-------------------------------- - -- load my_app module and call start() function - -- with some app options controlled by sysadmins - local m = require('my_app').start({...}) +Before creating an application, you need to set up a local environment for ``tt``: -.. _admin-instance_file: +1. Create a home directory for the environment. -Instance file -------------- +2. Run ``tt init`` in this directory: + + .. code-block:: console -After this short introduction, you may wonder what an instance file is, what it -is for, and how ``tt`` uses it. After all, Tarantool is an application -server, so why not start the application stored in ``/usr/share/tarantool`` -directly? + ~/myapp$ tt init + • Environment config is written to 'tt.yaml' -A typical Tarantool application is not a script, but a daemon running in -background mode and processing requests, usually sent to it over a TCP/IP -socket. This daemon needs to be started automatically when the operating system -starts, and managed with the operating system standard tools for service -management -- such as ``systemd`` or ``init.d``. To serve this very purpose, we -created **instance files**. +This command creates a default ``tt`` configuration file ``tt.yaml`` for a local +environment and the directories for applications, control sockets, logs, and other +artifacts: -You can have more than one instance file. For example, a single application in -``/usr/share/tarantool`` can run in multiple instances, each of them having its -own instance file. Or you can have multiple applications in -``/usr/share/tarantool`` -- again, each of them having its own instance file. +.. code-block:: console -An instance file is typically created by a system administrator. An application -file is often provided by a developer, in a Lua rock or an rpm/deb package. + ~/myapp$ ls + bin distfiles include instances.enabled modules templates tt.yaml -An instance file is designed to not differ in any way from a Lua application. -It must, however, configure the database, i.e. contain a call to -:doc:`box.cfg{} ` somewhere in it, because it’s the -only way to turn a Tarantool script into a background process, and -``tt`` is a tool to manage background processes. Other than that, an -instance file may contain arbitrary Lua code, and, in theory, even include the -entire application business logic in it. We, however, do not recommend this, -since it clutters the instance file and leads to unnecessary copy-paste when -you need to run multiple instances of an application. +Find detailed information about the ``tt`` configuration parameters and launch modes +on the :ref:`tt configuration page `. -.. _admin-tt-preload: -Preloading Lua scripts and modules ----------------------------------- -Tarantool supports loading and running chunks of Lua code before the loading instance file. -To load or run Lua code immediately upon Tarantool startup, specify the ``TT_PRELOAD`` -environment variable. Its value can be either a path to a Lua script or a Lua module name: +.. _admin-instance_config-develop-app: +.. _admin-start_stop_instance-multi-instance: +.. _admin-start_stop_instance-multi-instance-layout: -* To run the Lua script ``script.lua`` from the ``preload/path/`` directory inside - the working directory in Tarantool before ``main.lua``, set ``TT_PRELOAD`` as follows: +Creating and developing an application +-------------------------------------- - .. code-block:: console +You can create an application in two ways: - $ TT_PRELOAD=/preload/path/script.lua tarantool main.lua +- Manually by preparing its layout in a directory inside ``instances_enabled``. + The directory name is used as the application identifier. - Tarantool runs the ``script.lua`` code, waits for it to complete, and - then starts running ``main.lua``. +- From a template by using the :ref:`tt create ` command. -* To load the ``preload.module`` into the Tarantool Lua interpreter - executing ``main.lua``, set ``TT_PRELOAD`` as follows: +In this example, the application's layout is prepared manually and looks as follows. - .. code-block:: console +.. code-block:: console + + ~/myapp$ tree + . + ├── bin + ├── distfiles + ├── include + ├── instances.enabled + │ └── sharded_cluster + │ ├── config.yaml + │ ├── instances.yaml + │ ├── router.lua + │ ├── sharded_cluster-scm-1.rockspec + │ └── storage.lua + ├── modules + ├── templates + └── tt.yaml + + +The ``sharded_cluster`` directory contains the following files: - $ TT_PRELOAD=preload.module tarantool main.lua +- ``config.yaml``: contains the :ref:`configuration ` of the cluster. This file might include the entire cluster topology or provide connection settings to a centralized configuration storage. +- ``instances.yml``: specifies instances to run in the current environment. For example, on the developer’s machine, this file might include all the instances defined in the cluster configuration. In the production environment, this file includes :ref:`instances to run on the specific machine `. +- ``router.lua``: includes code specific for a :ref:`router `. +- ``sharded_cluster-scm-1.rockspec``: specifies the required external dependencies (for example, ``vshard``). +- ``storage.lua``: includes code specific for :ref:`storages `. - Tarantool loads the ``preload.module`` code into the interpreter and - starts running ``main.lua`` as if its first statement was ``require('preload.module')``. +You can find the full example here: +`sharded_cluster `_. + + + +.. _admin-instance_config-package-app: +.. _admin-instance-app-layout: +.. _admin-instance_file: - .. warning:: +Packaging the application +------------------------- - ``TT_PRELOAD`` values that end with ``.lua`` are considered scripts, - so avoid module names with this ending. +To package the ready application, use the :ref:`tt pack ` command. +This command can create an installable DEB/RPM package or generate ``.tgz`` archive. -To load several scripts or modules, pass them in a single quoted string, separated -by semicolons: +The structure below reflects the content of the packed ``.tgz`` archive for the `sharded_cluster `_ application: .. code-block:: console - $ TT_PRELOAD="/preload/path/script.lua;preload.module" tarantool main.lua + ~/myapp$ tree -a + . + ├── bin + │ ├── tarantool + │ └── tt + ├── include + ├── instances.enabled + │ └── sharded_cluster -> ../sharded_cluster + ├── modules + ├── sharded_cluster + │ ├── .rocks + │ │ └── share + │ │ └── ... + │ ├── config.yaml + │ ├── instances.yaml + │ ├── router.lua + │ ├── sharded_cluster-scm-1.rockspec + │ └── storage.lua + └── tt.yaml -In the preload script, the three dots (``...``) value contains the module name -if you're preloading a module or the path to the script if you're running a script. -The :ref:`arg ` value from the main script is visible in -the preload script or module. +The application's layout looks similar to the one defined when :ref:`developing the application ` with some differences: -For example, when preloading this script: +- ``bin``: contains the ``tarantool`` and ``tt`` binaries packed with the application bundle. -.. code-block:: lua +- ``instances.enabled``: contains a symlink to the packed ``sharded_cluster`` application. - -- preload.lua -- - print("Preloading:") - print("... arg is:", ...) - print("Passed args:", arg[1], arg[2]) +- ``sharded_cluster``: a packed application. In addition to files created during the application development, includes the ``.rocks`` directory containing application dependencies (for example, ``vshard``). -You get the following output: +- ``tt.yaml``: a ``tt`` configuration file. -.. code-block:: console - $ TT_PRELOAD=preload.lua tarantool main.lua arg1 arg2 - Preloading: - ... arg is: preload.lua - Passed args: arg1 arg2 - 'strip_core' is set but unsupported - ... main/103/main.lua I> Tarantool 2.11.0-0-g247a9a4 Darwin-x86_64-Release - ... main/103/main.lua I> log level 5 - ... main/103/main.lua I> wal/engine cleanup is paused - < ... > -If an error happens during the execution of the preload script or module, Tarantool -reports the problem and exits. +.. _admin-instances_to_run: -.. _admin-tt_config_file: +Instances to run +~~~~~~~~~~~~~~~~ -tt configuration file ---------------------- +One more difference for a deployed application is the content of the ``instances.yaml`` file that specifies instances to run in the current environment. -While instance files contain instance configuration, the :ref:`tt ` configuration file -contains the configuration that ``tt`` uses to set up the application environment. -This includes the path to instance files, various working directories, and other -parameters that connect the application to the system. +- On the developer's machine, this file might include all the instances defined in the cluster configuration. -To create a default ``tt`` configuration, run ``tt init``. This creates a ``tt.yaml`` -configuration file. Its location depends on the :ref:`tt launch mode ` -(system or local). + .. image:: admin_instances_dev.png + :align: left + :width: 700 + :alt: Cluster topology -Some ``tt`` configuration parameters are similar to those used by -:doc:`box.cfg{} `, for example, ``memxt_dir`` -or ``wal_dir``. Other parameters define the ``tt`` environment, for example, -paths to installation files used by ``tt`` or to connected :ref:`external modules `. + ``instances.yaml``: -Find the detailed information about the ``tt`` configuration parameters and launch modes -on the :ref:`tt configuration page `. + .. literalinclude:: /code_snippets/snippets/sharding/instances.enabled/sharded_cluster/instances.yaml + :language: yaml + :dedent: + +- In the production environment, this file includes instances to run on the specific machine. + + .. image:: admin_instances_prod.png + :align: left + :width: 700 + :alt: Cluster topology + + ``instances.yaml`` (Server-001): + + .. code-block:: yaml + + router-a-001: + + ``instances.yaml`` (Server-002): + + .. code-block:: yaml + + storage-a-001: + storage-b-001: + + ``instances.yaml`` (Server-003): + + .. code-block:: yaml + + storage-a-002: + storage-b-002: + + +The :ref:`Starting and stopping instances ` section describes how to start and stop Tarantool instances. diff --git a/doc/book/admin/start_stop_instance.rst b/doc/book/admin/start_stop_instance.rst index 759e16f784..e84ef23cdc 100644 --- a/doc/book/admin/start_stop_instance.rst +++ b/doc/book/admin/start_stop_instance.rst @@ -3,333 +3,387 @@ Starting and stopping instances =============================== -To start a Tarantool instance from an :ref:`instance file ` -using the :ref:`tt ` utility: +This section describes how to manage instances in a Tarantool cluster using the :ref:`tt ` utility. +A cluster can include multiple instances that run different code. +A typical example is a cluster application that includes router and storage instances. +Particularly, you can perform the following actions: -1. Place the instance file (for example, ``my_app.lua``) into ``/etc/tarantool/instances.enabled/``. - This is the default location where ``tt`` searches for instance files. +* start all instances in a cluster or only specific ones +* check the status of instances +* connect to a specific instance +* stop all instances or only specific ones -2. Run ``tt start``: +To get more context on how the application's environment might look, refer to :ref:`Application environment `. - .. code-block:: console +.. NOTE:: - $ tt start - • Starting an instance [my_app]... + In this section, a `sharded_cluster `_ application is used to demonstrate how to start, stop, and manage instances in a cluster. -In this case, ``tt`` starts an instance from any ``*.lua`` file it finds in ``/etc/tarantool/instances.enabled/``. -Starting instances ------------------- +.. _configuration_run_instance: -All the instance files or directories placed in the ``instances_enabled`` directory -specified in :ref:`tt configuration ` are called *enabled instances*. -If there are several enabled instances, ``tt start`` starts a separate Tarantool -instance for each of them. +Starting Tarantool instances +---------------------------- -Learn more about working with multiple Tarantool instances in -:ref:`Multi-instance applications `. +.. _configuration_run_instance_tt: -To start a specific enabled instance, specify its name in the ``tt start`` argument: +Starting instances using the tt utility +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. code-block:: console +The :ref:`tt ` utility is the recommended way to start Tarantool instances. - $ tt start my_app - • Starting an instance [my_app]... +.. code-block:: console -When starting an instance, ``tt`` uses its :ref:`configuration file ` -``tt.yaml`` to set up a :ref:`tt environment ` in which the instance runs. -The default ``tt`` configuration file is created automatically in ``/etc/tarantool/``. -Learn how to set up a ``tt`` environment in a directory of your choice in -:ref:`Running Tarantool locally `. + $ tt start sharded_cluster + • Starting an instance [sharded_cluster:storage-a-001]... + • Starting an instance [sharded_cluster:storage-a-002]... + • Starting an instance [sharded_cluster:storage-b-001]... + • Starting an instance [sharded_cluster:storage-b-002]... + • Starting an instance [sharded_cluster:router-a-001]... -After the instance has started and worked for some time, you can find its artifacts +After the cluster has started and worked for some time, you can find its artifacts in the directories specified in the ``tt`` configuration. These are the default -locations: +locations in the local :ref:`launch mode `: + +* ``sharded_cluster/var/log//`` -- instance :ref:`logs `. +* ``sharded_cluster/var/lib//`` -- :ref:`snapshots and write-ahead logs `. +* ``sharded_cluster/var/run//`` -- control sockets and PID files. + +In the system launch mode, artifacts are created in these locations: + +* ``/var/log/tarantool//`` +* ``/var/lib/tarantool//`` +* ``/var/run/tarantool//`` + + +.. _configuration_run_instance_tarantool: + +Starting an instance using the tarantool command +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``tarantool`` command provides additional :ref:`options ` that might be helpful for development purposes. +Below is the syntax for starting a Tarantool instance configured in a file: + +.. code-block:: console -* ``/var/log/tarantool/.log`` -- instance :ref:`logs `. -* ``/var/lib/tarantool//`` -- snapshots and write-ahead logs. -* ``/var/run/tarantool/.control`` -- a control socket. This is - a Unix socket with the Lua console attached to it. This file is used to connect - to the instance console. -* ``/var/run/tarantool/.pid`` -- a PID file that ``tt`` uses to - check the instance status and send control commands. + $ tarantool [OPTION ...] --name INSTANCE_NAME --config CONFIG_FILE_PATH + +The command below starts ``router-a-001`` configured in the ``config.yaml`` file: + +.. code-block:: console + + $ tarantool --name router-a-001 --config config.yaml + + + +.. _admin-start_stop_instance_management: Basic instance management ------------------------- -.. note:: +Most of the commands described in this section can be called with or without an instance name. +Without the instance name, they are executed for all instances defined in ``instances.yaml``. - These commands can be called without an instance name. In this case, they are - executed for all enabled instances. -``tt`` provides a set of commands for performing basic operations over instances: +.. _admin-start_stop_instance_check_status: -* ``tt check`` -- check the instance file for syntax errors: +Checking an instance's status +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - .. code-block:: console +To check the status of instances, execute :ref:`tt status `: - $ tt check my_app - • Result of check: syntax of file '/etc/tarantool/instances.enabled/my_app.lua' is OK +.. code-block:: console -* ``tt status`` -- check the instance status: + $ tt status sharded_cluster + INSTANCE STATUS PID + sharded_cluster:storage-a-001 RUNNING 2023 + sharded_cluster:storage-a-002 RUNNING 2026 + sharded_cluster:storage-b-001 RUNNING 2020 + sharded_cluster:storage-b-002 RUNNING 2021 + sharded_cluster:router-a-001 RUNNING 2022 - .. code-block:: console +To check the status of a specific instance, you need to specify its name: - $ tt status my_app - INSTANCE STATUS PID - my_app NOT RUNNING +.. code-block:: console -* ``tt restart`` -- restart the instance: + $ tt status sharded_cluster:storage-a-001 + INSTANCE STATUS PID + sharded_cluster:storage-a-001 RUNNING 2023 - .. code-block:: console - $ tt restart my_app -y - • The Instance my_app (PID = 729) has been terminated. - • Starting an instance [my_app]... +.. _admin-start_stop_instance_connect: - The ``-y`` option responds "yes" to the confirmation prompt automatically. +Connecting to an instance +~~~~~~~~~~~~~~~~~~~~~~~~~ -* ``tt stop`` -- stop the instance: +To connect to the instance, use the :ref:`tt connect ` command: - .. code-block:: console +.. code-block:: console - $ tt stop my_app - • The Instance my_app (PID = 639) has been terminated. + $ tt connect sharded_cluster:storage-a-001 + • Connecting to the instance... + • Connected to sharded_cluster:storage-a-001 -* ``tt clean`` -- remove instance artifacts: logs, snapshots, and other files. + sharded_cluster:storage-a-001> - .. code-block:: console +In the instance's console, you can execute commands provided by the :ref:`box ` module. +For example, :ref:`box.info ` can be used to get various information about a running instance: + +.. code-block:: console + + sharded_cluster:storage-a-001> box.info.ro + --- + - false + ... - $ tt clean my_app -f - • List of files to delete: - • /var/log/tarantool/my_app.log - • /var/lib/tarantool/my_app/00000000000000000000.snap - • /var/lib/tarantool/my_app/00000000000000000000.xlog - The ``-f`` option removes the files without confirmation. +.. _admin-start_stop_instance_restart: -.. _admin-start_stop_instance-multi-instance: +Restarting instances +~~~~~~~~~~~~~~~~~~~~ -Multi-instance applications ---------------------------- +To restart an instance, use :ref:`tt restart `: -Tarantool applications can include multiple instances that run different code. -A typical example is a cluster application that includes router and storage -instances. The ``tt`` utility enables managing such applications. -With a single ``tt`` call, you can: +.. code-block:: console + + $ tt restart sharded_cluster:storage-a-002 -* start an application on multiple instances -* check the status of application instances -* connect to a specific instance of an application -* stop a specific instance of an application or all its instances +After executing ``tt restart``, you need to confirm this operation: -Application layout +.. code-block:: console + + Confirm restart of 'sharded_cluster:storage-a-002' [y/n]: y + • The Instance sharded_cluster:storage-a-002 (PID = 2026) has been terminated. + • Starting an instance [sharded_cluster:storage-a-002]... + + +.. _admin-start_stop_instance_stop: + +Stopping instances ~~~~~~~~~~~~~~~~~~ -To create a multi-instance application, prepare its layout -in a directory inside ``instances_enabled``. The directory name is used as -the application identifier. +To stop the specific instance, use :ref:`tt stop ` as follows: -This directory should contain the following files: +.. code-block:: console -* The default instance file named ``init.lua``. This file is used for all - instances of the application unless there are specific instance files (see below). -* The instances configuration file ``instances.yml`` with instance names followed by colons: + $ tt stop sharded_cluster:storage-a-002 - .. code-block:: yaml +You can also stop all the instances at once as follows: - : - : - ... +.. code-block:: console - .. note:: + $ tt stop sharded_cluster + • The Instance sharded_cluster:storage-b-001 (PID = 2020) has been terminated. + • The Instance sharded_cluster:storage-b-002 (PID = 2021) has been terminated. + • The Instance sharded_cluster:router-a-001 (PID = 2022) has been terminated. + • The Instance sharded_cluster:storage-a-001 (PID = 2023) has been terminated. + • can't "stat" the PID file. Error: "stat /home/testuser/myapp/instances.enabled/sharded_cluster/var/run/storage-a-002/tt.pid: no such file or directory" - Do not use the dot (``.``) and dash (``-``) characters in the instance names. - They are reserved for system use. +.. note:: -* (Optional) Specific instances files. - These files should have names ``.init.lua``, where ```` - is the name specified in ``instances.yml``. - For example, if your application has separate source files for the ``router`` and ``storage`` - instances, place the router code in the ``router.init.lua`` file. + The error message indicates that ``storage-a-002`` is already not running. -For example, take a ``demo`` application that has three instances:``storage1``, -``storage2``, and ``router``. Storage instances share the same code, and ``router`` has its own. -The application directory ``demo`` inside ``instances_enabled`` must contain the following files: -* ``instances.yml`` -- the instances configuration: +.. _admin-start_stop_instance_remove_artifacts: - .. code-block:: yaml +Removing instance artifacts +~~~~~~~~~~~~~~~~~~~~~~~~~~~ - storage1: - storage2: - router: +The :ref:`tt clean ` command removes instance artifacts (such as logs or snapshots): -* ``init.lua`` -- the code of ``storage1`` and ``storage2`` -* ``router.init.lua`` -- the code of ``router`` +.. code-block:: console + $ tt clean sharded_cluster + • List of files to delete: -Identifying instances in code -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + • /home/testuser/myapp/instances.enabled/sharded_cluster/var/log/storage-a-001/tt.log + • /home/testuser/myapp/instances.enabled/sharded_cluster/var/lib/storage-a-001/00000000000000001062.snap + • /home/testuser/myapp/instances.enabled/sharded_cluster/var/lib/storage-a-001/00000000000000001062.xlog + • ... -When the application is working, each instance has associated environment variables -``TARANTOOL_INSTANCE_NAME`` and ``TARANTOOL_APP_NAME``. You can use them in the application -code to identify the instance on which the code runs. + Confirm [y/n]: -To obtain the instance and application names, use the following code: +Enter ``y`` and press ``Enter`` to confirm removing of artifacts for each instance. -.. code:: lua +.. note:: - local inst_name = os.getenv('TARANTOOL_INSTANCE_NAME') - local app_name = os.getenv('TARANTOOL_APP_NAME') + The ``-f`` option of the ``tt clean`` command can be used to remove the files without confirmation. -Managing multi-instance applications -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Start all three instances of the ``demo`` application: -.. code-block:: console - $ tt start demo - • Starting an instance [demo:router]... - • Starting an instance [demo:storage1]... - • Starting an instance [demo:storage2]... +.. _admin-tt-preload: -Check the status of ``demo`` instances: +Preloading Lua scripts and modules +---------------------------------- -.. code-block:: console +Tarantool supports loading and running chunks of Lua code before starting instances. +To load or run Lua code immediately upon Tarantool startup, specify the ``TT_PRELOAD`` +environment variable. Its value can be either a path to a Lua script or a Lua module name: - $ tt status demo - INSTANCE STATUS PID - demo:router RUNNING 55 - demo:storage1 RUNNING 56 - demo:storage2 RUNNING 57 +* To run the Lua script ``preload_script.lua`` from the ``sharded_cluster`` directory, set ``TT_PRELOAD`` as follows: -Check the status of a specific instance: + .. code-block:: console -.. code-block:: console + $ TT_PRELOAD=preload_script.lua tt start sharded_cluster - $ tt status demo:router - INSTANCE STATUS PID - demo:router RUNNING 55 + Tarantool runs the ``preload_script.lua`` code, waits for it to complete, and + then starts instances. -Connect to an instance: +* To load the ``preload_module`` from the ``sharded_cluster`` directory, set ``TT_PRELOAD`` as follows: -.. code-block:: console + .. code-block:: console - $ tt connect demo:router - • Connecting to the instance... - • Connected to /var/run/tarantool/demo/router/router.control + $ TT_PRELOAD=preload_module tt start sharded_cluster - /var/run/tarantool/demo/router/router.control> + .. note:: -Stop a specific instance: + ``TT_PRELOAD`` values that end with ``.lua`` are considered scripts, + so avoid module names with this ending. -.. code-block:: console +To load several scripts or modules, pass them in a single quoted string, separated +by semicolons: - $ tt stop demo:storage1 - • The Instance demo:storage1 (PID = 56) has been terminated. +.. code-block:: console -Stop all running instances of the ``demo`` application: + $ TT_PRELOAD="preload_script.lua;preload_module" tt start sharded_cluster -.. code-block:: console +If an error happens during the execution of the preload script or module, Tarantool +reports the problem and exits. - $ tt stop demo - • The Instance demo:router (PID = 55) has been terminated. - • can't "stat" the PID file. Error: "stat /var/run/tarantool/demo/storage1/storage1.pid: no such file or directory" - • The Instance demo:storage2 (PID = 57) has been terminated. -.. note:: - The error message indicates that ``storage1`` is already not running. -.. _admin-start_stop_instance-running_locally: +.. _configuration_command_options: -Running Tarantool locally -------------------------- +tarantool command-line options +------------------------------ -Sometimes you may need to run a Tarantool instance locally, for example, for test -purposes. ``tt`` runs in a local environment if it finds a ``tt.yaml`` configuration -file in the current directory or any of its enclosing directories. +Options that can be passed when :ref:`starting a Tarantool instance `: -To set up a local environment for ``tt``: +.. option:: -h, --help -1. Create a home directory for the environment. + Print an annotated list of all available options and exit. -2. Run ``tt init`` in this directory: +.. option:: --help-env-list - .. code-block:: console + **Since:** :doc:`3.0.0 `. - $ tt init - • Environment config is written to 'tt.yaml' + Show a list of :ref:`environment variables ` that can be used to configure Tarantool. -This command creates a default ``tt`` configuration file ``tt.yaml`` for a local -environment and the directories for instance files, control sockets, logs, and other -artifacts: +.. _index-tarantool_version: -.. code-block:: console +.. option:: -v, -V, --version - $ ls - bin distfiles include instances.enabled modules templates tt.yaml + Print the product name and version. -To run a Tarantool instance in the local environment: + **Example** -1. Place the instance file into the ``instances.enabled/`` directory inside the - current directory. + .. code-block:: console -2. Run ``tt start``: + $ tarantool --version + Tarantool Enterprise 3.0.0-beta1-2-gcbb569b4c-r607-gc64 + Target: Linux-x86_64-RelWithDebInfo + ... - .. code-block:: console + In this example: - $ tt start + * ``3.0.0`` is a Tarantool version. + Tarantool follows semantic versioning, which is described in the :ref:`Tarantool release policy ` section. -After the instance is started, you can find its artifacts in their locations inside -the current directory: + * ``Target`` is the platform Tarantool is built on. + Platform-specific details may follow this line. -* logs in ``var/log/`` -* snapshots and write-ahead logs in ``var/lib/`` -* control sockets and PID files in ``var/run/`` -To work with a local environment from a directory outside it, issue ``tt`` calls with -the ``-L`` or ``--local`` argument with the path to this environment as its value: +.. option:: -c, --config PATH -.. code-block:: console + **Since:** :doc:`3.0.0 `. - $ tt --local=/usr/tt/env/ start + Set a path to a :ref:`YAML configuration file `. + You can also configure this value using the ``TT_CONFIG`` environment variable. -.. _admin-start_stop_instance-systemd: + See also: :ref:`Starting an instance using the tarantool command ` -Using systemd tools -------------------- +.. option:: -n, --name INSTANCE -If you start an instance using ``systemd`` tools, like this (the instance name -is ``my_app``): + **Since:** :doc:`3.0.0 `. -.. code-block:: console + Set the name of an instance to run. + You can also configure this value using the ``TT_INSTANCE_NAME`` environment variable. - $ systemctl start tarantool@my_app - $ ps axuf|grep my_app - taranto+ 5350 1.3 0.3 1448872 7736 ? Ssl 20:05 0:28 tarantool my_app.lua + See also: :ref:`Starting an instance using the tarantool command ` -This actually calls ``tarantoolctl`` like in case of -``tarantoolctl start my_app``. -To enable ``my_app`` instance for auto-load during system startup, say: +.. option:: -i -.. code-block:: console + Enter an :ref:`interactive mode `. - $ systemctl enable tarantool@my_app + **Example** -To stop a running ``my_app`` instance with ``systemctl``, run: + .. code-block:: console -.. code-block:: console + $ tarantool -i - $ systemctl stop tarantool@my_app -To restart a running ``my_app`` instance with ``systemctl``, run: +.. option:: -e EXPR -.. code-block:: console + Execute the 'EXPR' string. See also: `lua man page `_. + + **Example** + + .. code-block:: console + + $ tarantool -e 'print("Hello, world!")' + Hello, world! + +.. option:: -l NAME + + Require the 'NAME' library. See also: `lua man page `_. + + **Example** + + .. code-block:: console + + $ tarantool -l luatest.coverage script.lua + +.. option:: -j cmd + + Perform a LuaJIT control command. See also: `Command Line Options `_. + + **Example** + + .. code-block:: console + + $ tarantool -j off app.lua + +.. option:: -b ... + + Save or list bytecode. See also: `Command Line Options `_. + + **Example** + + .. code-block:: console + + $ tarantool -b test.lua test.out + +.. option:: -d SCRIPT + + Activate a debugging session for 'SCRIPT'. See also: `luadebug.lua `_. + + **Example** + + .. code-block:: console + + $ tarantool -d app.lua + + +.. option:: -- + + Stop handling options. See also: `lua man page `_. + + +.. option:: - - $ systemctl restart tarantool@my_app + Stop handling options and execute the standard input as a file. See also: `lua man page `_. \ No newline at end of file diff --git a/doc/book/admin/upgrades/upgrade_cluster.rst b/doc/book/admin/upgrades/upgrade_cluster.rst index 7444cfd63a..3185e60a6d 100644 --- a/doc/book/admin/upgrades/upgrade_cluster.rst +++ b/doc/book/admin/upgrades/upgrade_cluster.rst @@ -98,11 +98,11 @@ Upgrading storages Before upgrading **storage** instances: -* Disable :doc:`Cartridge failover `: run +* Disable Cartridge failover: run .. code-block:: bash - cartridge failover disable + tt cartridge failover disable or use the Cartridge web interface (**Cluster** tab, **Failover: ** button). @@ -112,8 +112,7 @@ Before upgrading **storage** instances: tarantool> vshard.storage.rebalancer_disable() -* Make sure that the Cartridge ``upgrade_schema`` :doc:`option ` - is ``false``. +* Make sure that the Cartridge ``upgrade_schema`` option is ``false``. .. include:: ../_includes/upgrade_storages.rst @@ -130,11 +129,11 @@ Before upgrading **storage** instances: Once you complete the steps, enable failover or rebalancer back: -* Enable :doc:`Cartridge failover `: run +* Enable Cartridge failover: run .. code-block:: bash - cartridge failover set [mode] + tt cartridge failover set [mode] or use the Cartridge web interface (**Cluster** tab, **Failover: Disabled** button). diff --git a/doc/book/cartridge/cartridge_overview.rst b/doc/book/cartridge/cartridge_overview.rst deleted file mode 100644 index 1f7e75ca3c..0000000000 --- a/doc/book/cartridge/cartridge_overview.rst +++ /dev/null @@ -1,48 +0,0 @@ -.. _cartridge-overview: - -================================================================================ -About Tarantool Cartridge -================================================================================ - -Tarantool Cartridge is the recommended alternative to the -:ref:`old-school practices ` of application development -for Tarantool. - -.. _cluster-app: - -As a software development kit (SDK), Tarantool Cartridge provides you with -utilities and :ref:`templates ` to help: - -* easily set up a development environment for your applications; -* plug the necessary Lua modules. - -The resulting package can be installed and started on one or multiple servers -as one or multiple instantiated services -- independent or organized into a -**cluster**. - -.. NOTE:: - - A Tarantool cluster is a collection of Tarantool instances acting in concert. - While a single Tarantool instance can leverage the performance of a single server - and is vulnerable to failure, the cluster spans multiple servers, utilizes their - cumulative CPU power, and is fault-tolerant. - - To fully utilize the capabilities of a Tarantool cluster, you need to - develop applications keeping in mind they are to run in a cluster environment. - -Further on, Tarantool Cartridge provides your cluster-aware applications with -the following benefits: - -* horizontal scalability and load balancing via built-in automatic sharding; -* asynchronous replication; -* automatic failover; -* centralized cluster control via GUI or API; -* automatic configuration synchronization; -* instance functionality segregation. - -A Tarantool Cartridge cluster can segregate functionality between instances via -built-in and custom (user-defined) :ref:`cluster roles `. -You can toggle instances on and off on the fly during cluster operation. -This allows you to put different types of workloads -(e.g., compute- and transaction-intensive ones) on different physical servers -with dedicated hardware. diff --git a/doc/book/cartridge/images/auth_creds.png b/doc/book/cartridge/images/auth_creds.png deleted file mode 100644 index 04a5c14488..0000000000 Binary files a/doc/book/cartridge/images/auth_creds.png and /dev/null differ diff --git a/doc/book/cartridge/images/bootstrap-vshard.png b/doc/book/cartridge/images/bootstrap-vshard.png deleted file mode 100644 index 71734bc85b..0000000000 Binary files a/doc/book/cartridge/images/bootstrap-vshard.png and /dev/null differ diff --git a/doc/book/cartridge/images/change-weight.png b/doc/book/cartridge/images/change-weight.png deleted file mode 100644 index bdd0aa5dfb..0000000000 Binary files a/doc/book/cartridge/images/change-weight.png and /dev/null differ diff --git a/doc/book/cartridge/images/create-router.png b/doc/book/cartridge/images/create-router.png deleted file mode 100644 index dfb43a331b..0000000000 Binary files a/doc/book/cartridge/images/create-router.png and /dev/null differ diff --git a/doc/book/cartridge/images/create-storage.png b/doc/book/cartridge/images/create-storage.png deleted file mode 100644 index d0a6189e48..0000000000 Binary files a/doc/book/cartridge/images/create-storage.png and /dev/null differ diff --git a/doc/book/cartridge/images/edit-replica-set.png b/doc/book/cartridge/images/edit-replica-set.png deleted file mode 100644 index d4e2d105d4..0000000000 Binary files a/doc/book/cartridge/images/edit-replica-set.png and /dev/null differ diff --git a/doc/book/cartridge/images/enabled-failover.png b/doc/book/cartridge/images/enabled-failover.png deleted file mode 100644 index 48a3f3e298..0000000000 Binary files a/doc/book/cartridge/images/enabled-failover.png and /dev/null differ diff --git a/doc/book/cartridge/images/expelling-instance.png b/doc/book/cartridge/images/expelling-instance.png deleted file mode 100644 index 41d9d9a361..0000000000 Binary files a/doc/book/cartridge/images/expelling-instance.png and /dev/null differ diff --git a/doc/book/cartridge/images/failover-control.png b/doc/book/cartridge/images/failover-control.png deleted file mode 100644 index 6eac960da8..0000000000 Binary files a/doc/book/cartridge/images/failover-control.png and /dev/null differ diff --git a/doc/book/cartridge/images/failover-priority.png b/doc/book/cartridge/images/failover-priority.png deleted file mode 100644 index fa9ece3cf8..0000000000 Binary files a/doc/book/cartridge/images/failover-priority.png and /dev/null differ diff --git a/doc/book/cartridge/images/failover.png b/doc/book/cartridge/images/failover.png deleted file mode 100644 index c51839d432..0000000000 Binary files a/doc/book/cartridge/images/failover.png and /dev/null differ diff --git a/doc/book/cartridge/images/final-cluster.png b/doc/book/cartridge/images/final-cluster.png deleted file mode 100644 index 378cab79b4..0000000000 Binary files a/doc/book/cartridge/images/final-cluster.png and /dev/null differ diff --git a/doc/book/cartridge/images/join-new-set.png b/doc/book/cartridge/images/join-new-set.png deleted file mode 100644 index 58436cf0b0..0000000000 Binary files a/doc/book/cartridge/images/join-new-set.png and /dev/null differ diff --git a/doc/book/cartridge/images/join-router.png b/doc/book/cartridge/images/join-router.png deleted file mode 100644 index 651f07e791..0000000000 Binary files a/doc/book/cartridge/images/join-router.png and /dev/null differ diff --git a/doc/book/cartridge/images/join-storage.png b/doc/book/cartridge/images/join-storage.png deleted file mode 100644 index aa5fa0b18e..0000000000 Binary files a/doc/book/cartridge/images/join-storage.png and /dev/null differ diff --git a/doc/book/cartridge/images/new-unconfig.png b/doc/book/cartridge/images/new-unconfig.png deleted file mode 100644 index f148aaede9..0000000000 Binary files a/doc/book/cartridge/images/new-unconfig.png and /dev/null differ diff --git a/doc/book/cartridge/images/probe-server.png b/doc/book/cartridge/images/probe-server.png deleted file mode 100644 index 872287f95b..0000000000 Binary files a/doc/book/cartridge/images/probe-server.png and /dev/null differ diff --git a/doc/book/cartridge/images/switch-master.png b/doc/book/cartridge/images/switch-master.png deleted file mode 100644 index 59168413c1..0000000000 Binary files a/doc/book/cartridge/images/switch-master.png and /dev/null differ diff --git a/doc/book/cartridge/images/unconfigured-router.png b/doc/book/cartridge/images/unconfigured-router.png deleted file mode 100644 index fdec390d11..0000000000 Binary files a/doc/book/cartridge/images/unconfigured-router.png and /dev/null differ diff --git a/doc/book/cartridge/images/users-tab.png b/doc/book/cartridge/images/users-tab.png deleted file mode 100644 index 302601c6e0..0000000000 Binary files a/doc/book/cartridge/images/users-tab.png and /dev/null differ diff --git a/doc/book/cartridge/images/zero-weight.png b/doc/book/cartridge/images/zero-weight.png deleted file mode 100644 index 926318cab0..0000000000 Binary files a/doc/book/cartridge/images/zero-weight.png and /dev/null differ diff --git a/doc/book/cartridge/images/zero.png b/doc/book/cartridge/images/zero.png deleted file mode 100644 index 50654147e1..0000000000 Binary files a/doc/book/cartridge/images/zero.png and /dev/null differ diff --git a/doc/book/connectors/java.rst b/doc/book/connectors/java.rst index 6cb53ee2f4..d13784fb31 100644 --- a/doc/book/connectors/java.rst +++ b/doc/book/connectors/java.rst @@ -8,7 +8,7 @@ There are two Java connectors available: * `cartridge-java `__ supports both single Tarantool nodes and clusters, as well as applications built using the - :doc:`Cartridge framework ` and its modules. + `Cartridge framework `__ and its modules. The Tarantool team actively updates this module with the newest Tarantool features. * `tarantool-java `__ works with early Tarantool versions (1.6 and later) diff --git a/doc/book/index.rst b/doc/book/index.rst index 0ad7da7169..aed53f9158 100644 --- a/doc/book/index.rst +++ b/doc/book/index.rst @@ -15,7 +15,6 @@ User's Guide ../how-to/index ../concepts/index box/index - cartridge/index admin/index monitoring/index connectors diff --git a/doc/code_snippets/README.md b/doc/code_snippets/README.md index 23f5d9108c..3ee120f28b 100644 --- a/doc/code_snippets/README.md +++ b/doc/code_snippets/README.md @@ -1,25 +1,43 @@ # Tarantool code examples -The `doc/code_snippets` folder of a Tarantool documentation repository contains runnable code examples that show how to work with various Tarantool modules. Code from these examples is [referenced](#referencing-code-snippets) in corresponding documentation sections. +The `doc/code_snippets` folder of a Tarantool documentation repository contains runnable code examples that show how to work with Tarantool: + +- The [snippets](snippets) folder contains sample applications that demonstrate how to configure a Tarantool cluster. +- The [test](test) folder contains testable Lua examples that show how to work with various Tarantool modules. + +Code from these examples is [referenced](#referencing-code-snippets) in corresponding documentation sections. ## Prerequisites -First, install the [tt CLI utility](https://www.tarantool.io/en/doc/latest/reference/tooling/tt_cli/). -Then, go to the `doc/code_snippets` folder and install the following libraries: +- Install the [tt CLI utility](https://www.tarantool.io/en/doc/latest/reference/tooling/tt_cli/). +- To be able to run tests for samples from [test](test), go to the `doc/code_snippets` folder and install the following libraries: -- Install [luatest](https://github.com/tarantool/luatest): - ```shell - tt rocks install luatest - ``` + - [luatest](https://github.com/tarantool/luatest): + ```shell + tt rocks install luatest + ``` + + - [luarapidxml](https://github.com/tarantool/luarapidxml): + ```shell + tt rocks install luarapidxml + ``` -- Install [luarapidxml](https://github.com/tarantool/luarapidxml): - ```shell - tt rocks install luarapidxml - ``` +## Running + +### Running applications from 'snippets' + +To run applications placed in [snippets](snippets), follow these steps: + +1. Go to the directory containing samples for a specific feature, for example, [snippets/replication](snippets/replication). +2. To run applications placed in [instances.enabled](instances.enabled), execute the `tt start` command, for example: + + ```console + $ tt start auto_leader + ``` -## Running and testing examples +### Running and testing examples from 'test' To test all the examples, go to the `doc/code_snippets` folder and execute the `luatest` command: diff --git a/doc/code_snippets/snippets/config/README.md b/doc/code_snippets/snippets/config/README.md new file mode 100644 index 0000000000..2e2586e964 --- /dev/null +++ b/doc/code_snippets/snippets/config/README.md @@ -0,0 +1,11 @@ +# Configuration + +A sample application demonstrating various features related to Tarantool [configuration](https://www.tarantool.io/en/doc/latest/concepts/configuration/). + +## Running + +To run applications placed in [instances.enabled](instances.enabled), go to the `config` directory in the terminal and execute the `tt start` command, for example: + +```console +$ tt start application +``` diff --git a/doc/code_snippets/snippets/config/instances.enabled/application/config.yaml b/doc/code_snippets/snippets/config/instances.enabled/application/config.yaml new file mode 100644 index 0000000000..e51dddc6c4 --- /dev/null +++ b/doc/code_snippets/snippets/config/instances.enabled/application/config.yaml @@ -0,0 +1,13 @@ +app: + file: 'myapp.lua' + cfg: + greeting: 'Hello' + +groups: + group001: + replicasets: + replicaset001: + instances: + instance001: + iproto: + listen: "3301" \ No newline at end of file diff --git a/doc/code_snippets/snippets/config/instances.enabled/application/instances.yml b/doc/code_snippets/snippets/config/instances.enabled/application/instances.yml new file mode 100644 index 0000000000..aa60c2fc42 --- /dev/null +++ b/doc/code_snippets/snippets/config/instances.enabled/application/instances.yml @@ -0,0 +1 @@ +instance001: diff --git a/doc/code_snippets/snippets/config/instances.enabled/application/myapp.lua b/doc/code_snippets/snippets/config/instances.enabled/application/myapp.lua new file mode 100644 index 0000000000..81322b1ead --- /dev/null +++ b/doc/code_snippets/snippets/config/instances.enabled/application/myapp.lua @@ -0,0 +1,4 @@ +-- myapp.lua -- +local log = require('log').new("myapp") +local config = require('config') +log.info("%s from app, %s!", config:get('app.cfg.greeting'), box.info.name) diff --git a/doc/code_snippets/snippets/config/instances.enabled/etcd/config.yaml b/doc/code_snippets/snippets/config/instances.enabled/etcd/config.yaml new file mode 100644 index 0000000000..e38344ebd9 --- /dev/null +++ b/doc/code_snippets/snippets/config/instances.enabled/etcd/config.yaml @@ -0,0 +1,5 @@ +config: + etcd: + endpoints: + - http://localhost:2379 + prefix: /example \ No newline at end of file diff --git a/doc/code_snippets/snippets/config/instances.enabled/etcd/instances.yml b/doc/code_snippets/snippets/config/instances.enabled/etcd/instances.yml new file mode 100644 index 0000000000..6c765b2e67 --- /dev/null +++ b/doc/code_snippets/snippets/config/instances.enabled/etcd/instances.yml @@ -0,0 +1,3 @@ +instance001: +instance002: +instance003: \ No newline at end of file diff --git a/doc/code_snippets/snippets/config/instances.enabled/etcd_full/config.yaml b/doc/code_snippets/snippets/config/instances.enabled/etcd_full/config.yaml new file mode 100644 index 0000000000..479314e097 --- /dev/null +++ b/doc/code_snippets/snippets/config/instances.enabled/etcd_full/config.yaml @@ -0,0 +1,12 @@ +config: + etcd: + endpoints: + - http://localhost:2379 + prefix: /example + username: testuser + password: foobar + ssl: + ca_file: ca.crt + http: + request: + timeout: 3 \ No newline at end of file diff --git a/doc/code_snippets/snippets/config/instances.enabled/etcd_full/instances.yml b/doc/code_snippets/snippets/config/instances.enabled/etcd_full/instances.yml new file mode 100644 index 0000000000..6c765b2e67 --- /dev/null +++ b/doc/code_snippets/snippets/config/instances.enabled/etcd_full/instances.yml @@ -0,0 +1,3 @@ +instance001: +instance002: +instance003: \ No newline at end of file diff --git a/doc/code_snippets/snippets/config/instances.enabled/global_scope/config.yaml b/doc/code_snippets/snippets/config/instances.enabled/global_scope/config.yaml new file mode 100644 index 0000000000..fbb6edb7de --- /dev/null +++ b/doc/code_snippets/snippets/config/instances.enabled/global_scope/config.yaml @@ -0,0 +1,9 @@ +iproto: + listen: "3301" + +groups: + group001: + replicasets: + replicaset001: + instances: + instance001: {} \ No newline at end of file diff --git a/doc/code_snippets/snippets/config/instances.enabled/global_scope/instances.yml b/doc/code_snippets/snippets/config/instances.enabled/global_scope/instances.yml new file mode 100644 index 0000000000..aa60c2fc42 --- /dev/null +++ b/doc/code_snippets/snippets/config/instances.enabled/global_scope/instances.yml @@ -0,0 +1 @@ +instance001: diff --git a/doc/code_snippets/snippets/config/instances.enabled/group_scope/config.yaml b/doc/code_snippets/snippets/config/instances.enabled/group_scope/config.yaml new file mode 100644 index 0000000000..8a226fd4db --- /dev/null +++ b/doc/code_snippets/snippets/config/instances.enabled/group_scope/config.yaml @@ -0,0 +1,8 @@ +groups: + group001: + iproto: + listen: "3301" + replicasets: + replicaset001: + instances: + instance001: {} \ No newline at end of file diff --git a/doc/code_snippets/snippets/config/instances.enabled/group_scope/instances.yml b/doc/code_snippets/snippets/config/instances.enabled/group_scope/instances.yml new file mode 100644 index 0000000000..aa60c2fc42 --- /dev/null +++ b/doc/code_snippets/snippets/config/instances.enabled/group_scope/instances.yml @@ -0,0 +1 @@ +instance001: diff --git a/doc/code_snippets/snippets/config/instances.enabled/instance_scope/config.yaml b/doc/code_snippets/snippets/config/instances.enabled/instance_scope/config.yaml new file mode 100644 index 0000000000..b2ecb4cafa --- /dev/null +++ b/doc/code_snippets/snippets/config/instances.enabled/instance_scope/config.yaml @@ -0,0 +1,8 @@ +groups: + group001: + replicasets: + replicaset001: + instances: + instance001: + iproto: + listen: "3301" \ No newline at end of file diff --git a/doc/code_snippets/snippets/config/instances.enabled/instance_scope/instances.yml b/doc/code_snippets/snippets/config/instances.enabled/instance_scope/instances.yml new file mode 100644 index 0000000000..aa60c2fc42 --- /dev/null +++ b/doc/code_snippets/snippets/config/instances.enabled/instance_scope/instances.yml @@ -0,0 +1 @@ +instance001: diff --git a/doc/code_snippets/snippets/config/instances.enabled/replicaset_scope/config.yaml b/doc/code_snippets/snippets/config/instances.enabled/replicaset_scope/config.yaml new file mode 100644 index 0000000000..52ecedf244 --- /dev/null +++ b/doc/code_snippets/snippets/config/instances.enabled/replicaset_scope/config.yaml @@ -0,0 +1,8 @@ +groups: + group001: + replicasets: + replicaset001: + iproto: + listen: "3301" + instances: + instance001: {} \ No newline at end of file diff --git a/doc/code_snippets/snippets/config/instances.enabled/replicaset_scope/instances.yml b/doc/code_snippets/snippets/config/instances.enabled/replicaset_scope/instances.yml new file mode 100644 index 0000000000..aa60c2fc42 --- /dev/null +++ b/doc/code_snippets/snippets/config/instances.enabled/replicaset_scope/instances.yml @@ -0,0 +1 @@ +instance001: diff --git a/doc/code_snippets/snippets/config/instances.enabled/templating/config.yaml b/doc/code_snippets/snippets/config/instances.enabled/templating/config.yaml new file mode 100644 index 0000000000..5df487e662 --- /dev/null +++ b/doc/code_snippets/snippets/config/instances.enabled/templating/config.yaml @@ -0,0 +1,10 @@ +groups: + group001: + replicasets: + replicaset001: + instances: + instance001: + snapshot: + dir: ./var/{{ instance_name }}/snapshots + wal: + dir: ./var/{{ instance_name }}/wals \ No newline at end of file diff --git a/doc/code_snippets/snippets/config/instances.enabled/templating/instances.yml b/doc/code_snippets/snippets/config/instances.enabled/templating/instances.yml new file mode 100644 index 0000000000..aa60c2fc42 --- /dev/null +++ b/doc/code_snippets/snippets/config/instances.enabled/templating/instances.yml @@ -0,0 +1 @@ +instance001: diff --git a/doc/code_snippets/snippets/config/tt.yaml b/doc/code_snippets/snippets/config/tt.yaml new file mode 100644 index 0000000000..41a3915f50 --- /dev/null +++ b/doc/code_snippets/snippets/config/tt.yaml @@ -0,0 +1,54 @@ +modules: + # Directory where the external modules are stored. + directory: modules + +env: + # Restart instance on failure. + restart_on_failure: false + + # Directory that stores binary files. + bin_dir: bin + + # Directory that stores Tarantool header files. + inc_dir: include + + # Path to directory that stores all applications. + # The directory can also contain symbolic links to applications. + instances_enabled: instances.enabled + + # Tarantoolctl artifacts layout compatibility: if set to true tt will not create application + # sub-directories for control socket, pid files, log files, etc.. Data files (wal, vinyl, + # snap) and multi-instance applications are not affected by this option. + tarantoolctl_layout: false + +app: + # Directory that stores various instance runtime + # artifacts like console socket, PID file, etc. + run_dir: var/run + + # Directory that stores log files. + log_dir: var/log + + # Directory where write-ahead log (.xlog) files are stored. + wal_dir: var/lib + + # Directory where memtx stores snapshot (.snap) files. + memtx_dir: var/lib + + # Directory where vinyl files or subdirectories will be stored. + vinyl_dir: var/lib + +# Path to file with credentials for downloading Tarantool Enterprise Edition. +# credential_path: /path/to/file +ee: + credential_path: + +templates: + # The path to templates search directory. + - path: templates + +repo: + # Directory where local rocks files could be found. + rocks: + # Directory that stores installation files. + distfiles: distfiles diff --git a/doc/code_snippets/snippets/replication/instances.enabled/auto_leader/README.md b/doc/code_snippets/snippets/replication/instances.enabled/auto_leader/README.md new file mode 100644 index 0000000000..c8256c2a5c --- /dev/null +++ b/doc/code_snippets/snippets/replication/instances.enabled/auto_leader/README.md @@ -0,0 +1,11 @@ +# Master-replica: automated failover + +A sample application demonstrating how to bootstrap a replica set with [automated failover](https://www.tarantool.io/en/doc/latest/how-to/replication/repl_bootstrap_auto/). + +## Running + +To start all instances, execute the following command in the [replication](../../../replication) directory: + +```console +$ tt start auto_leader +``` diff --git a/doc/code_snippets/snippets/replication/instances.enabled/auto_leader/config.yaml b/doc/code_snippets/snippets/replication/instances.enabled/auto_leader/config.yaml new file mode 100644 index 0000000000..d5b42eed83 --- /dev/null +++ b/doc/code_snippets/snippets/replication/instances.enabled/auto_leader/config.yaml @@ -0,0 +1,31 @@ +credentials: + users: + replicator: + password: 'topsecret' + roles: [replication] + +iproto: + advertise: + peer: replicator@ + +replication: + failover: election + +groups: + group001: + replicasets: + replicaset001: + instances: + instance001: + iproto: + listen: 127.0.0.1:3301 + instance002: + iproto: + listen: 127.0.0.1:3302 + instance003: + iproto: + listen: 127.0.0.1:3303 + +# Load sample data +app: + file: 'data.lua' \ No newline at end of file diff --git a/doc/code_snippets/snippets/replication/instances.enabled/auto_leader/data.lua b/doc/code_snippets/snippets/replication/instances.enabled/auto_leader/data.lua new file mode 100644 index 0000000000..27b0b6bbf6 --- /dev/null +++ b/doc/code_snippets/snippets/replication/instances.enabled/auto_leader/data.lua @@ -0,0 +1,32 @@ +function create_space() + box.schema.space.create('bands') + box.space.bands:format({ + { name = 'id', type = 'unsigned' }, + { name = 'band_name', type = 'string' }, + { name = 'year', type = 'unsigned' } + }) + box.space.bands:create_index('primary', { parts = { 'id' } }) +end + +function create_sync_space() + box.schema.space.create('bands', { is_sync = true }) + box.space.bands:format({ + { name = 'id', type = 'unsigned' }, + { name = 'band_name', type = 'string' }, + { name = 'year', type = 'unsigned' } + }) + box.space.bands:create_index('primary', { parts = { 'id' } }) +end + +function load_data() + box.space.bands:insert { 1, 'Roxette', 1986 } + box.space.bands:insert { 2, 'Scorpions', 1965 } + box.space.bands:insert { 3, 'Ace of Base', 1987 } + box.space.bands:insert { 4, 'The Beatles', 1960 } + box.space.bands:insert { 5, 'Pink Floyd', 1965 } + box.space.bands:insert { 6, 'The Rolling Stones', 1962 } + box.space.bands:insert { 7, 'The Doors', 1965 } + box.space.bands:insert { 8, 'Nirvana', 1987 } + box.space.bands:insert { 9, 'Led Zeppelin', 1968 } + box.space.bands:insert { 10, 'Queen', 1970 } +end diff --git a/doc/code_snippets/snippets/replication/instances.enabled/auto_leader/instances.yml b/doc/code_snippets/snippets/replication/instances.enabled/auto_leader/instances.yml new file mode 100644 index 0000000000..6c765b2e67 --- /dev/null +++ b/doc/code_snippets/snippets/replication/instances.enabled/auto_leader/instances.yml @@ -0,0 +1,3 @@ +instance001: +instance002: +instance003: \ No newline at end of file diff --git a/doc/code_snippets/snippets/replication/instances.enabled/bootstrap_strategy/README.md b/doc/code_snippets/snippets/replication/instances.enabled/bootstrap_strategy/README.md new file mode 100644 index 0000000000..f7e99e1308 --- /dev/null +++ b/doc/code_snippets/snippets/replication/instances.enabled/bootstrap_strategy/README.md @@ -0,0 +1,11 @@ +# replication.bootstrap_strategy + +A sample application demonstrating how to use the specified instance to bootstrap a replica set. + +## Running + +To start all instances, execute the following command in the [replication](../../../replication) directory: + +```console +$ tt start bootstrap_strategy +``` diff --git a/doc/code_snippets/snippets/replication/instances.enabled/bootstrap_strategy/config.yaml b/doc/code_snippets/snippets/replication/instances.enabled/bootstrap_strategy/config.yaml new file mode 100644 index 0000000000..c6bdfda820 --- /dev/null +++ b/doc/code_snippets/snippets/replication/instances.enabled/bootstrap_strategy/config.yaml @@ -0,0 +1,30 @@ +credentials: + users: + replicator: + password: 'topsecret' + roles: [replication] + +iproto: + advertise: + peer: replicator@ + +replication: + failover: election + +groups: + group001: + replicasets: + replicaset001: + replication: + bootstrap_strategy: config + bootstrap_leader: instance001 + instances: + instance001: + iproto: + listen: 127.0.0.1:3301 + instance002: + iproto: + listen: 127.0.0.1:3302 + instance003: + iproto: + listen: 127.0.0.1:3303 \ No newline at end of file diff --git a/doc/code_snippets/snippets/replication/instances.enabled/bootstrap_strategy/instances.yml b/doc/code_snippets/snippets/replication/instances.enabled/bootstrap_strategy/instances.yml new file mode 100644 index 0000000000..6c765b2e67 --- /dev/null +++ b/doc/code_snippets/snippets/replication/instances.enabled/bootstrap_strategy/instances.yml @@ -0,0 +1,3 @@ +instance001: +instance002: +instance003: \ No newline at end of file diff --git a/doc/code_snippets/snippets/replication/instances.enabled/manual_leader/README.md b/doc/code_snippets/snippets/replication/instances.enabled/manual_leader/README.md new file mode 100644 index 0000000000..e6724f65ee --- /dev/null +++ b/doc/code_snippets/snippets/replication/instances.enabled/manual_leader/README.md @@ -0,0 +1,11 @@ +# Master-replica: manual failover + +A sample application demonstrating how to bootstrap a replica set with [manual failover](https://www.tarantool.io/en/doc/latest/how-to/replication/repl_bootstrap/). + +## Running + +To start all instances, execute the following command in the [replication](../../../replication) directory: + +```console +$ tt start manual_leader +``` diff --git a/doc/code_snippets/snippets/replication/instances.enabled/manual_leader/config.yaml b/doc/code_snippets/snippets/replication/instances.enabled/manual_leader/config.yaml new file mode 100644 index 0000000000..3b30a4b6cb --- /dev/null +++ b/doc/code_snippets/snippets/replication/instances.enabled/manual_leader/config.yaml @@ -0,0 +1,32 @@ +credentials: + users: + replicator: + password: 'topsecret' + roles: [replication] + +iproto: + advertise: + peer: replicator@ + +replication: + failover: manual + +groups: + group001: + replicasets: + replicaset001: + leader: instance001 + instances: + instance001: + iproto: + listen: 127.0.0.1:3301 + instance002: + iproto: + listen: 127.0.0.1:3302 + instance003: + iproto: + listen: 127.0.0.1:3303 + +# Load sample data +app: + file: 'myapp.lua' \ No newline at end of file diff --git a/doc/code_snippets/snippets/replication/instances.enabled/manual_leader/instances.yml b/doc/code_snippets/snippets/replication/instances.enabled/manual_leader/instances.yml new file mode 100644 index 0000000000..6c765b2e67 --- /dev/null +++ b/doc/code_snippets/snippets/replication/instances.enabled/manual_leader/instances.yml @@ -0,0 +1,3 @@ +instance001: +instance002: +instance003: \ No newline at end of file diff --git a/doc/code_snippets/snippets/replication/instances.enabled/manual_leader/myapp.lua b/doc/code_snippets/snippets/replication/instances.enabled/manual_leader/myapp.lua new file mode 100644 index 0000000000..321db0aab1 --- /dev/null +++ b/doc/code_snippets/snippets/replication/instances.enabled/manual_leader/myapp.lua @@ -0,0 +1,22 @@ +function create_space() + box.schema.space.create('bands') + box.space.bands:format({ + { name = 'id', type = 'unsigned' }, + { name = 'band_name', type = 'string' }, + { name = 'year', type = 'unsigned' } + }) + box.space.bands:create_index('primary', { parts = { 'id' } }) +end + +function load_data() + box.space.bands:insert { 1, 'Roxette', 1986 } + box.space.bands:insert { 2, 'Scorpions', 1965 } + box.space.bands:insert { 3, 'Ace of Base', 1987 } + box.space.bands:insert { 4, 'The Beatles', 1960 } + box.space.bands:insert { 5, 'Pink Floyd', 1965 } + box.space.bands:insert { 6, 'The Rolling Stones', 1962 } + box.space.bands:insert { 7, 'The Doors', 1965 } + box.space.bands:insert { 8, 'Nirvana', 1987 } + box.space.bands:insert { 9, 'Led Zeppelin', 1968 } + box.space.bands:insert { 10, 'Queen', 1970 } +end diff --git a/doc/code_snippets/snippets/replication/instances.enabled/master_master/README.md b/doc/code_snippets/snippets/replication/instances.enabled/master_master/README.md new file mode 100644 index 0000000000..ff0d938a0e --- /dev/null +++ b/doc/code_snippets/snippets/replication/instances.enabled/master_master/README.md @@ -0,0 +1,11 @@ +# Master-master + +A sample application demonstrating how to bootstrap a [master-master](https://www.tarantool.io/en/doc/latest/how-to/replication/repl_bootstrap_master_master/) replica set. + +## Running + +To start all instances, execute the following command in the [replication](../../../replication) directory: + +```console +$ tt start master_master +``` diff --git a/doc/code_snippets/snippets/replication/instances.enabled/master_master/config.yaml b/doc/code_snippets/snippets/replication/instances.enabled/master_master/config.yaml new file mode 100644 index 0000000000..7eb2da12eb --- /dev/null +++ b/doc/code_snippets/snippets/replication/instances.enabled/master_master/config.yaml @@ -0,0 +1,32 @@ +credentials: + users: + replicator: + password: 'topsecret' + roles: [replication] + +iproto: + advertise: + peer: replicator@ + +replication: + failover: off + +groups: + group001: + replicasets: + replicaset001: + instances: + instance001: + database: + mode: rw + iproto: + listen: 127.0.0.1:3301 + instance002: + database: + mode: rw + iproto: + listen: 127.0.0.1:3302 + +# Load sample data +app: + file: 'myapp.lua' \ No newline at end of file diff --git a/doc/code_snippets/snippets/replication/instances.enabled/master_master/instances.yml b/doc/code_snippets/snippets/replication/instances.enabled/master_master/instances.yml new file mode 100644 index 0000000000..75e286d69c --- /dev/null +++ b/doc/code_snippets/snippets/replication/instances.enabled/master_master/instances.yml @@ -0,0 +1,2 @@ +instance001: +instance002: \ No newline at end of file diff --git a/doc/code_snippets/snippets/replication/instances.enabled/master_master/myapp.lua b/doc/code_snippets/snippets/replication/instances.enabled/master_master/myapp.lua new file mode 100644 index 0000000000..321db0aab1 --- /dev/null +++ b/doc/code_snippets/snippets/replication/instances.enabled/master_master/myapp.lua @@ -0,0 +1,22 @@ +function create_space() + box.schema.space.create('bands') + box.space.bands:format({ + { name = 'id', type = 'unsigned' }, + { name = 'band_name', type = 'string' }, + { name = 'year', type = 'unsigned' } + }) + box.space.bands:create_index('primary', { parts = { 'id' } }) +end + +function load_data() + box.space.bands:insert { 1, 'Roxette', 1986 } + box.space.bands:insert { 2, 'Scorpions', 1965 } + box.space.bands:insert { 3, 'Ace of Base', 1987 } + box.space.bands:insert { 4, 'The Beatles', 1960 } + box.space.bands:insert { 5, 'Pink Floyd', 1965 } + box.space.bands:insert { 6, 'The Rolling Stones', 1962 } + box.space.bands:insert { 7, 'The Doors', 1965 } + box.space.bands:insert { 8, 'Nirvana', 1987 } + box.space.bands:insert { 9, 'Led Zeppelin', 1968 } + box.space.bands:insert { 10, 'Queen', 1970 } +end diff --git a/doc/code_snippets/snippets/replication/instances.enabled/peers/config.yaml b/doc/code_snippets/snippets/replication/instances.enabled/peers/config.yaml new file mode 100644 index 0000000000..ac3ed89768 --- /dev/null +++ b/doc/code_snippets/snippets/replication/instances.enabled/peers/config.yaml @@ -0,0 +1,27 @@ +credentials: + users: + replicator: + password: 'topsecret' + roles: [replication] + +replication: + peers: + - replicator:topsecret@127.0.0.1:3301 + - replicator:topsecret@127.0.0.1:3302 + - replicator:topsecret@127.0.0.1:3303 + failover: election + +groups: + group001: + replicasets: + replicaset001: + instances: + instance001: + iproto: + listen: 127.0.0.1:3301 + instance002: + iproto: + listen: 127.0.0.1:3302 + instance003: + iproto: + listen: 127.0.0.1:3303 \ No newline at end of file diff --git a/doc/code_snippets/snippets/replication/instances.enabled/peers/instances.yml b/doc/code_snippets/snippets/replication/instances.enabled/peers/instances.yml new file mode 100644 index 0000000000..6c765b2e67 --- /dev/null +++ b/doc/code_snippets/snippets/replication/instances.enabled/peers/instances.yml @@ -0,0 +1,3 @@ +instance001: +instance002: +instance003: \ No newline at end of file diff --git a/doc/code_snippets/snippets/replication/tt.yaml b/doc/code_snippets/snippets/replication/tt.yaml new file mode 100644 index 0000000000..41a3915f50 --- /dev/null +++ b/doc/code_snippets/snippets/replication/tt.yaml @@ -0,0 +1,54 @@ +modules: + # Directory where the external modules are stored. + directory: modules + +env: + # Restart instance on failure. + restart_on_failure: false + + # Directory that stores binary files. + bin_dir: bin + + # Directory that stores Tarantool header files. + inc_dir: include + + # Path to directory that stores all applications. + # The directory can also contain symbolic links to applications. + instances_enabled: instances.enabled + + # Tarantoolctl artifacts layout compatibility: if set to true tt will not create application + # sub-directories for control socket, pid files, log files, etc.. Data files (wal, vinyl, + # snap) and multi-instance applications are not affected by this option. + tarantoolctl_layout: false + +app: + # Directory that stores various instance runtime + # artifacts like console socket, PID file, etc. + run_dir: var/run + + # Directory that stores log files. + log_dir: var/log + + # Directory where write-ahead log (.xlog) files are stored. + wal_dir: var/lib + + # Directory where memtx stores snapshot (.snap) files. + memtx_dir: var/lib + + # Directory where vinyl files or subdirectories will be stored. + vinyl_dir: var/lib + +# Path to file with credentials for downloading Tarantool Enterprise Edition. +# credential_path: /path/to/file +ee: + credential_path: + +templates: + # The path to templates search directory. + - path: templates + +repo: + # Directory where local rocks files could be found. + rocks: + # Directory that stores installation files. + distfiles: distfiles diff --git a/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster/README.md b/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster/README.md new file mode 100644 index 0000000000..f3873f099b --- /dev/null +++ b/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster/README.md @@ -0,0 +1,72 @@ +# Sharded cluster + +A sample application demonstrating how to configure a [sharded](https://www.tarantool.io/en/doc/latest/concepts/sharding/) cluster. + +## Running + +To run the cluster, go to the `sharding` directory in the terminal and perform the following steps: + +1. Install `vshard`: + + ```console + $ tt rocks install vshard + ``` + +2. Run the cluster: + + ```console + $ tt start sharded_cluster + ``` + +3. Connect to the router: + + ```console + $ tt connect sharded_cluster:router-a-001 + ``` + +4. Insert test data: + + ```console + sharded_cluster:router-a-001> insert_data() + --- + ... + ``` + +5. Connect to storages in different replica sets to see how data is distributed across nodes: + + a. `storage-a-001`: + + ```console + sharded_cluster:storage-a-001> box.space.bands:select() + --- + - - [1, 614, 'Roxette', 1986] + - [2, 986, 'Scorpions', 1965] + - [5, 755, 'Pink Floyd', 1965] + - [7, 998, 'The Doors', 1965] + - [8, 762, 'Nirvana', 1987] + ... + ``` + + b. `storage-b-001`: + + ```console + sharded_cluster:storage-b-001> box.space.bands:select() + --- + - - [3, 11, 'Ace of Base', 1987] + - [4, 42, 'The Beatles', 1960] + - [6, 55, 'The Rolling Stones', 1962] + - [9, 299, 'Led Zeppelin', 1968] + - [10, 167, 'Queen', 1970] + ... + ``` + + +## Packaging + +To package an application into a `.tgz` archive, use the `tt pack` command: + +```console +$ tt pack tgz --app-list sharded_cluster +``` + +Note that the necessary `vshard` dependency is specified in the [sharded_cluster-scm-1.rockspec](sharded_cluster-scm-1.rockspec) file. diff --git a/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster/config.yaml b/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster/config.yaml new file mode 100644 index 0000000000..3615996871 --- /dev/null +++ b/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster/config.yaml @@ -0,0 +1,55 @@ +credentials: + users: + replicator: + password: 'topsecret' + roles: [replication] + storage: + password: 'secret' + roles: [super] + +iproto: + advertise: + peer: replicator@ + sharding: storage@ + +sharding: + bucket_count: 1000 + +groups: + storages: + app: + module: storage + sharding: + roles: [storage] + replication: + failover: manual + replicasets: + storage-a: + leader: storage-a-001 + instances: + storage-a-001: + iproto: + listen: 127.0.0.1:3301 + storage-a-002: + iproto: + listen: 127.0.0.1:3302 + storage-b: + leader: storage-b-001 + instances: + storage-b-001: + iproto: + listen: 127.0.0.1:3303 + storage-b-002: + iproto: + listen: 127.0.0.1:3304 + routers: + app: + module: router + sharding: + roles: [router] + replicasets: + router-a: + instances: + router-a-001: + iproto: + listen: 127.0.0.1:3300 \ No newline at end of file diff --git a/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster/instances.yaml b/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster/instances.yaml new file mode 100644 index 0000000000..368bc16cb6 --- /dev/null +++ b/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster/instances.yaml @@ -0,0 +1,5 @@ +storage-a-001: +storage-a-002: +storage-b-001: +storage-b-002: +router-a-001: \ No newline at end of file diff --git a/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster/router.lua b/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster/router.lua new file mode 100644 index 0000000000..bc4e849af5 --- /dev/null +++ b/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster/router.lua @@ -0,0 +1,26 @@ +local vshard = require('vshard') + +vshard.router.bootstrap() + +function put(id, band_name, year) + local bucket_id = vshard.router.bucket_id_mpcrc32({ id }) + vshard.router.callrw(bucket_id, 'put', { id, bucket_id, band_name, year }) +end + +function get(id) + local bucket_id = vshard.router.bucket_id_mpcrc32({ id }) + return vshard.router.callro(bucket_id, 'get', { id }) +end + +function insert_data() + put(1, 'Roxette', 1986) + put(2, 'Scorpions', 1965) + put(3, 'Ace of Base', 1987) + put(4, 'The Beatles', 1960) + put(5, 'Pink Floyd', 1965) + put(6, 'The Rolling Stones', 1962) + put(7, 'The Doors', 1965) + put(8, 'Nirvana', 1987) + put(9, 'Led Zeppelin', 1968) + put(10, 'Queen', 1970) +end diff --git a/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster/sharded_cluster-scm-1.rockspec b/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster/sharded_cluster-scm-1.rockspec new file mode 100644 index 0000000000..cc9d8ca85b --- /dev/null +++ b/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster/sharded_cluster-scm-1.rockspec @@ -0,0 +1,12 @@ +package = 'sharded_cluster' +version = 'scm-1' +source = { + url = '/dev/null', +} + +dependencies = { + 'vshard == 0.1.25' +} +build = { + type = 'none'; +} diff --git a/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster/storage.lua b/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster/storage.lua new file mode 100644 index 0000000000..fb9a932349 --- /dev/null +++ b/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster/storage.lua @@ -0,0 +1,23 @@ +box.schema.create_space('bands', { + format = { + { name = 'id', type = 'unsigned' }, + { name = 'bucket_id', type = 'unsigned' }, + { name = 'band_name', type = 'string' }, + { name = 'year', type = 'unsigned' } + }, + if_not_exists = true +}) +box.space.bands:create_index('id', { parts = { 'id' }, if_not_exists = true }) +box.space.bands:create_index('bucket_id', { parts = { 'id' }, unique = false, if_not_exists = true }) + +function put(id, bucket_id, band_name, year) + box.space.bands:insert({ id, bucket_id, band_name, year }) +end + +function get(id) + local tuple = box.space.bands:get(id) + if tuple == nil then + return nil + end + return { tuple.id, tuple.band_name, tuple.year } +end diff --git a/doc/code_snippets/snippets/sharding/templates/basic/MANIFEST.yaml b/doc/code_snippets/snippets/sharding/templates/basic/MANIFEST.yaml new file mode 100644 index 0000000000..10f9d4792f --- /dev/null +++ b/doc/code_snippets/snippets/sharding/templates/basic/MANIFEST.yaml @@ -0,0 +1,30 @@ +description: Basic template +vars: + - prompt: A name of the user for replication + name: replicator_user_name + default: replicator + + - prompt: A password for a replicator user + name: replicator_user_password + re: ^\w+$ + + - prompt: A name of the user for sharding + name: sharding_user_name + default: storage + + - prompt: A password for a sharding user + name: sharding_user_password + re: ^\w+$ + + - prompt: The number of buckets in a cluster + name: sharding_bucket_count + default: '1000' + + - prompt: A listen URI + name: listen_uri + default: '127.0.0.1' +include: + - config.yaml + - instances.yaml + - router.lua + - storage.lua diff --git a/doc/code_snippets/snippets/sharding/templates/basic/config.yaml.tt.template b/doc/code_snippets/snippets/sharding/templates/basic/config.yaml.tt.template new file mode 100644 index 0000000000..12a5043ea9 --- /dev/null +++ b/doc/code_snippets/snippets/sharding/templates/basic/config.yaml.tt.template @@ -0,0 +1,55 @@ +credentials: + users: + {{.replicator_user_name}}: + password: '{{.replicator_user_password}}' + roles: [replication] + {{.sharding_user_name}}: + password: '{{.sharding_user_password}}' + roles: [super] + +iproto: + advertise: + peer: {{.replicator_user_name}}@ + sharding: {{.sharding_user_name}}@ + +sharding: + bucket_count: {{.sharding_bucket_count}} + +groups: + storages: + app: + module: storage + sharding: + roles: [storage] + replication: + failover: manual + replicasets: + storage-a: + leader: storage-a-001 + instances: + storage-a-001: + iproto: + listen: {{.listen_uri}}:3301 + storage-a-002: + iproto: + listen: {{.listen_uri}}:3302 + storage-b: + leader: storage-b-001 + instances: + storage-b-001: + iproto: + listen: {{.listen_uri}}:3303 + storage-b-002: + iproto: + listen: {{.listen_uri}}:3304 + routers: + app: + module: router + sharding: + roles: [router] + replicasets: + router-a: + instances: + router-a-001: + iproto: + listen: {{.listen_uri}}:3300 diff --git a/doc/code_snippets/snippets/sharding/templates/basic/instances.yaml b/doc/code_snippets/snippets/sharding/templates/basic/instances.yaml new file mode 100644 index 0000000000..368bc16cb6 --- /dev/null +++ b/doc/code_snippets/snippets/sharding/templates/basic/instances.yaml @@ -0,0 +1,5 @@ +storage-a-001: +storage-a-002: +storage-b-001: +storage-b-002: +router-a-001: \ No newline at end of file diff --git a/doc/code_snippets/snippets/sharding/templates/basic/router.lua b/doc/code_snippets/snippets/sharding/templates/basic/router.lua new file mode 100644 index 0000000000..ee21da0e5f --- /dev/null +++ b/doc/code_snippets/snippets/sharding/templates/basic/router.lua @@ -0,0 +1,5 @@ +local vshard = require('vshard') + +vshard.router.bootstrap() + +-- Router code -- diff --git a/doc/code_snippets/snippets/sharding/templates/basic/storage.lua b/doc/code_snippets/snippets/sharding/templates/basic/storage.lua new file mode 100644 index 0000000000..87f063f033 --- /dev/null +++ b/doc/code_snippets/snippets/sharding/templates/basic/storage.lua @@ -0,0 +1 @@ +-- Storage code -- diff --git a/doc/code_snippets/snippets/sharding/tt.yaml b/doc/code_snippets/snippets/sharding/tt.yaml new file mode 100644 index 0000000000..41a3915f50 --- /dev/null +++ b/doc/code_snippets/snippets/sharding/tt.yaml @@ -0,0 +1,54 @@ +modules: + # Directory where the external modules are stored. + directory: modules + +env: + # Restart instance on failure. + restart_on_failure: false + + # Directory that stores binary files. + bin_dir: bin + + # Directory that stores Tarantool header files. + inc_dir: include + + # Path to directory that stores all applications. + # The directory can also contain symbolic links to applications. + instances_enabled: instances.enabled + + # Tarantoolctl artifacts layout compatibility: if set to true tt will not create application + # sub-directories for control socket, pid files, log files, etc.. Data files (wal, vinyl, + # snap) and multi-instance applications are not affected by this option. + tarantoolctl_layout: false + +app: + # Directory that stores various instance runtime + # artifacts like console socket, PID file, etc. + run_dir: var/run + + # Directory that stores log files. + log_dir: var/log + + # Directory where write-ahead log (.xlog) files are stored. + wal_dir: var/lib + + # Directory where memtx stores snapshot (.snap) files. + memtx_dir: var/lib + + # Directory where vinyl files or subdirectories will be stored. + vinyl_dir: var/lib + +# Path to file with credentials for downloading Tarantool Enterprise Edition. +# credential_path: /path/to/file +ee: + credential_path: + +templates: + # The path to templates search directory. + - path: templates + +repo: + # Directory where local rocks files could be found. + rocks: + # Directory that stores installation files. + distfiles: distfiles diff --git a/doc/concepts/configuration.rst b/doc/concepts/configuration.rst new file mode 100644 index 0000000000..e235c58710 --- /dev/null +++ b/doc/concepts/configuration.rst @@ -0,0 +1,478 @@ +.. _configuration: + +Configuration +============= + +Tarantool provides the ability to configure the full topology of a cluster and set parameters specific for concrete instances, such as connection settings, memory used to store data, logging, and snapshot settings. +Each instance uses this configuration during :ref:`startup ` to organize the cluster. + +There are two approaches to configuring Tarantool: + +* *Since version 3.0*: In the YAML format. + + YAML configuration allows you to provide the full cluster topology and specify all configuration options. + You can use local configuration in a YAML file for each instance or store configuration data in one reliable place using :ref:`etcd `. + +* *In version 2.11 and earlier*: :ref:`In code ` using the ``box.cfg`` API. + + In this case, configuration is provided in a Lua initialization script. + + .. NOTE:: + + Starting with the 3.0 version, configuring Tarantool in code is considered a legacy approach. + + +.. _configuration_overview: + +Configuration overview +---------------------- + +YAML configuration describes the full topology of a Tarantool cluster. +A cluster's topology includes the following elements, starting from the lower level: + +.. code-block:: yaml + :emphasize-lines: 1,3,5 + + groups: + group001: + replicasets: + replicaset001: + instances: + instance001: + # ... + instance002: + # ... + +- ``instances`` + + An *instance* represents a single running Tarantool instance. + It stores data or might act as a router for handling CRUD requests in a :ref:`sharded ` cluster. +- ``replicasets`` + + A *replica set* is a pack of instances that operate on same data sets. + :ref:`Replication ` provides redundancy and increases data availability. +- ``groups`` + + A *group* provides the ability to organize replica sets. + For example, in a sharded cluster, one group can contain :ref:`storage ` instances and another group can contain :ref:`routers ` used to handle CRUD requests. + +You can flexibly configure a cluster's settings on different levels: from global settings applied to all groups to parameters specific for concrete instances. + + +.. _configuration_file: + +Configuration in a file +~~~~~~~~~~~~~~~~~~~~~~~ + +This section provides an overview on how to configure Tarantool in a YAML file. + +.. _configuration_instance_basic: + +Basic instance configuration +**************************** + +The example below shows a sample configuration of a single Tarantool instance: + +.. literalinclude:: /code_snippets/snippets/config/instances.enabled/instance_scope/config.yaml + :language: yaml + :dedent: + +- The ``instances`` section includes only one instance named *instance001*. + The ``iproto.listen`` option sets a port used to listen for incoming requests. +- The ``replicasets`` section contains one replica set named *replicaset001*. +- The ``groups`` section contains one group named *group001*. + + +.. _configuration_scopes: + +Configuration scopes +******************** + +This section shows how to control a scope the specified configuration option is applied to. +Most of the configuration options can be applied to a specific instance, replica set, group, or to all instances globally. + +- *Instance* + + To apply specific configuration options to a concrete instance, + specify such options for this instance only. + In the example below, ``iproto.listen`` is applied to *instance001* only. + + .. literalinclude:: /code_snippets/snippets/config/instances.enabled/instance_scope/config.yaml + :language: yaml + :emphasize-lines: 7-8 + :dedent: + +- *Replica set* + + In this example, ``iproto.listen`` is in effect for all instances in *replicaset001*. + + .. literalinclude:: /code_snippets/snippets/config/instances.enabled/replicaset_scope/config.yaml + :language: yaml + :emphasize-lines: 5-6 + :dedent: + +- *Group* + + In this example, ``iproto.listen`` is in effect for all instances in *group001*. + + .. literalinclude:: /code_snippets/snippets/config/instances.enabled/group_scope/config.yaml + :language: yaml + :emphasize-lines: 3-4 + :dedent: + +- *Global* + + In this example, ``iproto.listen`` is applied to all instances of the cluster. + + .. literalinclude:: /code_snippets/snippets/config/instances.enabled/global_scope/config.yaml + :language: yaml + :emphasize-lines: 1-2 + :dedent: + + +.. NOTE:: + + The :ref:`Configuration reference ` contains information about scopes to which each configuration option can be applied. + + +.. _configuration_replica_set_scopes: + +Configuration scopes: Replica set example +***************************************** + +The example below shows how specific configuration options work in different configuration scopes for a replica set with a manual failover. +You can learn more about configuring replication from :ref:`Replication tutorials `. + +.. literalinclude:: /code_snippets/snippets/replication/instances.enabled/manual_leader/config.yaml + :language: yaml + :end-before: Load sample data + :dedent: + +- ``credentials`` (*global*) + + This section is used to create the *replicator* user and assign it the specified role. + These options are applied globally to all instances. + +- ``iproto`` (*global*, *instance*) + + The ``iproto`` section is specified on both global and instance levels. + The ``iproto.advertise.peer`` option specifies a URI used by an instance to connect to another instance as a replica. + In the example above, the URI includes a user name only. + A host value is taken from ``iproto.listen`` that is set on the instance level. + +- ``replication``: (*global*) + + The ``replication.failover`` global option sets a manual failover for all replica sets. + +- ``leader``: (*replica set*) + + The ``.leader`` option sets a :ref:`master ` instance for *replicaset001*. + + + +.. _configuration_application: + +Loading an application +********************** + +Using Tarantool as an application server, you can run your own Lua applications. +In the ``app`` section, you can load the application and provide a custom application configuration in the ``cfg`` section. + +In the example below, the application is loaded from the ``myapp.lua`` file placed next to the YAML configuration file: + +.. literalinclude:: /code_snippets/snippets/config/instances.enabled/application/config.yaml + :language: yaml + :dedent: + +To get a value of the custom ``greeting`` property in the application code, +use the ``config:get()`` function provided by the :ref:`config ` module. + +.. literalinclude:: /code_snippets/snippets/config/instances.enabled/application/myapp.lua + :language: lua + :dedent: + +As a result of :ref:`starting ` the *instance001*, a log should contain the following line: + +.. code-block:: console + + main/103/interactive/myapp I> Hello from app, instance001! + +The ``app`` section can be placed in any :ref:`configuration scope `. +As an example use case, you can provide different applications for storages and routers in a sharded cluster: + +.. code-block:: yaml + + groups: + storages: + app: + module: storage + # ... + routers: + app: + module: router + # ... + +Learn more about using Tarantool as the application server from :ref:`Developing applications with Tarantool `. + + + +.. _configuration_predefined_variables: + +Predefined variables +******************** + +In a configuration file, you can use the following predefined variables that are replaced with actual values at runtime: + +- ``instance_name`` +- ``replicaset_name`` +- ``group_name`` + +To reference these variables in a configuration file, enclose them in double curly braces with whitespaces. +In the example below, ``{{ instance_name }}`` is replaced with *instance001*. + +.. literalinclude:: /code_snippets/snippets/config/instances.enabled/templating/config.yaml + :language: yaml + :dedent: + +As a result, the :ref:`paths to snapshots and write-ahead logs ` differ for different instances. + + + +.. _configuration_environment_variable: + +Environment variables +~~~~~~~~~~~~~~~~~~~~~ + +For each configuration parameter, Tarantool provides two sets of predefined environment variables: + +* ``TT_``. These variables are used to substitute parameters specified in a configuration file. + This means that these variables have a higher :ref:`priority ` than the options specified in a configuration file. + +* ``TT__DEFAULT``. These variables are used to specify default values for parameters missing in a configuration file. + These variables have a lower :ref:`priority ` than the options specified in a configuration file. + +For example, ``TT_IPROTO_LISTEN`` and ``TT_IPROTO_LISTEN_DEFAULT`` correspond to the ``iproto.listen`` option. +``TT_SNAPSHOT_DIR`` and ``TT_SNAPSHOT_DIR_DEFAULT`` correspond to the ``snapshot.dir`` option. +To see all the supported environment variables, execute the ``tarantool`` command with the ``--help-env-list`` :ref:`option `. + +.. code-block:: console + + $ tarantool --help-env-list + +Below are a few examples that show how to set environment variables of different types, like *string*, *number*, *array*, or *map*: + +* String. In the example below, ``TT_IPROTO_LISTEN`` is used to specify a :ref:`listening host and port ` values: + + .. code-block:: console + + $ export TT_IPROTO_LISTEN='127.0.0.1:3311' + + To specify several listening addresses, separate them by a comma without space: + + .. code-block:: console + + $ export TT_IPROTO_LISTEN='127.0.0.1:3311,127.0.0.1:3312' + +* Number. In this example, ``TT_LOG_LEVEL`` is used to set a logging level to 3 (``CRITICAL``): + + .. code-block:: console + + $ export TT_LOG_LEVEL=3 + +* Array. The examples below show how to set the ``TT_SHARDING_ROLES`` variable that accepts an array value. + Arrays can be passed in two ways: using a *simple* ... + + .. code-block:: console + + $ export TT_SHARDING_ROLES=router,storage + + ... or *JSON* format: + + .. code-block:: console + + $ export TT_SHARDING_ROLES='["router", "storage"]' + + The *simple* format is applicable only to arrays containing scalar values. + +* Map. To assign map values to environment variables, you can also use *simple* or *JSON* formats. + In the example below, ``TT_LOG_MODULES`` sets different logging levels for different modules using a *simple* format: + + .. code-block:: console + + $ export TT_LOG_MODULES=module1=info,module2=error + + In the next example, ``TT_APP_CFG`` is used to specify the value of a custom configuration property for a :ref:`loaded application ` using a *JSON* format: + + .. code-block:: console + + $ export TT_APP_CFG='{"greeting":"Hi"}' + + The *simple* format is applicable only to maps containing scalar values. + + +.. NOTE:: + + There are also special ``TT_INSTANCE_NAME`` and ``TT_CONFIG`` environment variables that can be used to :ref:`start ` the specified Tarantool instance with configuration from the given file. + + + + + + +.. _configuration_etcd_overview: + +Configuration in etcd +~~~~~~~~~~~~~~~~~~~~~ + +.. include:: /concepts/configuration/configuration_etcd.rst + :start-after: ee_note_etcd_start + :end-before: ee_note_etcd_end + +Tarantool enables you to store configuration data in one reliable place using `etcd `_. +To achieve this, you need to: + +1. Provide a local YAML configuration with an etcd endpoint address and key prefix in the ``config`` section: + + .. literalinclude:: /code_snippets/snippets/config/instances.enabled/etcd/config.yaml + :language: yaml + :dedent: + +2. Publish a cluster's configuration to an etcd server. + +Learn more from the following guide: :ref:`Storing configuration in etcd `. + + +.. _configuration_precedence: + +Configuration precedence +~~~~~~~~~~~~~~~~~~~~~~~~ + +Tarantool configuration options are applied from multiple sources with the following precedence, from highest to lowest: + +- `TT_*` :ref:`environment variables `. +- Configuration from a :ref:`local YAML file `. +- :ref:`Centralized configuration ` stored in etcd. +- `TT_*_DEFAULT` :ref:`environment variables `. + +If the same option is defined in two or more locations, the option with the highest precedence is applied. + + + +.. _configuration_options_overview: + +Configuration options overview +------------------------------ + +This section gives an overview of some useful configuration options. +All the available options are documented in the :ref:`Configuration reference `. + +.. _configuration_options_connection: + +Connection settings +~~~~~~~~~~~~~~~~~~~ + +To configure an address used to listen for incoming requests, use the ``iproto.listen`` option. +Below are a few examples on how to do this: + +* Set a listening port to ``3301``: + + .. code-block:: yaml + + iproto: + listen: "3301" + +* Set a listening address to ``127.0.0.1:3301``: + + .. code-block:: yaml + + iproto: + listen: "127.0.0.1:3301" + + +* Configure several listening addresses: + + .. code-block:: yaml + + iproto: + listen: "127.0.0.1:3301,127.0.0.1:3303" + +* Enables :ref:`traffic encryption ` for a connection using corresponding URI parameters: + + .. code-block:: yaml + + iproto: + listen: "127.0.0.1:3301?transport=ssl&ssl_key_file=localhost.key&ssl_cert_file=localhost.crt&ssl_ca_file=ca.crt" + + Note that traffic encryption is supported by the `Enterprise Edition `_ only. + + +* Use a Unix domain socket: + + .. code-block:: yaml + + iproto: + listen: "unix/:./var/run/{{ instance_name }}/tarantool.iproto" + + +.. _configuration_options_access_control: + +Access control +~~~~~~~~~~~~~~ + +The ``credentials`` section allows you to create users and grant them the specified privileges. +In the example below, there are two users: + +* The *replicator* user is used for replication and has a corresponding role. +* The *storage* user has the ``super`` role and can perform any action on Tarantool instances. + +.. literalinclude:: /code_snippets/snippets/sharding/instances.enabled/sharded_cluster/config.yaml + :language: yaml + :start-at: credentials: + :end-at: roles: [super] + :dedent: + +To learn more, see the :ref:`Access control ` section. + + +.. _configuration_options_memory: + +Memory +~~~~~~ + +The ``memtx.memory`` option specifies how much :ref:`memory ` Tarantool allocates to actually store data. + +.. code-block:: yaml + + memtx: + memory: 100000000 + +When the limit is reached, ``INSERT`` or ``UPDATE`` requests fail with :ref:`ER_MEMORY_ISSUE `. + + +.. _configuration_options_directories: + +Snapshots and write-ahead logs +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``snapshot.dir`` and ``wal.dir`` options can be used to configure directories for storing snapshots and write-ahead logs. +For example, you can place snapshots and write-ahead logs on different hard drives for better reliability. + +.. code-block:: yaml + + instance001: + snapshot: + dir: '/media/drive1/snapshots' + wal: + dir: '/media/drive2/wals' + +To learn more about the persistence mechanism in Tarantool, see the :ref:`Persistence ` section. + + + + +.. toctree:: + :hidden: + + configuration/configuration_etcd + configuration/configuration_code + configuration/configuration_migrating diff --git a/doc/concepts/configuration/configuration_code.rst b/doc/concepts/configuration/configuration_code.rst new file mode 100644 index 0000000000..09263fea9f --- /dev/null +++ b/doc/concepts/configuration/configuration_code.rst @@ -0,0 +1,340 @@ +.. _configuration_code: + +Configuration in code +===================== + +.. box_cfg_legacy_note_start + +.. NOTE:: + + Starting with the 3.0 version, the recommended way of configuring Tarantool is using a :ref:`configuration file `. + Configuring Tarantool in code is considered a legacy approach. + +.. box_cfg_legacy_note_end + +This topic covers the specifics of configuring Tarantool in code using the ``box.cfg`` API. +In this case, a configuration is stored in an :ref:`initialization file ` - a Lua script with the specified configuration options. +You can find all the available options in the :ref:`Configuration reference `. + + +.. _index-init_label: + +Initialization file +------------------- + +If the command to :ref:`start Tarantool ` includes an instance file, then +Tarantool begins by invoking the Lua program in the file, which may have the name ``init.lua``. +The Lua program may get further arguments +from the command line or may use operating-system functions, such as ``getenv()``. +The Lua program almost always begins by invoking ``box.cfg()``, if the database +server will be used or if ports need to be opened. For example, suppose +``init.lua`` contains the lines + +.. _index-init-example: + +.. code-block:: lua + + #!/usr/bin/env tarantool + box.cfg{ + listen = os.getenv("LISTEN_URI"), + memtx_memory = 33554432, + pid_file = "tarantool.pid", + wal_max_size = 2500 + } + print('Starting ', arg[1]) + +and suppose the environment variable ``LISTEN_URI`` contains 3301, +and suppose the command line is ``tarantool init.lua ARG``. +Then the screen might look like this: + +.. code-block:: console + + $ export LISTEN_URI=3301 + $ tarantool init.lua ARG + ... main/101/init.lua C> Tarantool 2.8.3-0-g01023dbc2 + ... main/101/init.lua C> log level 5 + ... main/101/init.lua I> mapping 33554432 bytes for memtx tuple arena... + ... main/101/init.lua I> recovery start + ... main/101/init.lua I> recovering from './00000000000000000000.snap' + ... main/101/init.lua I> set 'listen' configuration option to "3301" + ... main/102/leave_local_hot_standby I> ready to accept requests + Starting ARG + ... main C> entering the event loop + +If you wish to start an interactive session on the same terminal after +initialization is complete, you can pass the ``-i`` :ref:`command-line option `. + + +.. _box-cfg-params-env: + +Environment variables +--------------------- + +Starting from version :doc:`2.8.1 `, you can specify configuration parameters via special environment variables. +The name of a variable should have the following pattern: ``TT_``, +where ```` is the uppercase name of the corresponding :ref:`box.cfg parameter `. + +For example: + +* ``TT_LISTEN`` -- corresponds to the :ref:`box.cfg.listen ` option. +* ``TT_MEMTX_DIR`` -- corresponds to the :ref:`box.cfg.memtx_dir ` option. + +In case of an array value, separate the array elements by a comma without space: + +.. code-block:: console + + export TT_REPLICATION="localhost:3301,localhost:3302" + +If you need to pass :ref:`additional parameters for URI `, use the ``?`` and ``&`` delimiters: + +.. code-block:: console + + export TT_LISTEN="localhost:3301?param1=value1¶m2=value2" + +An empty variable (``TT_LISTEN=``) has the same effect as an unset one, meaning that the corresponding configuration parameter won't be set when calling ``box.cfg{}``. + + + +.. _index-local_hot_standby: +.. _index-replication_port: +.. _index-slab_alloc_arena: +.. _index-replication_source: +.. _index-snap_dir: +.. _index-wal_dir: +.. _index-wal_mode: +.. _index-checkpoint daemon: + +.. _box_cfg_params: + + +Configuration parameters +------------------------ + +Configuration parameters have the form: + +:extsamp:`{**{box.cfg}**}{[{*{key = value}*} [, {*{key = value ...}*}]]}` + +Configuration parameters can be set in a Lua :ref:`initialization file `, +which is specified on the Tarantool command line. + +Most configuration parameters are for allocating resources, opening ports, and +specifying database behavior. All parameters are optional. +Most of the parameters are dynamic, that is, they can be changed at runtime by calling ``box.cfg{}`` a second time. +For example, the command below sets the :ref:`listen port ` to ``3301``. + +.. code-block:: tarantoolsession + + tarantool> box.cfg{ listen = 3301 } + 2023-05-10 13:28:54.667 [31326] main/103/interactive I> tx_binary: stopped + 2023-05-10 13:28:54.667 [31326] main/103/interactive I> tx_binary: bound to [::]:3301 + 2023-05-10 13:28:54.667 [31326] main/103/interactive/box.load_cfg I> set 'listen' configuration option to 3301 + --- + ... + + +To see all the non-null parameters, execute ``box.cfg`` (no parentheses). + +.. code-block:: tarantoolsession + + tarantool> box.cfg + --- + - replication_skip_conflict: false + wal_queue_max_size: 16777216 + feedback_host: https://feedback.tarantool.io + memtx_dir: . + memtx_min_tuple_size: 16 + -- other parameters -- + ... + +To see a particular parameter value, call a corresponding ``box.cfg`` option. +For example, ``box.cfg.listen`` shows the specified :ref:`listen address `. + +.. code-block:: tarantoolsession + + tarantool> box.cfg.listen + --- + - 3301 + ... + + + +.. _index-uri: + +Listen URI +---------- + +Some configuration parameters and some functions depend on a URI (Universal Resource Identifier). +The URI string format is similar to the +`generic syntax for a URI schema `_. +It may contain (in order): + +* user name for login +* password +* host name or host IP address +* port number +* query parameters + +Only a port number is always mandatory. A password is mandatory if a user +name is specified unless the user name is 'guest'. + +Formally, the URI +syntax is ``[host:]port`` or ``[username:password@]host:port``. +If a host is omitted, then "0.0.0.0" or "[::]" is assumed, +meaning respectively any IPv4 address or any IPv6 address +on the local machine. +If ``username:password`` is omitted, then the "guest" user is assumed. Some examples: + +.. container:: table + + .. rst-class:: left-align-column-1 + .. rst-class:: left-align-column-2 + + +-----------------------------+------------------------------+ + | URI fragment | Example | + +=============================+==============================+ + | port | 3301 | + +-----------------------------+------------------------------+ + | host:port | 127.0.0.1:3301 | + +-----------------------------+------------------------------+ + | username:password@host:port | notguest:sesame@mail.ru:3301 | + +-----------------------------+------------------------------+ + +In code, the URI value can be passed as a number (if only a port is specified) or a string: + +.. code-block:: lua + + box.cfg { listen = 3301 } + + box.cfg { listen = "127.0.0.1:3301" } + +In certain circumstances, a Unix domain socket may be used +where a URI is expected, for example, ``unix/:/tmp/unix_domain_socket.sock`` or +simply ``/tmp/unix_domain_socket.sock``. + +The :ref:`uri ` module provides functions that convert URI strings into their +components or turn components into URI strings. + +.. _index-uri-several: + +Specifying several URIs +~~~~~~~~~~~~~~~~~~~~~~~ + +Starting from version 2.10.0, a user can open several listening iproto sockets on a Tarantool instance +and, consequently, can specify several URIs in the configuration parameters +such as :ref:`box.cfg.listen ` and :ref:`box.cfg.replication `. + +URI values can be set in a number of ways: + +* As a string with URI values separated by commas. + + .. code-block:: lua + + box.cfg { listen = "127.0.0.1:3301, /unix.sock, 3302" } + +* As a table that contains URIs in the string format. + + .. code-block:: lua + + box.cfg { listen = {"127.0.0.1:3301", "/unix.sock", "3302"} } + +* As an array of tables with the ``uri`` field. + + .. code-block:: lua + + box.cfg { listen = { + {uri = "127.0.0.1:3301"}, + {uri = "/unix.sock"}, + {uri = 3302} + } + } + +* In a combined way -- an array that contains URIs in both the string and the table formats. + + .. code-block:: lua + + box.cfg { listen = { + "127.0.0.1:3301", + { uri = "/unix.sock" }, + { uri = 3302 } + } + } + +.. _index-uri-several-params: + +Also, starting from version 2.10.0, it is possible to specify additional parameters for URIs. +You can do this in different ways: + +* Using the ``?`` delimiter when URIs are specified in a string format. + + .. code-block:: lua + + box.cfg { listen = "127.0.0.1:3301?p1=value1&p2=value2, /unix.sock?p3=value3" } + +* Using the ``params`` table: a URI is passed in a table with additional parameters in the "params" table. + Parameters in the "params" table overwrite the ones from a URI string ("value2" overwrites "value1" for ``p1`` in the example below). + + .. code-block:: lua + + box.cfg { listen = { + "127.0.0.1:3301?p1=value1", + params = {p1 = "value2", p2 = "value3"} + } + } + +* Using the ``default_params`` table for specifying default parameter values. + + In the example below, two URIs are passed in a table. + The default value for the ``p3`` parameter is defined in the ``default_params`` table + and used if this parameter is not specified in URIs. + Parameters in the ``default_params`` table are applicable to all the URIs passed in a table. + + .. code-block:: lua + + box.cfg { listen = { + "127.0.0.1:3301?p1=value1", + { uri = "/unix.sock", params = { p2 = "value2" } }, + default_params = { p3 = "value3" } + } + } + +The recommended way for specifying URI with additional parameters is the following: + +.. code-block:: lua + + box.cfg { listen = { + {uri = "127.0.0.1:3301", params = {p1 = "value1"}}, + {uri = "/unix.sock", params = {p2 = "value2"}}, + {uri = 3302, params = {p3 = "value3"}} + } + } + +In case of a single URI, the following syntax also works: + +.. code-block:: lua + + box.cfg { listen = { + uri = "127.0.0.1:3301", + params = { p1 = "value1", p2 = "value2" } + } + } + + + +.. _configuration_code_run_instance_tarantool: + +Starting a Tarantool instance +----------------------------- + +Below is the syntax for starting a Tarantool instance configured in a Lua initialization script: + +.. code-block:: console + + $ tarantool LUA_INITIALIZATION_FILE [OPTION ...] + +The ``tarantool`` command also provides a set of :ref:`options ` that might be helpful for development purposes. + +The command below starts a Tarantool instance configured in the ``init.lua`` file: + +.. code-block:: console + + $ tarantool init.lua diff --git a/doc/concepts/configuration/configuration_etcd.rst b/doc/concepts/configuration/configuration_etcd.rst new file mode 100644 index 0000000000..2afc2217ba --- /dev/null +++ b/doc/concepts/configuration/configuration_etcd.rst @@ -0,0 +1,177 @@ +.. _configuration_etcd: + +Storing configuration in etcd +============================= + +.. ee_note_etcd_start + +.. admonition:: Enterprise Edition + :class: fact + + Storing configuration in etcd is supported by the `Enterprise Edition `_ only. + +.. ee_note_etcd_end + +Tarantool enables you to store configuration data in one place using `etcd `_. +To achieve this, you need to define how to access etcd and publish a cluster's :ref:`YAML configuration ` to an etcd server. + + +.. _etcd_local_configuration: + +Local etcd configuration +------------------------ + +To store a cluster's configuration in etcd, you need to provide etcd connection settings in a local configuration file. +These settings are used to :ref:`publish ` a cluster's configuration and :ref:`show ` it. + +Connection options for etcd should be specified in the ``config.etcd`` section of the configuration file. +At least, the following options should be specified: + +.. literalinclude:: /code_snippets/snippets/config/instances.enabled/etcd/config.yaml + :language: yaml + :dedent: + +- :ref:`config.etcd.endpoints ` specifies the list of etcd endpoints. +- :ref:`config.etcd.prefix ` sets a key prefix used to search a configuration. Tarantool searches keys by the following path: ``/config/*``. Note that ```` should start with a slash (``/``). + +You can also provide additional etcd connection options. +In the example below, the following options are configured in addition to an endpoint and key prefix: + +.. literalinclude:: /code_snippets/snippets/config/instances.enabled/etcd_full/config.yaml + :language: yaml + :dedent: + +- :ref:`config.etcd.username ` and :ref:`config.etcd.password ` specify credentials used for authentication. +- :ref:`config.etcd.ssl.ca_file ` specifies a path to a trusted certificate authorities (CA) file. +- :ref:`config.etcd.http.request.timeout ` configures a request timeout for an etcd server. + +You can find all the available configuration options in the :ref:`etcd ` section. + + + +.. _etcd_publishing_configuration: + +Publishing a cluster's configuration to etcd +-------------------------------------------- + +.. _etcd_publishing_configuration_tt: + +Publishing configuration using the tt utility +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The tt utility provides the :ref:`tt cluster ` command for managing a cluster's configuration. +The ``tt cluster publish`` command can be used to publish a cluster's configuration to etcd. + +The example below shows how a :ref:`layout ` of the application called ``app`` might look: + +.. code-block:: none + + ├── tt.yaml + └── instances.enabled + └── app + ├── config.yaml + ├── cluster.yaml + └── instances.yml + +* ``config.yaml`` contains a :ref:`local configuration ` used to connect to etcd. +* ``cluster.yaml`` contains a cluster's configuration to be published. +* ``instances.yml`` specifies :ref:`instances ` to run in the current environment. ``tt cluster publish`` ignores the configured instances. + +To publish a cluster's configuration (``cluster.yaml``) to an etcd server, execute ``tt cluster publish`` as follows: + +.. code-block:: console + + $ tt cluster publish "http://localhost:2379/example" instances.enabled/app/cluster.yaml + +.. NOTE:: + + You can see a cluster's configuration using the :ref:`tt cluster show ` command. + + +.. _etcd_publishing_configuration_etcdctl: + +Publishing configuration using etcdctl +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To publish a cluster's configuration using the ``etcdctl`` utility, use the ``put`` command: + +.. code-block:: console + + $ etcdctl put /example/config/all < cluster.yaml + +.. NOTE:: + + For etcd versions earlier than 3.4, you need to set the ``ETCDCTL_API`` environment variable to ``3``. + + + + +.. _etcd_starting_instances: + +Starting Tarantool instances +---------------------------- + +The :ref:`tt ` utility is the recommended way to start Tarantool instances. +You can learn how to do this from the :ref:`Starting and stopping instances ` section. + +You can also use the ``tarantool`` command to :ref:`start a Tarantool instance `. +In this case, you can eliminate creating a :ref:`local etcd configuration ` and provide etcd connection settings using the ``TT_CONFIG_ETCD_ENDPOINTS`` and ``TT_CONFIG_ETCD_PREFIX`` :ref:`environment variables `. + +.. code-block:: console + + $ export TT_CONFIG_ETCD_ENDPOINTS=http://localhost:2379 + $ export TT_CONFIG_ETCD_PREFIX=/example + + $ tarantool --name instance001 + $ tarantool --name instance002 + $ tarantool --name instance003 + + + + +.. _etcd_reloading_configuration: + +Reloading configuration +----------------------- + +By default, Tarantool watches etcd keys with the :ref:`specified prefix ` for changes in a cluster's configuration and reloads a changed configuration automatically. +If necessary, you can set the :ref:`config.reload ` option to ``manual`` to turn off configuration reloading: + +.. code-block:: yaml + + config: + reload: 'manual' + etcd: + # ... + +In this case, you can reload a configuration in an :ref:`admin console ` or :ref:`application code ` using the ``reload()`` function provided by the :ref:`config ` module: + +.. code-block:: lua + + require('config'):reload() + + + + + + + + + +.. + Generating certificates for testing: + 1) openssl genrsa -out ca.key 2048 + 2) openssl req -new -x509 -days 365 -key ca.key -subj "/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=Acme Root CA" -out ca.cr + 3) openssl req -newkey rsa:2048 -nodes -keyout server.key -subj "/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=localhost" -out server.csr + 4) openssl x509 -req -extfile <(printf "subjectAltName=DNS:localhost,IP:127.0.0.1") -days 365 -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt + 5) sudo cp server.crt /etc/ssl/certs + 6) sudo cp server.key /etc/ssl/private + + Starting etcd: + etcd --cert-file=ssl/server.crt --key-file=ssl/server.key --advertise-client-urls=https://localhost:2379 --listen-client-urls=https://localhost:2379 + + Get keys: + etcdctl get /tt/config/all --cert=ssl/server.crt --key=ssl/server.key + + Test using curl: + curl --cacert ssl/ca.crt https://localhost:2379/v2/keys/foo -XPUT -d value=bar -v \ No newline at end of file diff --git a/doc/concepts/configuration/configuration_migrating.rst b/doc/concepts/configuration/configuration_migrating.rst new file mode 100644 index 0000000000..c557d741ae --- /dev/null +++ b/doc/concepts/configuration/configuration_migrating.rst @@ -0,0 +1,9 @@ +.. _configuration_migrating_declarative: + +Migrating to declarative configuration +====================================== + +.. TODO + https://github.com/tarantool/doc/issues/3661 + 1) Configuration applying idempotence: how the config's 'target state' approach differs from the 'state changes' box.cfg() approach. + 2) How non-dynamic box.cfg() options are applied (no error, wait for restart). diff --git a/doc/concepts/data_model/schema_desc.rst b/doc/concepts/data_model/schema_desc.rst index cecf2566f6..21e9aefa03 100644 --- a/doc/concepts/data_model/schema_desc.rst +++ b/doc/concepts/data_model/schema_desc.rst @@ -86,14 +86,7 @@ The schema would look something like this: This alternative is simpler to use, and you do not have to dive deep into Lua. -``DDL`` is a built-in -:doc:`Cartridge ` module. -Cartridge is a cluster solution for Tarantool. In its WebUI, there is a separate tab -called "Code". On this tab, in the ``schema.yml`` file, you can define the schema, check its correctness, -and apply it to the whole cluster. - -If you do not use Cartridge, you can still use the DDL module: -put the following Lua code into the file that you use to run Tarantool. +To use the DDL module, put the following Lua code into the file that you use to run Tarantool. This file is usually called ``init.lua``. .. code:: lua diff --git a/doc/concepts/index.rst b/doc/concepts/index.rst index 60b72ec810..46bcfe065a 100644 --- a/doc/concepts/index.rst +++ b/doc/concepts/index.rst @@ -53,9 +53,6 @@ Application server Using Tarantool as an application server, you can write applications in Lua, C, or C++. You can also create reusable :ref:`modules `. -A convenient way to serve a clustered application on Tarantool is using :ref:`Tarantool Cartridge ` -- -a framework for developing, deploying, and managing applications. - To increase the speed of code execution, Tarantool has a Lua Just-In-Time compiler (LuaJIT) on board. LuaJIT compiles hot paths in the code -- paths that are used many times -- thus making the application work faster. @@ -114,11 +111,11 @@ For details, check the :ref:`Storage engines ` section. .. toctree:: :hidden: + configuration data_model/index coop_multitasking atomic modules - Tarantool Cartridge sharding/index replication/index triggers diff --git a/doc/concepts/modules.rst b/doc/concepts/modules.rst index ccd7cdcc2d..6fbc3b847e 100644 --- a/doc/concepts/modules.rst +++ b/doc/concepts/modules.rst @@ -3,9 +3,8 @@ Modules ======= -Any logic that is used in Tarantool can be packaged as an application -(like a :ref:`Cartridge application `) or a reusable **module**. -A module is an optional library that enhances Tarantool functionality. +Any logic that is used in Tarantool can be packaged as an application or a reusable **module**. +A module is an optional library that extends Tarantool functionality. It can be used by Tarantool applications or other modules. Modules allow for easier code management and hot code reload without restarting the Tarantool instance. Like applications, modules in Tarantool can be written in Lua, diff --git a/doc/concepts/replication/index.rst b/doc/concepts/replication/index.rst index 17194039f2..5d0e33f501 100644 --- a/doc/concepts/replication/index.rst +++ b/doc/concepts/replication/index.rst @@ -10,7 +10,7 @@ Replication allows multiple Tarantool instances to work on copies of the same databases. The databases are kept in sync because each instance can communicate its changes to all the other instances. -This chapter includes the following sections: +This section includes the following topics: .. toctree:: :maxdepth: 2 @@ -20,9 +20,5 @@ This chapter includes the following sections: repl_sync repl_leader_elect -For practical guides to replication, see the :ref:`How-to section `. -You can learn about :ref:`bootstrapping a replica set `, -:ref:`adding instances ` to the replica set -or :ref:`removing them `, -:ref:`using synchronous replication ` -and :ref:`managing leader elections `. +For practical guides to replication, see :ref:`Replication tutorials `. +You can learn about bootstrapping a replica set, adding instances to the replica set, or removing them. diff --git a/doc/concepts/replication/repl_architecture.rst b/doc/concepts/replication/repl_architecture.rst index ed8850816e..a5c1453167 100644 --- a/doc/concepts/replication/repl_architecture.rst +++ b/doc/concepts/replication/repl_architecture.rst @@ -47,7 +47,7 @@ The following are specifics of adding different types of information to the WAL: * Data change operations on **replication-local** spaces (:doc:`created ` with ``is_local = true``) are written to the WAL but are not replicated. -To learn how to enable replication, check the :ref:`Bootstrapping a replica set ` guide. +To learn how to enable replication, check the :ref:`Bootstrapping a replica set ` guide. .. _replication_stages: diff --git a/doc/concepts/replication/repl_leader_elect.rst b/doc/concepts/replication/repl_leader_elect.rst index 1031cd55b3..b6bc31d08c 100644 --- a/doc/concepts/replication/repl_leader_elect.rst +++ b/doc/concepts/replication/repl_leader_elect.rst @@ -11,7 +11,7 @@ on the base of Tarantool and decreases dependency on external tools for replica set management. To learn how to configure and monitor automated leader elections, -check the :ref:`how-to guide `. +check :ref:`Managing leader elections `. The following topics are described below: @@ -44,9 +44,9 @@ Leader election is described below. The system behavior can be specified exactly according to the Raft algorithm. To do this: * Ensure that the user has only synchronous spaces. - * Set the :ref:`replication_synchro_quorum ` option to ``N / 2 + 1``. - * Set the :ref:`replication_synchro_timeout ` option to infinity. - * In the :ref:`election_fencing_mode ` option, select either the ``soft`` mode (the default) + * Set the :ref:`replication.synchro_quorum ` option to ``N / 2 + 1``. + * Set the :ref:`replication.synchro_timeout ` option to infinity. + * In the :ref:`replication.election_fencing_mode ` option, select either the ``soft`` mode (the default) or the ``strict`` mode, which is more restrictive. .. _repl_leader_elect_process: @@ -71,11 +71,11 @@ for itself and sends vote requests to other nodes. Upon receiving vote requests, a node votes for the first of them, and then cannot do anything in the same term but wait for a leader to be elected. -The node that collected a quorum of votes defined by the :ref:`replication_synchro_quorum ` parameter +The node that collected a quorum of votes defined by the :ref:`replication.synchro_quorum ` parameter becomes the leader and notifies other nodes about that. Also, a split vote can happen when no nodes received a quorum of votes. In this case, -after a :ref:`random timeout `, +after a random timeout, each node increases its term and starts a new election round if no new vote request with a greater term arrives during this time. Eventually, a leader is elected. @@ -87,7 +87,7 @@ All the non-leader nodes are called *followers*. The nodes that start a new election round are called *candidates*. The elected leader sends heartbeats to the non-leader nodes to let them know it is alive. -In case there are no heartbeats for the period of :ref:`replication_timeout ` * 4, +In case there are no heartbeats for the period of :ref:`replication.timeout ` * 4, a non-leader node starts a new election if the following conditions are met: * The node has a quorum of connections to other cluster members. @@ -96,7 +96,7 @@ a non-leader node starts a new election if the following conditions are met: .. note:: A cluster member considers the leader node to be alive if the member received heartbeats from the leader at least - once during the ``replication_timeout * 4``, + once during the ``replication.timeout * 4``, and there are no replication errors (the connection is not broken due to timeout or due to an error). Terms and votes are persisted by each instance to preserve certain Raft guarantees. @@ -105,7 +105,7 @@ During the election, the nodes prefer to vote for those ones that have the newest data. So as if an old leader managed to send something before its death to a quorum of replicas, that data wouldn't be lost. -When :ref:`election is enabled `, there must be connections +When election is enabled, there must be connections between each node pair so as it would be the full mesh topology. This is needed because election messages for voting and other internal things need a direct connection between the nodes. @@ -117,26 +117,26 @@ Once the leader is elected, it considers itself in the leader position until rec This can lead to a split situation if the other nodes elect a new leader upon losing the connectivity to the previous one. The issue is resolved in Tarantool version :doc:`2.10.0 ` by introducing the leader *fencing* mode. -The mode can be switched by the :ref:`election_fencing_mode ` configuration parameter. +The mode can be switched by the :ref:`replication.election_fencing_mode ` configuration parameter. When the fencing is set to ``soft`` or ``strict``, the leader resigns its leadership if it has less than -:ref:`replication_synchro_quorum ` of alive connections to the cluster nodes. +:ref:`replication.synchro_quorum ` of alive connections to the cluster nodes. The resigning leader receives the status of a follower in the current election term and becomes read-only. -Leader *fencing* can be turned off by setting the :ref:`election_fencing_mode ` configuration parameter to ``off``. +Leader *fencing* can be turned off by setting the :ref:`replication.election_fencing_mode ` configuration parameter to ``off``. In ``soft`` mode, a connection is considered dead if there are no responses for -:ref:`4*replication_timeout ` seconds both on the current leader and the followers. +:ref:`4 * replication.timeout ` seconds both on the current leader and the followers. In ``strict`` mode, a connection is considered dead if there are no responses -for :ref:`2*replication_timeout ` seconds on the current leader and for -:ref:`4*replication_timeout ` seconds on the followers. +for :ref:`2 * replication.timeout ` seconds on the current leader and for +:ref:`4 * replication.timeout ` seconds on the followers. This improves chances that there is only one leader at any time. -Fencing applies to the instances that have the :ref:`election_mode ` set to "candidate" or "manual". +Fencing applies to the instances that have the :ref:`replication.election_mode ` set to "candidate" or "manual". .. _repl_leader_elect_splitbrain: There can still be a situation when a replica set has two leaders working independently (so-called *split-brain*). -It can happen, for example, if a user mistakenly lowered the :ref:`replication_synchro_quorum ` below ``N / 2 + 1``. +It can happen, for example, if a user mistakenly lowered the :ref:`replication.synchro_quorum ` below ``N / 2 + 1``. In this situation, to preserve the data integrity, if an instance detects the split-brain anomaly in the incoming replication data, it breaks the connection with the instance sending the data and writes the ``ER_SPLIT_BRAIN`` error in the log. @@ -155,3 +155,99 @@ to the other nodes. Term numbers also work as a kind of filter. For example, if election is enabled on two nodes and ``node1`` has the term number less than ``node2``, then ``node2`` doesn't accept any transactions from ``node1``. + + +.. _how-to-repl_leader_elect: + +Managing leader elections +------------------------- + +.. _repl_leader_elect_config: + +Configuration +~~~~~~~~~~~~~ + +.. code-block:: yaml + + replication: + election_mode: + election_fencing_mode: + election_timeout: + timeout: + synchro_quorum: + + +* :ref:`replication.election_mode ` -- specifies the role of a node in the leader election + process. +* :ref:`replication.election_fencing_mode ` -- specifies the :ref:`leader fencing mode `. +* :ref:`replication.election_timeout ` -- specifies the timeout between election rounds if the + previous round ended up with a split vote. +* :ref:`replication.timeout ` -- a time interval (in seconds) used by a master to send heartbeat requests to a replica when there are no updates to send to this replica. +* :ref:`replication.synchro_quorum ` -- a number of replicas that should confirm the receipt of a :ref:`synchronous ` transaction before it can finish its commit. + +It is important to know that being a leader is not the only requirement for a node to be writable. +The leader should also satisfy the following requirements: + +* The :ref:`database.mode ` option is set to ``rw``. + +* The leader shouldn't be in the orphan state. + +Nothing prevents you from setting the ``database.mode`` option to ``ro``, +but the leader won't be writable then. The option doesn't affect the +election process itself, so a read-only instance can still vote and become +a leader. + +.. _repl_leader_elect_monitoring: + +Monitoring +~~~~~~~~~~ + +To monitor the current state of a node regarding the leader election, use the :doc:`box.info.election ` function. + +**Example:** + +.. code-block:: console + + tarantool> box.info.election + --- + - state: follower + vote: 0 + leader: 0 + term: 1 + ... + +The Raft-based election implementation logs all its actions +with the ``RAFT:`` prefix. The actions are new Raft message handling, +node state changing, voting, and term bumping. + +.. _repl_leader_elect_important: + +Important notes +~~~~~~~~~~~~~~~ + +Leader election doesn't work correctly if the election quorum is set to less or equal +than `` / 2``. In that case, a split vote can lead to +a state when two leaders are elected at once. + +For example, suppose there are five nodes. When the quorum is set to ``2``, ``node1`` +and ``node2`` can both vote for ``node1``. ``node3`` and ``node4`` can both vote +for ``node5``. In this case, ``node1`` and ``node5`` both win the election. +When the quorum is set to the cluster majority, that is +``( / 2) + 1`` or greater, the split vote is impossible. + +That should be considered when adding new nodes. +If the majority value is changing, it's better to update the quorum on all the existing nodes +before adding a new one. + +Also, the automated leader election doesn't bring many benefits in terms of data +safety when used *without* :ref:`synchronous replication `. +If the replication is asynchronous and a new leader gets elected, +the old leader is still active and considers itself the leader. +In such case, nothing stops +it from accepting requests from clients and making transactions. +Non-synchronous transactions are successfully committed because +they are not checked against the quorum of replicas. +Synchronous transactions fail because they are not able +to collect the quorum -- most of the replicas reject +these old leader's transactions since it is not a leader anymore. + diff --git a/doc/concepts/replication/repl_sync.rst b/doc/concepts/replication/repl_sync.rst index 40b21ff4b0..21a70d414e 100644 --- a/doc/concepts/replication/repl_sync.rst +++ b/doc/concepts/replication/repl_sync.rst @@ -15,8 +15,7 @@ to a replica, from the client's point of view the transaction will disappear. are not considered committed and are not responded to a client until they are replicated onto some number of replicas. -To learn how to enable and use synchronous replication, -check the :ref:`guide `. +To enable synchronous replication, use the :ref:`space_opts.is_sync ` option when creating or altering a space. Synchronous and asynchronous transactions ----------------------------------------- diff --git a/doc/contributing/contributing.rst b/doc/contributing/contributing.rst index 5c9dd555d7..76840ff1df 100644 --- a/doc/contributing/contributing.rst +++ b/doc/contributing/contributing.rst @@ -132,8 +132,8 @@ There are several ways to improve the documentation: see how it works. This can be done automatically in Docker. To learn more, check the `README of the tarantool/doc repository `_. -Some projects, like `Tarantool Cartridge `_, -have their documentation in the code repository. +Some Tarantool projects have their documentation in the code repository. +This is typical for modules, for example, `metrics `_. This is done on purpose, so the developers themselves can update it faster. You can find instructions for building such documentation in the code repository. @@ -161,8 +161,6 @@ Here are some of our official modules: the persistent message queue. * `metrics `_: Ready-to-use solution for collecting metrics. -* `cartridge `_: Framework for writing - distributed applications. Official modules are provided in our organization on GitHub. @@ -311,11 +309,8 @@ help with application deployment, or allow working with Kubernetes. Here are some of the tools created by the Tarantool team: -* `ansible-cartridge `_: - an Ansible role to deploy Cartridge applications. -* `cartridge-cli `_: - a CLI utility for creating applications, launching clusters locally on Cartridge, - and solving operation problems. +* `tt `_: + a CLI utility for creating and managing Tarantool applications. * `tarantool-operator `_: a Kubernetes operator for cluster orchestration. diff --git a/doc/contributing/docs/infra.rst b/doc/contributing/docs/infra.rst index 7276247a1a..0271c6e2a5 100644 --- a/doc/contributing/docs/infra.rst +++ b/doc/contributing/docs/infra.rst @@ -15,9 +15,8 @@ The documentation source files are mainly stored in the `documentation repository `_. However, in some cases, they are stored in the repositories of other Tarantool-related products -or modules -- `Cartridge `_, -`Monitoring `__, -and others. +or modules, such as +`Monitoring `__. If you are working with source files from a product or module repository, add that repository as a submodule to the @@ -103,32 +102,6 @@ The ``${project_root}`` variable is defined earlier in the file as ``project_roo This is because the documentation build has to start from the documentation repository root directory. -cartridge_cli -^^^^^^^^^^^^^ - -The content source file for the ``cartridge_cli`` submodule is -``README.rst``, located in the directory of the submodule repository. -In the final documentation view, the content should appear here: -``https://www.tarantool.io/en/doc/latest/book/cartridge/cartridge_cli/``. - -To make this work: - -* Create a directory at ``./doc/book/cartridge/cartridge_cli``. -* Copy ``./modules/cartridge_cli/README.rst`` to - ``./doc/book/cartridge/cartridge_cli/index.rst``. - -Here ar the corresponding settings in ``build_submodules.sh``: - -.. code-block:: bash - - rst_dest="${project_root}/doc/book/cartridge" - cartridge_cli_root="${project_root}/modules/cartridge-cli" - cartridge_cli_dest="${rst_dest}/cartridge_cli" - cartridge_cli_index_dest="${cartridge_cli_dest}/index.rst" - - mkdir -p "${cartridge_cli_dest}" - yes | cp -rf "${cartridge_cli_root}/README.rst" "${cartridge_cli_index_dest}" - .. _guidelines_doc_submodules_gitignore: 3. Update .gitignore diff --git a/doc/contributing/docs/localization/_includes/glossary-cartridge.csv b/doc/contributing/docs/localization/_includes/glossary-cartridge.csv deleted file mode 100644 index 67502c4740..0000000000 --- a/doc/contributing/docs/localization/_includes/glossary-cartridge.csv +++ /dev/null @@ -1,10 +0,0 @@ -Term [en];Term [ru];Description [en];Description [ru] -;приложение на Tarantool Cartridge;;Если без предлога, то теряется смысл: читается так, как будто Tarantool Cartridge — это название приложения. А это не так. -Tarantool Cartridge application;Tarantool Cartridge — это фреймворк;;" на базе которого можно разработать свое приложение.""" -Cartridge;Cartridge;; -production environment;производственная среда;Production environment is a term used mostly by developers to describe the setting where software and other products are actually put into operation for their intended uses by end users.; -failover;восстановление после сбоев;In computing and related technologies such as networking, failover is switching to a redundant or standby computer server, system, hardware component or network upon the failure or abnormal termination of the previously active application, server, system, hardware component, or network.; -replicaset;набор реплик;; -directory;директория;; -bucket;сегмент;; -check;выберите, выбрать;To select a checkbox; \ No newline at end of file diff --git a/doc/contributing/docs/localization/_includes/glossary.csv b/doc/contributing/docs/localization/_includes/glossary.csv index 5dc02a7245..8cdfb97728 100644 --- a/doc/contributing/docs/localization/_includes/glossary.csv +++ b/doc/contributing/docs/localization/_includes/glossary.csv @@ -1,7 +1,6 @@ Term [en];Term [ru];Description [en];Description [ru] space;спейс;A space is a container for tuples.; -;"https://www.tarantool.io/en/doc/latest/book/box/data_model/#spaces""";;NOUN -tuple;кортеж;A tuple plays the same role as a “row” or a “record”. The number of tuples in a space is unlimited. Tuples in Tarantool are stored as MsgPack arrays. https://www.tarantool.io/en/doc/latest/book/box/data_model/#tuples; +tuple;кортеж;A tuple plays the same role as a “row” or a “record”. The number of tuples in a space is unlimited. Tuples in Tarantool are stored as MsgPack arrays.; Tarantool;Tarantool;НЕ ПЕРЕВОДИТЬ; primary index;первичный индекс;The first index defined on a space is called the primary key index, and it must be unique. All other indexes are called secondary indexes, and they may be non-unique. https://www.tarantool.io/en/doc/latest/book/box/data_model/#indexes; fiber;файбер;A fiber is a set of instructions which are executed with cooperative multitasking. Fibers managed by the fiber module are associated with a user-supplied function called the fiber function. https://www.tarantool.io/en/doc/latest/reference/reference_lua/fiber/#fibers; @@ -16,8 +15,6 @@ implicit casting;неявное приведение типов;; database;база данных;; Release policy;Релизная политика;A set of rules for releasing and naming new distributions of Tarantool: where we add new features and where we don't, how we give them numbers, what versions are suitable to use in production.; field;поле;Fields are distinct data values, contained in a tuple. They play the same role as «row columns» or «record fields» in relational databases.; -;;; -;"https://www.tarantool.io/ru/doc/latest/book/box/data_model/#term-field""";;NOUN leader election;выборы лидера;(in a replica set, by the Raft algorithm); replica set;набор реплик;; heartbeat;контрольный сигнал;; @@ -43,14 +40,18 @@ expression;выражение;; predicate;предикат;(SQL) Predicates, which specify conditions that can be evaluated to SQL three-valued logic (3VL) (true/false/unknown) or Boolean truth values and are used to limit the effects of statements and queries, or to change program flow.; query;запрос;(SQL) Queries retrieve the data based on specific criteria. A query is a statement that returns a result set (possibly empty).; result set;результат запроса;(SQL) An SQL result set is a set of rows from a database, as well as metadata about the query such as the column names, and the types and sizes of each column. A result set is effectively a table.; -resultset;результат запроса;(SQL) An SQL result set is a set of rows from a database, as well as metadata about the query such as the column names, and the types and sizes of each column. A result set is effectively a table.; statement;инструкция;(SQL) A statement is any text that the database engine recognizes as a valid command.;(SQL) Любой текст, который распознаётся движком БД как команда. Инструкция состоит из ключевых слов и выражений языка SQL, которые предписывают Tarantool выполнять какие-либо действия с базой данных. -;"Tarantool: A statement consists of SQL-language keywords and expressions that direct Tarantool to do something with a database. https://www.tarantool.io/en/doc/latest/reference/reference_sql/sql_user_guide/#statements""";; +;;"Tarantool: A statement consists of SQL-language keywords and expressions that direct Tarantool to do something with a database. https://www.tarantool.io/en/doc/latest/reference/reference_sql/sql_user_guide/#statements""";; batch;пакет (инструкций);(SQL) A series of SQL statements sent to the server at once is called a batch.;(SQL) Серия SQL-инструкций (statements), отправляемая на сервер вместе production configuration;конфигурация производственной среды;; -deployment;;Transforming a mechanical, electrical, or computer system from a packaged to an operational state. IT infrastructure deployment typically involves defining the sequence of operations or steps, often referred to as a deployment plan, that must be carried to deliver changes into a target system environment.; +deployment;развертывание;Transforming a mechanical, electrical, or computer system from a packaged to an operational state. IT infrastructure deployment typically involves defining the sequence of operations or steps, often referred to as a deployment plan, that must be carried to deliver changes into a target system environment.; roll back;отменить;;транзакцию deploy to production;;IT infrastructure deployment typically involves defining the sequence of operations or steps, often referred to as a deployment plan, that must be carried to deliver changes into a target system environment. Production environment is a setting where software and other products are actually put into operation for their intended uses by end users; operations;эксплуатация;(DevOps) Information technology operations, or IT operations, are the set of all processes and services that are both provisioned by an IT staff to their internal or external clients and used by themselves, to run themselves as a business. ; to deploy;;Transforming a mechanical, electrical, or computer system from a packaged to an operational state. IT infrastructure deployment typically involves defining the sequence of operations or steps, often referred to as a deployment plan, that must be carried to deliver changes into a target system environment.; -deployment plan;;A sequence of operations or steps that must be carried to deliver changes into a target system environment.; \ No newline at end of file +deployment plan;;A sequence of operations or steps that must be carried to deliver changes into a target system environment.; +production environment;производственная среда;Production environment is a term used mostly by developers to describe the setting where software and other products are actually put into operation for their intended uses by end users.; +failover;восстановление после сбоев;In computing and related technologies such as networking, failover is switching to a redundant or standby computer server, system, hardware component or network upon the failure or abnormal termination of the previously active application, server, system, hardware component, or network.; +directory;директория;; +bucket;сегмент;; +select;выберите, выбрать;To select a checkbox; \ No newline at end of file diff --git a/doc/contributing/docs/localization/glossaries.rst b/doc/contributing/docs/localization/glossaries.rst index 97fb063058..b9917c9747 100644 --- a/doc/contributing/docs/localization/glossaries.rst +++ b/doc/contributing/docs/localization/glossaries.rst @@ -1,18 +1,8 @@ Glossaries ========== -Tarantool Core --------------- - .. csv-table:: :file: _includes/glossary.csv :header-rows: 1 :delim: ; -Cartridge ---------- - -.. csv-table:: - :file: _includes/glossary-cartridge.csv - :header-rows: 1 - :delim: ; diff --git a/doc/contributing/docs/localization/locstate.rst b/doc/contributing/docs/localization/locstate.rst index 80c38d5255..8c38ac3754 100644 --- a/doc/contributing/docs/localization/locstate.rst +++ b/doc/contributing/docs/localization/locstate.rst @@ -15,18 +15,10 @@ State of localization - |doc| - 352 000 - * - Cartridge - - |cartridge| - - 14 000 - * - Tarantool Ansible Role - |tarantool-ansible-role| - 11 000 - * - Cartridge CLI - - |cartridge-cli| - - 6 500 - * - Tarantool Enterprise Edition - |tarantool-enterprise| - 6 000 @@ -58,12 +50,6 @@ State of localization .. |doc| image:: https://badges.crowdin.net/tarantool-docs/localized.svg :target: https://crowdin.com/project/tarantool-docs/ru# -.. |cartridge| image:: https://badges.crowdin.net/tarantool-cartridge-docs/localized.svg - :target: https://crowdin.com/project/tarantool-cartridge-docs/ru# - -.. |cartridge-cli| image:: https://badges.crowdin.net/tarantool-cartridge-cli/localized.svg - :target: https://crowdin.com/project/tarantool-cartridge-cli/ru# - .. |tarantool-enterprise| image:: https://badges.crowdin.net/tarantool-enterprise-docs/localized.svg :target: https://crowdin.com/project/tarantool-enterprise-docs/ru# diff --git a/doc/contributing/docs/sphinx-warnings.rst b/doc/contributing/docs/sphinx-warnings.rst index e7743614d1..51210c2c75 100644 --- a/doc/contributing/docs/sphinx-warnings.rst +++ b/doc/contributing/docs/sphinx-warnings.rst @@ -163,7 +163,7 @@ This may happen when you refer to a wrong path to a document. Check the path. -If the path points to ``cartridge`` or another submodule, check that you've +If the path points to a submodule, check that you've :doc:`built the submodules content ` before building docs. diff --git a/doc/enterprise/admin.rst b/doc/enterprise/admin.rst index 8f9d19b1bf..a5a2578d2f 100644 --- a/doc/enterprise/admin.rst +++ b/doc/enterprise/admin.rst @@ -1,119 +1,6 @@ .. _enterprise-admin: -=============================================================================== Cluster administrator's guide -=============================================================================== +============================= -This guide focuses on Enterprise-specific administration features available -on top of Tarantool Community Edition with Tarantool Cartridge framework: - -* :ref:`space explorer ` -* :ref:`upgrade of environment-independent applications in production ` - -Otherwise, consult the following documentation for: - -* basic information on - :doc:`deploying and managing a Tarantool cluster ` -* more information on - :doc:`managing Tarantool instances ` - -.. _space_explorer: - -------------------------------------------------------------------------------- -Exploring spaces -------------------------------------------------------------------------------- - -The web interface lets you connect (in the browser) to any instance in the cluster -and see what spaces it stores (if any) and their contents. - -To explore spaces: - -#. Open the **Space Explorer** tab in the menu on the left: - - .. image:: images/space_explr_tab.png - :align: center - :scale: 80% - -#. Click **connect** next to an instance that stores data. The basic sanity-check - (``test.py``) of the example application puts sample data to one replica - set (shard), so its master and replica store the data in their spaces: - - .. image:: images/spaces_with_data.png - :align: center - :scale: 80% - - When connected to a instance, the space explorer shows a table with basic - information on its spaces. For more information, see the - :doc:`box.space reference `. - - To see hidden spaces, tick the corresponding checkbox: - - .. image:: images/hidden_spaces.png - :align: center - :scale: 80% - -#. Click the space's name to see its format and contents: - - .. image:: images/space_contents.png - :align: center - :scale: 70% - - To search the data, select an index and, optionally, its iteration type from - the drop-down lists, and enter the index value: - - .. image:: images/space_search.png - :align: center - :scale: 80% - -.. _enterprise-production-upgrade: - -------------------------------------------------------------------------------- -Upgrading in production -------------------------------------------------------------------------------- - -To upgrade either a single instance or a cluster, you need a new version of the -packaged (archived) application. - -A single instance upgrade is simple: - -#. Upload the package (archive) to the server. -#. Stop the current instance. -#. Deploy the new one as described in :ref:`deploying packaged applications ` - (or :ref:`archived ones `). - -.. _enterprise-cluster-upgrade: - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Cluster upgrade -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To upgrade a cluster, choose one of the following scenarios: - -* **Cluster shutdown**. Recommended for backward-incompatible updates, requires - downtime. - -* **Instance by instance**. Recommended for backward-compatible updates, does - not require downtime. - -To upgrade the cluster, do the following: - -#. Schedule a downtime or plan for the instance-by-instance upgrade. - -#. Upload a new application package (archive) to all servers. - -Next, execute the chosen scenario: - -* **Cluster shutdown**: - - #. Stop all instances on all servers. - #. Deploy the new package (archive) on every server. - -* **Instance by instance**. Do the following in every replica set in succession: - - #. Stop a replica on any server. - #. Deploy the new package (archive) in place of the old replica. - #. Promote the new replica to a master (see - :ref:`Switching the replica set's master ` - section in the Tarantool manual). - #. Redeploy the old master and the rest of the instances in the replica set. - #. Be prepared to resolve possible logic conflicts. +.. TODO: rewrite for TCM instead of Cartridge \ No newline at end of file diff --git a/doc/enterprise/audit.rst b/doc/enterprise/audit.rst index 15d26a16da..927d5f7266 100644 --- a/doc/enterprise/audit.rst +++ b/doc/enterprise/audit.rst @@ -43,9 +43,9 @@ is not sufficiently secure. Closed HTTP ports ----------------- -Tarantool accepts HTTP connections on a specific port, configured with -``http_port: `` value -(see :ref:`configuring Cartridge instances `). +.. TODO: update for new EE config + +Tarantool accepts HTTP connections on a specific port. It must be only available on the same host for nginx to connect to it. Check that the configured HTTP port is closed @@ -103,8 +103,6 @@ Authorization in the web UI --------------------------- Using the web interface must require logging in with a username and password. -See more details in the documentation on -:ref:`configuring web interface authorization `. Running under the tarantool user -------------------------------- @@ -128,8 +126,7 @@ This should be checked on each Tarantool instance. The :ref:`snapshot_count ` value determines the number of kept snapshots. Configuration values are primarily set in the configuration files -but :doc:`can be overridden ` -with environment variables and command-line arguments. +but can be overridden with environment variables and command-line arguments. So, it's best to check both the values in the configuration files and the actual values using the console: diff --git a/doc/enterprise/cartridge-auth.rst b/doc/enterprise/cartridge-auth.rst index 3cd3a7b796..858fbd5753 100644 --- a/doc/enterprise/cartridge-auth.rst +++ b/doc/enterprise/cartridge-auth.rst @@ -3,141 +3,4 @@ LDAP authorization ================== -This chapter describes how to manage the access roles for LDAP users authorizing in your Cartridge application. - -Setting up this feature is twofold: - -* :ref:`enabling the feature ` for your application -* :ref:`specifying configuration parameters `. - -.. note:: - - For information on setting up the authorization of external users in your application, refer to :ref:`ldap_auth`. - -.. _enterprise-cartridge-auth-enable: - -Enabling LDAP authorization ---------------------------- - -First, you should enable LDAP authorization function in your :ref:`application development project `: - -* set up dependency to the ``cartridge-auth-extension`` module that is available in the :ref:`Enterprise Edition's package `. -* update the configuration in the application initialization file. - -.. note:: - - If you don't have a development project yet, refer to :doc:`dev` on how to create it. - -1. In your development project, find a ``.rockspec`` file and specify the following dependency: - - .. code-block:: bash - - dependencies = { - 'cartridge-auth-extension' - } - -2. In an initialization Lua file of your project, specify the ``cartridge-auth-extension`` :ref:`cluster role ` in the :ref:`Cartridge configuration `. - The role enables storing authorized users and validating the :ref:`LDAP configuration `. - - .. code-block:: lua - - cartridge.cfg({ - roles = { - 'cartridge-auth-extension', - }, - auth_backend_name = 'cartridge-auth-extension', - }) - -3. Deploy and start your application. For details, refer to :doc:`dev`. - -.. _enterprise-cartridge-auth-config: - -Configuring LDAP authorization ------------------------------- - -After starting your application, you need to configure LDAP authorization. It can be done via the GUI administrative console. - -1. In a web browser, open the GUI administrative console of your application. - -2. If you have the application instances already configured, proceed to the next step. Otherwise, refer to :ref:`cartridge-deployment` on how to configure the cluster. - -3. In the GUI administrative console, navigate to the **Code** tab. Create the following YAML configuration files and specify the necessary parameters. - Below is the example of configuration and the :ref:`description of parameters `. - -.. note:: - - If you set the authorization mode as ``local`` in the ``auth_extension.yml`` file, you don't need to define LDAP configuration parameters in the ``ldap.yml`` file. - - -* ``auth_extension.yml`` - - .. code-block:: yaml - - method: local+ldap - -* ``ldap.yml`` - - .. code-block:: yaml - - - domain: 'test.glauth.com' - organizational_units: ['all_staff'] - hosts: - - localhost:3893 - use_tls: false - use_active_directory: false - search_timeout: 2 - roles: - - role: 'admin' - domain_groups: - - 'cn=superusers,ou=groups,dc=glauth,dc=com' - - 'cn=users,ou=groups,dc=glauth,dc=com' - options: - LDAP_OPT_DEBUG_LEVEL: 10 - -* ``auth.yml`` - - .. code-block:: yaml - - enabled: true - -.. _enterprise-cartridge-auth-config-params: - -**Configuration parameters:** - -* ``method`` -- authorization mode. Possible values: - - * ``local`` -- only local users can be authorized in the application. "Local" refers to users created in the application. - * ``ldap`` -- only LDAP users can be authorized. - * ``local+ldap`` -- both local and LDAP users can be authorized. - -* ``domain`` -- domain name that is used in the domain login ID (``user_name@domain``). - -* ``organizational_units`` -- names of the organizational units or user groups. - -* ``hosts`` -- LDAP server addresses. - -* ``use_tls`` -- boolean flag that defines TLS usage. Defaults to ``false``. - -* ``use_active_directory`` -- boolean flag that defines usage of the Active Directory. Defaults to ``false``. - If set to ``true``, use the login ID in the email format (``user_name@domain``). - The ID should be equal to the ``userPrincipalName`` Active Directory attribute value because the latter is used in the Active Directory filter. - -* ``search_timeout`` -- LDAP server response timeout. Defaults to 2 seconds. - -* ``roles`` -- user roles assigned to a user depending on the LDAP groups the user belongs to: - - * ``role`` -- user role; - * ``domain_groups`` -- LDAP groups where ``cn`` -- common name; ``ou`` -- organization unit name; ``dc`` -- domain component. - -* ``options`` -- the OpenLDAP library options. Supported options: - - * LDAP_OPT_X_TLS_REQUIRE_CERT - * LDAP_OPT_PROTOCOL_VERSION - * LDAP_OPT_DEBUG_LEVEL - * LDAP_OPT_X_TLS_CACERTFILE - * LDAP_OPT_X_TLS_CACERTDIR. - - For description of the options, refer to the `OpenLDAP documentation `__. - -* ``enabled`` -- boolean flag. If set to ``true``, enables mandatory authentication mode in the application web interface. - +.. TODO: rewrite for TCM and rename the file \ No newline at end of file diff --git a/doc/enterprise/dev.rst b/doc/enterprise/dev.rst index b1c5a08220..f16cc41598 100644 --- a/doc/enterprise/dev.rst +++ b/doc/enterprise/dev.rst @@ -1,448 +1,6 @@ .. _enterprise-app-development: -=============================================================================== Developer's guide -=============================================================================== +================= -To develop an application, use the Tarantool Cartridge framework that is -:ref:`installed ` as part of Tarantool Enterprise Edition. - -Here is a summary of the commands you need: - -#. Create a cluster-aware application from the template: - - .. code-block:: bash - - $ tt create cartridge --name -d /path/to - -#. Develop your application: - - .. code-block:: bash - - $ cd /path/to/ - $ ... - -#. Package your application: - - .. code-block:: bash - - $ tt pack [rpm|tgz] /path/to/ - -#. Deploy your application: - - * For ``rpm`` package: - - 1. Upload the package to all servers dedicated to Tarantool. - 2. Install the package: - - .. code-block:: bash - - $ yum install -.rpm - - 3. Launch the application. - - .. code-block:: bash - - $ systemctl start - - * For ``tgz`` archive: - - 1. Upload the archive to all servers dedicated to Tarantool. - 2. Unpack the archive: - - .. code-block:: bash - - $ tar -xzvf -.tar.gz -C /home//apps - - 3. Launch the application - - .. code-block:: bash - - $ tarantool init.lua - -For details and examples, consult the following documentation: - -* a `getting started guide `_ - that walks you through developing and deploying a simple clustered application using - Tarantool Cartridge, -* a :doc:`detailed manual ` - on creating and managing clustered Tarantool applications using - Tarantool Cartridge. - -Further on, this guide focuses on Enterprise-specific developer features available -on top of Tarantool Community Edition with the Tarantool Cartridge framework: - -* :ref:`LDAP authorization in the web interface `, -* :ref:`environment-independent applications `, -* :ref:`sample applications with Enterprise flavors `. - -.. _ldap_auth: - -------------------------------------------------------------------------------- -Implementing LDAP authorization in the web interface -------------------------------------------------------------------------------- - -If you run an LDAP server in your organization, you can connect Tarantool -Enterprise to it and let it handle the authorization. In this case, follow the -:ref:`general recipe ` -where in the first step add the ``ldap`` module to the ``.rockspec`` file -as a dependency and consider implementing the ``check_password`` function -the following way: - -.. code-block:: Lua - :emphasize-lines: 4, 10, 13 - - -- auth.lua - -- Require the LDAP module at the start of the file - local ldap = require('ldap') - ... - -- Add a function to check the credentials - local function check_password(username, password) - - -- Configure the necessary LDAP parameters - local user = string.format("cn=%s,ou=tarantool,dc=glauth,dc=com", username) - - -- Connect to the LDAP server - local ld, err = ldap.open("localhost:3893", user, password) - - -- Return an authentication success or failure - if not ld then - return false - end - return true - end - ... - -.. _enterprise-env-independent-apps: - --------------------------------------------------------------------------------- -Delivering environment-independent applications --------------------------------------------------------------------------------- - -Tarantool Enterprise Edition allows you to build environment-independent applications. - -An environment-independent application is an assembly (in one directory) of: - -* files with Lua code, -* ``tarantool`` executable, -* plugged external modules (if necessary). - -When started by the ``tarantool`` executable, the application provides a -service. - -The modules are Lua rocks installed into a virtual environment (under the -application directory) similar to Python's ``virtualenv`` and Ruby's bundler. - -Such an application has the same structure both in development and -production-ready phases. All the application-related code resides in one place, -ready to be packed and copied over to any server. - -.. _enterprise-app-package: - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Packaging applications -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Once custom cluster role(s) are defined and the application is developed, pack -it and all its dependencies (module binaries) together with the ``tarantool`` -executable. - -This will allow you to upload, install, and run your application on any server in -one go. - -To pack the application, say: - -.. code-block:: console - - $ tt pack [rpm|tgz] /path/to/ - -where specify a path to your development environment -- the Git repository -containing your application code, -- and one of the following build options: - -* ``rpm`` to build an RPM package (recommended), or -* ``tgz`` to build a ``tar + gz`` archive - (choose this option only if you do not have root - privileges on servers dedicated for Tarantool Enterprise). - -This will create a package (or compressed archive) named -``--`` (e.g., ``myapp-1.2.1-12.rpm``) -containing your environment-independent application. - -Next, proceed to deploying :ref:`packaged applications ` -(or :ref:`archived ones `) on your servers. - -.. _enterprise-packaged-app: - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Deploying packaged applications -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To deploy your packaged application, do the following on every server dedicated -for Tarantool Enterprise: - -#. Upload the package created in the :ref:`previous step `. - -#. Install: - - .. code-block:: console - - $ yum install -.rpm - -#. Start one or multiple Tarantool instances with the corresponding services - as described below. - - * A single instance: - - .. code-block:: console - - $ systemctl start - - This will start an instantiated ``systemd`` service that will listen to port - ``3301``. - - * Multiple instances on one or multiple servers: - - .. code-block:: console - - $ systemctl start @instance_1 - $ systemctl start @instance_2 - ... - $ systemctl start @instance_ - - where ``@instance_`` is the instantiated service name - for ``systemd`` with an incremental ```` (unique for every - instance) to be added to the ``3300`` port the instance will listen to - (e.g., ``3301``, ``3302``, etc.). - -#. In case it is a cluster-aware application, proceed to - :ref:`deploying the cluster `. - -To stop all services on a server, use the ``systemctl stop`` command and specify -instance names one by one. For example: - -.. code-block:: console - - $ systemctl stop @instance_1 @instance_2 ... @instance_ - -.. _enterprise-archived-app: - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Deploying archived applications -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -While the RPM package places your application to ``/usr/share/tarantool/`` -on your server by default, the ``tar + gz`` archive does not enforce any structure -apart from just the ``/`` directory, so you are responsible for placing -it appropriately. - -.. NOTE:: - - RPM packages are recommended for deployment. Deploy archives only if - you do not have root privileges. - -To place and deploy the application, do the following on every server dedicated -for Tarantool Enterprise: - -#. Upload the archive, decompress, and extract it to the ``/home//apps`` - directory: - - .. code-block:: console - - $ tar -xzvf -.tar.gz -C /home//apps - -#. Start Tarantool instances with the corresponding services. - - To manage instances and configuration, use tools like ``ansible``, - ``systemd``, and ``supervisord``. - -#. In case it is a cluster-aware application, proceed to - :ref:`deploying the cluster `. - -.. _enterprise-code-upgrade: - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Upgrading code -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -All instances in the cluster are to run the same code. This includes all the -components: custom roles, applications, module binaries, ``tarantool``, and -``tt`` (if necessary) executables. - -Pay attention to possible backward incompatibility that any component may -introduce. This will help you choose a scenario for an -:ref:`upgrade in production `. Keep in mind that -you are responsible for code compatibility and handling conflicts should -inconsistencies occur. - -To upgrade any of the components, prepare a new version of the package (archive): - -#. Update the necessary files in your development environment (directory): - - * Your own source code: custom roles and/or applications. - * Module binaries. - * Executables. Replace them with ones from the new bundle. - -#. Increment the version as described in - :ref:`application versioning `. - -#. Repack the updated files as described in :ref:`packaging applications `. - -#. Choose an upgrade scenario as described in the :ref:`Upgrading in production ` - section. - -.. _enterprise-run-app: - -------------------------------------------------------------------------------- -Running sample applications -------------------------------------------------------------------------------- - -The Enterprise distribution package includes sample applications in the -``examples/`` directory that showcase basic Tarantool functionality. - -.. contents:: Sample applications: - :depth: 1 - :local: - -.. _enterprise-pg-write-through-cache: - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Write-through cache application for PostgreSQL -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The example in ``pg_writethrough_cache/`` shows how Tarantool can cache data -written *through* it to a PostgreSQL database to speed up the reads. - -The sample application requires a deployed PostgreSQL database and the following -rock modules: - -.. code-block:: console - - $ tt rocks install http - $ tt rocks install pg - $ tt rocks install argparse - -Look through the code in the files to get an understanding of what the application -does. - -To run the application for a local PostgreSQL database, say: - -.. code-block:: console - - $ tarantool cachesrv.lua --binary-port 3333 --http-port 8888 --database postgresql://localhost/postgres - -.. _enterprise-ora-write-behind-cache: - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Write-behind cache application for Oracle -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The example in ``ora-writebehind-cache/`` shows how Tarantool can cache writes -and queue them to an Oracle database to speed up both writes and reads. - -.. _enterprise-ora-write-behind-cache_reqs: - -******************************************************************************* -Application requirements -******************************************************************************* - -The sample application requires: - -* deployed Oracle database; -* Oracle tools: `Instant Client and SQL Plus `_, - both of version 12.2; - - .. NOTE:: - - In case the Oracle Instant Client errors out on ``.so`` files - (Oracle's dynamic libraries), put them to some directory and add it to the - ``LD_LIBRARY_PATH`` environment variable. - - For example: ``export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/`` - -* rock modules listed in the ``rockspec`` file. - -To install the modules, run the following command in the ``examples/ora_writebehind_cache`` -directory: - -.. code-block:: console - - $ tt rocks make oracle_rb_cache-0.1.0-1.rockspec - -If you do not have a deployed Oracle instance at hand, run a dummy in a Docker -container: - -#. In the browser, log in to `Oracle container registry `_, - click **Database**, and accept the Oracle's Enterprise Terms and Restrictions. - -#. In the ``ora-writebehind-cache/`` directory, log in to the repository under - the Oracle account, pull, and run an image using the prepared scripts: - - .. code-block:: console - - $ docker login container-registry.oracle.com - Login: - Password: - Login Succeeded - $ docker pull container-registry.oracle.com/database/enterprise:12.2.0.1 - $ docker run -itd \ - -p 1521:1521 \ - -p 5500:5500 \ - --name oracle \ - -v "$(pwd)"/setupdb/configDB.sh:/home/oracle/setup/configDB.sh \ - -v "$(pwd)"/setupdb/runUserScripts.sh:/home/oracle/setup/runUserScripts.sh \ - -v "$(pwd)"/startupdb:/opt/oracle/scripts/startup \ - container-registry.oracle.com/database/enterprise:12.2.0.1 - -When all is set and done, run the example application. - -.. _enterprise-ora-write-behind-cache_run: - -******************************************************************************* -Running write-behind cache -******************************************************************************* - -To launch the application, run the following in the ``examples/ora_writebehind_cache`` -directory: - -.. code-block:: console - - $ tarantool init.lua - -The application supports the following requests: - -* Get: ``GET http://:/account/id``; -* Add: ``POST http://:/account/`` with the following data: - - .. code-block:: console - - {"clng_clng_id":1,"asut_asut_id":2,"creation_data":"01-JAN-19","navi_user":"userName"} - -* Update: ``POST http://:/account/id`` with the same data as in the add request; -* Remove: ``DELETE http://:/account/id`` where ``id`` is an account identifier. - -Look for sample CURL scripts in the ``examples/ora_writebehind_cache/testing`` -directory and check ``README.md`` for more information on implementation. - -.. _enterprise-docker-app: - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Hello-world application in Docker -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The example in the ``docker/`` directory contains a hello-world application -that you can pack in a Docker container and run on CentOS 7. - -The ``hello.lua`` file is the entry point and it is very bare-bones, so you -can add your code here. - -#. To build the container, say: - - .. code-block:: console - - $ docker build -t tarantool-enterprise-docker -f Dockerfile ../.. - -#. To run it: - - .. code-block:: console - - $ docker run --rm -t -i tarantool-enterprise-docker +.. TODO: rewrite completely for new EE application development workflow \ No newline at end of file diff --git a/doc/enterprise/index.rst b/doc/enterprise/index.rst index b301c6cf4e..474c12bfac 100644 --- a/doc/enterprise/index.rst +++ b/doc/enterprise/index.rst @@ -14,11 +14,10 @@ Tarantool Enterprise Edition The Enterprise Edition provides an `extended feature set `__ for developing and managing clustered Tarantool applications, for example: - * :ref:`Static package ` - for standalone Linux systems. - * Tarantool :ref:`bindings to OpenLDAP `. + * Static package for standalone Linux systems. + * Tarantool bindings to OpenLDAP. * Security :ref:`audit log `. - * Enterprise :ref:`database connectivity `: + * Enterprise database connectivity: Oracle and any ODBC-supported DBMS (for example, MySQL, Microsoft SQL Server). * SSL support for :ref:`traffic encryption `. @@ -36,11 +35,10 @@ Tarantool Enterprise Edition Enterprise-версия предлагает `дополнительные возможности `__ по разработке и эксплуатации кластерных приложений, например: - * :ref:`Статическая сборка ` - для автономных Linux-систем. - * :ref:`Модуль интеграции с OpenLDAP `. + * Статическая сборка для автономных Linux-систем. + * Модуль интеграции с OpenLDAP. * :ref:`Журнал аудита безопасности `. - * Подключения к :ref:`корпоративным базам данных `: + * Подключения к корпоративным базам данных: Oracle и любым СУБД с интерфейсом ODBC (MySQL, Microsoft SQL Server и т.д.). (например, MySQL, Microsoft SQL Server). * :ref:`Шифрование трафика ` с помощью SSL. @@ -64,7 +62,6 @@ Tarantool Enterprise Edition flight_recorder audit_log space_upgrade - migration system_metrics deprecated rocksref diff --git a/doc/enterprise/migration.rst b/doc/enterprise/migration.rst deleted file mode 100644 index 71af6ddddf..0000000000 --- a/doc/enterprise/migration.rst +++ /dev/null @@ -1,60 +0,0 @@ -Migration from Tarantool Cartridge -================================== - -If your company uses a service based on Tarantool Community Edition and -Tarantool Cartridge, follow the steps below to update these components to -Tarantool Enterprise Edition. - -As a reference, the instructions below use a template service created with -:ref:`tt`, the Tarantool CLI utility. - -Service build pipeline ----------------------- - -Get access to the source code and build pipeline of your service. Here is an -example of what the service build pipeline might look like for CentOS/RHEL 7: - -.. code-block:: bash - - curl -L https://tarantool.io/release/2/installer.sh | bash - yum -y install tarantool tarantool-devel tt git gcc gcc-с++ cmake - tt pack rpm - - -Update the pipeline -------------------- - -In the installation section of your pipeline, replace open-source ``tarantool`` -packages with Tarantool Enterprise SDK: - -.. code-block:: bash - - curl -L \ - https://${TOKEN}@download.tarantool.io/enterprise/release/${OS}/${ARCH}/${VERSION}/tarantool-enterprise-sdk-${VERSION_OS_ARCH_POSTFIX}.tar.gz \ - > sdk.tar.gz - - # for example, the URL for the Linux build of Tarantool 2.10.4 for the x86_64 platform will be: - # https://${TOKEN}@download.tarantool.io/enterprise/release/linux/x86_64/2.10/tarantool-enterprise-sdk-gc64-2.10.4-0-r523.linux.x86_64.tar.gz - - tar -xvf sdk.tar.gz - source tarantool-enterprise/env.sh - tt pack rpm - -Now the pipeline will produce a new service artifact, which includes -Tarantool Enterprise Edition. - -Update the service ------------------- - -Update your service to the new version like you usually update Tarantool in -your organization. You don't have to interrupt access to the service. -To learn how to do it with ``ansible-cartridge``, -`check this example `__. - - -That's it! ----------- - -You can now use Tarantool Enterprise Edition's features in your installation. -For example, to enable the audit log, -:ref:`set up the audit_log parameter in your node configuration `. diff --git a/doc/enterprise/rocksref.rst b/doc/enterprise/rocksref.rst index e85f1f79f8..0efc91a046 100644 --- a/doc/enterprise/rocksref.rst +++ b/doc/enterprise/rocksref.rst @@ -14,27 +14,6 @@ Open source modules * `avro-schema `_ is an assembly of `Apache Avro `_ schema tools; -* :doc:`cartridge ` - is a high-level cluster management interface that contains - several modules: - - * ``rpc`` implements remote procedure calls between cluster instances and - allows roles running on some instances to interact with other roles on - other instances. - * ``service-registry`` implements inter-role interaction and allows different - roles to interact with each other in the scope of one instance. - * ``confapplier`` implements cluster-wide configuration validation and - application via a two-phase commit. - * ``auth`` manages authentication. - * ``pool`` reuses Tarantool's ``net.box`` connections. - * ``admin`` implements administration functions. - -* :doc:`cartridge-cli ` - is the command-line interface for the ``cartridge`` module. - - .. important:: - - ``cartridge-cli`` is deprecated in favor of the :ref:`tt CLI utility `. * :ref:`checks ` is a type checker of functional arguments. This library that declares @@ -85,8 +64,6 @@ Closed source modules same high-level language (Lua) and with minimal delay. * :doc:`task ` is a module for managing background tasks in a Tarantool cluster. -* :doc:`space-explorer ` - is a module for exploring Tarantool spaces in ``cartridge``. .. _enterprise-rocks-install: diff --git a/doc/enterprise/setup.rst b/doc/enterprise/setup.rst index 551e4d5c34..e31dbae202 100644 --- a/doc/enterprise/setup.rst +++ b/doc/enterprise/setup.rst @@ -88,9 +88,7 @@ the administration server should be able to access the following TCP ports on Tarantool servers: * 22 to use the SSH protocol, -* ports specified in - :ref:`instance configuration ` - (``http_port`` parameter) to monitor the HTTP-metrics. +* ports specified in instance configuration to monitor the HTTP-metrics. Additionally, it is recommended to apply the following settings for ``sysctl`` on all Tarantool servers: @@ -122,14 +120,19 @@ at Tarantool website. Please contact ``support@tarantool.io`` for access. Each package is distributed as a ``tar + gzip`` archive and includes the following components and features: -* static Tarantool binary for simplified deployment in Linux environments, -* selection of open and closed source modules, -* sample application walking you through all included modules. +* Static Tarantool binary for simplified deployment in Linux environments. +* ``tt`` command-line utility that provides a unified command-line interface for + managing Tarantool-based applications. See :ref:`tt-cli` for details. +* |tcm_full_name| -- a web-based interface for managing Tarantool EE clusters. + See :ref:`tcm` for details. +* Selection of open and closed source modules. +* Sample application walking you through all included modules Archive contents: * ``tarantool`` is the main executable of Tarantool. -* ``tt`` is the utility that provides a unified command-line interface for managing Tarantool-based applications. +* ``tt`` command-line utility. +* ``tcm`` is the |tcm_full_name| executable. * ``tarantoolctl`` is the utility script for installing supplementary modules and connecting to the administrative console. @@ -137,13 +140,6 @@ Archive contents: ``tarantoolctl`` is deprecated in favor of the :ref:`tt CLI utility `. -* ``cartridge`` is the utility script to help you set up a development - environment for applications and pack them for easy deployment. - - .. important:: - - ``cartridge`` utility is deprecated in favor of the :ref:`tt CLI utility `. - * ``examples/`` is the directory containing sample applications: * ``pg_writethrough_cache/`` is an application showcasing how Tarantool can diff --git a/doc/getting_started/change_schema_dynamically.rst b/doc/getting_started/change_schema_dynamically.rst deleted file mode 100644 index 3577cf0349..0000000000 --- a/doc/getting_started/change_schema_dynamically.rst +++ /dev/null @@ -1,29 +0,0 @@ -.. _getting_started-schema_changing: - -================================================================================= -Updating the data schema -================================================================================= - -When working with data, it is sometimes necessary to change the original data schema. - -In the previous sections, we described a cluster-wide data schema in the YAML format. -The ``ddl`` module is responsible for applying the schema on the cluster. This module does not allow -to modify the schema after applying it. - -The easiest way to change it is to delete the database snapshots and create -a schema from scratch. Of course, this is only acceptable during application -development and debugging. -For production scenarios, read the section on :ref:`migrations `. - -To remove snapshots: - -* If you are using Tarantool in the cloud, - click the "Reset configuration" button. -* If you've started Tarantool locally via ``cartridge start``, - run ``cartridge clean`` in the application directory. -* If you've started Tarantool in a different way, - delete the snapshots and xlogs manually. - These files have the .snap and .xlog extensions respectively, - and they are located in the Tarantool working directory. - -To understand how the Tarantool data schema works, read the :ref:`Data model ` section. diff --git a/doc/getting_started/connecting_to_cluster.rst b/doc/getting_started/connecting_to_cluster.rst deleted file mode 100644 index 06665a5340..0000000000 --- a/doc/getting_started/connecting_to_cluster.rst +++ /dev/null @@ -1,68 +0,0 @@ -.. _connecting_to_cluster: - -================================================================================= -Connecting to the cluster -================================================================================= - -In the last section, we set up a cluster, created a schema, and wrote data through the HTTP API. -Now we can connect to the cluster from code and work with data. - -.. note:: - - If you are using Tarantool without Cartridge, go to the - :ref:`Connecting from your favorite language ` section. - If you are undergoing training, read on. - -You may have noticed that we used the ``crud`` module in the HTTP handler code. -The code looked something like this: - -.. code:: lua - - local crud = require ('crud') - - function add_user(request) - local result, err = crud.insert_object ('users', {user_id = uuid.new (), fullname = fullname}) - end - - -This module allows you to work with data in a cluster. The syntax here is similar to -what the Tarantool ``box`` module offers. -You will learn more about the ``box`` module in the following sections. - -The ``crud`` module contains a set of stored procedures. -To work with them, we must activate special roles on all routers and storages. -We selected those roles in the previous section, so we don't need to do anything. -The roles are named accordingly: "crud-router" and "crud-storage". - -To write and read data in the Tarantool cluster from code, we will call stored -procedures of the ``crud`` module. - -In Python, it looks like this: - -.. code:: python - - res = conn.call('crud.insert', 'users', , 'Jim Carrey') - users = conn.call('crud.select', 'users', {limit: 100}) - -All functions of the ``crud`` module are described -in the `README of our GitHub repository `_. - -Here is an incomplete list: - -* ``insert`` -* ``select`` -* ``get`` -* ``delete`` -* ``min``\/``max`` -* ``replace``\/``upsert`` -* ``truncate`` - -To learn how to call stored procedures in your programming language, see the corresponding section: - -* :ref:`for Python ` -* :ref:`for Go ` -* :ref:`for PHP ` -* :doc:`for C++ ` - -For connectors to other languages, check the README for the connector of your choice -`on GitHub `_. diff --git a/doc/getting_started/getting_started_imcp.rst b/doc/getting_started/getting_started_imcp.rst deleted file mode 100644 index 8c232eb0ac..0000000000 --- a/doc/getting_started/getting_started_imcp.rst +++ /dev/null @@ -1,532 +0,0 @@ -.. _getting_started-imcp: - -First steps -=========== - -This is the recommended guide for getting to know the product. - -.. note:: - - You also might want to check out our - :ref:`basic Tarantool tutorial `. - It shows how to launch one Tarantool instance, - create a space, build an index, and write data. - - We recommend that beginners go through the current tutorial first - and then see the basic tutorial to dive deeper into the product. - -If you just want to run the complete tutorial code quickly, go to -:ref:`Launching an application `. - -Installation -~~~~~~~~~~~~ - -**Launch in the cloud** - -This tutorial is also available in the cloud. It's free, and it's the fastest way to start. -To follow this tutorial in the cloud, go to `try.tarantool.io `__. - -However, you will still need to install Tarantool -if you want to get better acquainted with it. - -**Run locally** - -**For Linux/macOS users:** - -* Install Tarantool from the `Download page `__. -* Install `Node.js `_, which is required for the tutorial frontend. -* Install the ``cartridge-cli`` utility through your package manager: - - .. code-block:: bash - - sudo yum install cartridge-cli - - .. code-block:: bash - - brew install cartridge-cli - - To learn more, check the ``cartridge-cli`` - :doc:`installation guide `. - -* Clone the `Getting Started tutorial repository `__. - - Everything is ready and organized in this repository. - In the cloned directory, run the following: - - .. code-block:: bash - - cartridge build - cartridge start - -.. note:: - - In case of a problem with `cartridge build`, run it with the `--verbose` flag - to learn about the source of the problem. If there is a problem with Node.js (`npm`): - - 1. Check that Node.js is in the `$PATH`. - - 2. Try forcefully removing the `node_modules` directory from the dependencies' directories: - - `rm -rf analytics/node_modules front/node_modules` - - After that, try running `cartridge build` again. - If all else fails, please `file us an issue on GitHub `_. - - -You're all set! At http://localhost:8081, you will see the Tarantool Cartridge UI. - -**Running in Docker:** - -.. code-block:: bash - - docker run -p 3301:3301 -p 8081:8081 tarantool/getting-started - -That's it! At http://localhost:8081, you will see the Tarantool Cartridge UI. - -**For Windows users:** - -Use Docker to get started. - - -Getting to know Tarantool -~~~~~~~~~~~~~~~~~~~~~~~~~ - -Today, we will solve a high-performance challenge for TikTok using -Tarantool. - -You will implement a counter of likes for videos. -First, you will create base tables and search indexes. -Then you will set up an HTTP API for mobile clients. - -The challenge doesn't require you to write any additional code. -Everything will be implemented on the Tarantool platform. - -If you accidentally do something wrong while following the instructions, -there is a magic button to help you reset all changes. -It is called **"Reset Configuration"**. You can find it at the top of the "Cluster" page. - -Configuring a cluster [1 minute] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -**Everything you need to know to get started:** - -A Tarantool cluster has two service roles: router and storage. - -* Storage is used to store data. -* Router is an intermediary between clients and storages. - It accepts a client's request, takes data from the proper storage, - and returns it to the client. - -We see that we have 5 unconfigured instances on the "Cluster" tab. - -.. figure:: images/hosts-list.png - :alt: List of all nodes - - List of all nodes - -Let's create one router and one storage for a start. - -First, click the "Configure" button on the "router" instance and configure -it as in the screenshot below: - -.. figure:: images/router-configuration.png - :alt: Configuring a router - - Configuring a router - -Next, we configure the "s1-master" instance: - -.. figure:: images/storage-configuration.png - :alt: Configuring s1-master - - Configuring s1-master - -It will look something like this: - -.. figure:: images/first-configuration-result.png - :alt: Cluster view after first setup - - Cluster view after first setup - -Let's enable sharding in the cluster using the "Bootstrap vshard" button. It is -located in the top right corner. - -Creating a data schema [2 minutes] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Let's start with the data schema -- take a look at the **Code** tab on the left. - -There you can find a file called ``schema.yml``. In this file, you can -describe the entire cluster's data schema, edit the current schema, -validate its correctness, and apply it to the whole cluster. - -First, let's create the necessary tables. In Tarantool, they are called spaces. - -We need to store: - -* Users -* Videos with descriptions -* Likes for each video - -Copy the schema description from the code block below and paste it in the ``schema.yml`` file on the **Code** tab. -Click the "Apply" button. -After that, the data schema will be described in the cluster. - -This is what our data schema will look like: - - .. code-block:: yaml - - spaces: - users: - engine: memtx - is_local: false - temporary: false - sharding_key: - - "user_id" - format: - - {name: bucket_id, type: unsigned, is_nullable: false} - - {name: user_id, type: uuid, is_nullable: false} - - {name: fullname, type: string, is_nullable: false} - indexes: - - name: user_id - unique: true - parts: [{path: user_id, type: uuid, is_nullable: false}] - type: HASH - - name: bucket_id - unique: false - parts: [{path: bucket_id, type: unsigned, is_nullable: false}] - type: TREE - videos: - engine: memtx - is_local: false - temporary: false - sharding_key: - - "video_id" - format: - - {name: bucket_id, type: unsigned, is_nullable: false} - - {name: video_id, type: uuid, is_nullable: false} - - {name: description, type: string, is_nullable: true} - indexes: - - name: video_id - unique: true - parts: [{path: video_id, type: uuid, is_nullable: false}] - type: HASH - - name: bucket_id - unique: false - parts: [{path: bucket_id, type: unsigned, is_nullable: false}] - type: TREE - - likes: - engine: memtx - is_local: false - temporary: false - sharding_key: - - "video_id" - format: - - {name: bucket_id, type: unsigned, is_nullable: false} - - {name: like_id, type: uuid, is_nullable: false} - - {name: user_id, type: uuid, is_nullable: false} - - {name: video_id, type: uuid, is_nullable: false} - - {name: timestamp, type: string, is_nullable: true} - indexes: - - name: like_id - unique: true - parts: [{path: like_id, type: uuid, is_nullable: false}] - type: HASH - - name: bucket_id - unique: false - parts: [{path: bucket_id, type: unsigned, is_nullable: false}] - type: TREE - -It's simple. Let's take a closer look at the essential points. - -Tarantool has two built-in storage engines: memtx and vinyl. -memtx stores all data in RAM while asynchronously writing to -disk so that nothing gets lost. - -Vinyl is a classic engine for storing data on the -hard drive. It is optimized for write-intensive scenarios. - -In TikTok, there are a lot of simultaneous readings and -posts: users watch videos, like them, and comment on them. -Therefore, let's use memtx. - -The configuration above describes three memtx spaces (tables) -and the necessary indexes for each of the spaces. - -Each space has two indexes: - -* The primary key, which is required to read/write data. -* An index on the bucket_id field, which is a service field used for sharding. - -**Important:** The name ``bucket_id`` is reserved. If you choose -another name, sharding won't work for this space. -If you don't use sharding in your project, you can remove the second index. - -To understand which field to shard data by, Tarantool uses -``sharding_key``. ``sharding_key`` points to fields in the space by -which database records will be sharded. There can be more than one such field, but -in this example, we will only use one. When some data is inserted, -Tarantool forms a hash from this field, calculates the bucket number, -and selects the storage to record the data into. - -Yes, buckets can repeat, and each storage stores a specific range of buckets. - -Here are a couple more interesting facts: - -* The ``parts`` field in the index description can contain several fields, - which allows building a composite index. You won't need it in this tutorial. -* Tarantool does not support foreign keys, so you have to check manually - upon insertion - that ``video_id`` and ``user_id`` exist in the ``likes`` space. - -Writing data [5 minutes] -~~~~~~~~~~~~~~~~~~~~~~~~ - -We will write data to the Tarantool cluster using the CRUD module. -You don't have to specify the shard you want to read from or write to -- the module -does it for you. - -**Important:** All cluster operations must be performed only on the router -and using the CRUD module. - -Let's connect the CRUD module in the code and write three procedures: - -* User creation -* Adding a video -* Liking a video - -The procedures must be described in a special file. To do this, go to -the "Code" tab. Create a new directory called ``extensions``, and -in this directory, create the file ``api.lua``. - -Paste the code below into ``api.lua`` and click "Apply". - -.. code-block:: lua - - local cartridge = require('cartridge') - local crud = require('crud') - local uuid = require('uuid') - local json = require('json') - - function add_user(request) - local fullname = request:post_param("fullname") - local result, err = crud.insert_object('users', {user_id = uuid.new(), fullname = fullname}) - if err ~= nil then - return {body = json.encode({status = "Error!", error = err}), status = 500} - end - - return {body = json.encode({status = "Success!", result = result}), status = 200} - end - - function add_video(request) - local description = request:post_param("description") - local result, err = crud.insert_object('videos', {video_id = uuid.new(), description = description}) - if err ~= nil then - return {body = json.encode({status = "Error!", error = err}), status = 500} - end - - return {body = json.encode({status = "Success!", result = result}), status = 200} - end - - function like_video(request) - local video_id = request:post_param("video_id") - local user_id = request:post_param("user_id") - - local result, err = crud.insert_object('likes', {like_id = uuid.new(), - video_id = uuid.fromstr(video_id), - user_id = uuid.fromstr(user_id)}) - if err ~= nil then - return {body = json.encode({status = "Error!", error = err}), status = 500} - end - - return {body = json.encode({status = "Success!", result = result}), status = 200} - end - - return { - add_user = add_user, - add_video = add_video, - like_video = like_video, - } - -Setting up HTTP API [2 minutes] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Clients will visit the Tarantool cluster using the HTTP protocol. -The cluster already has a built-in HTTP server. - -To configure HTTP paths, you need to write a configuration -file. Go to the "Code" tab. Create the file ``config.yml`` -in the ``extensions`` directory, which you created on the last step. - -Paste the configuration example below into ``config.yml`` and click "Apply". - -.. code-block:: yaml - - --- - functions: - - add_user: - module: extensions.api - handler: add_user - events: - - http: {path: "/add_user", method: POST} - - add_video: - module: extensions.api - handler: add_video - events: - - http: {path: "/add_video", method: POST} - - like_video: - module: extensions.api - handler: like_video - events: - - http: {path: "/like_video", method: POST} - ... - -Done! Let's make test requests from the console. - -.. code-block:: bash - - curl -X POST --data "fullname=Taran Tool" url/add_user - -.. note:: - - In the requests, substitute ``url`` with the address of your sandbox. - The protocol must be strictly HTTP. - - For example, if you're following this tutorial with Try Tarantool, this request will look something like this - (note that your hash is different): - - .. code-block:: bash - - curl -X POST --data "fullname=Taran Tool" http://artpjcvnmwctc4qppejgf57.try.tarantool.io/add_user - - But if you've bootstrapped Tarantool locally, the request will look as follows: - - .. code-block:: bash - - curl -X POST --data "fullname=Taran Tool" http://localhost:8081/add_user - -We've just created a user and got their UUID. Let's remember it. - -.. code-block:: bash - - curl -X POST --data "description=My first tiktok" url/add_video - -Let's say a user has added their first video with a description. -The video clip also has a UUID. Let's remember it, too. - -In order to "like" the video, you need to specify the user UUID and the video UUID from the previous steps. -Substitute the ellipses in the command below with the corresponding UUIDs: - -.. code-block:: bash - - curl -X POST --data "video_id=...&user_id=..." url/like_video - -The result will be something like this: - -.. figure:: images/console.png - :alt: Test queries in the console - - Test queries in the console - -In our example, you can "like" the video as many times as you want. -It makes no sense in the real life, but it will help us understand how -sharding works -- more precisely, the ``sharding_key`` parameter. - -Our ``sharding_key`` for the ``likes`` is ``video_id``. -We also specified a ``sharding_key`` for the ``videos`` space. It means -that likes will be stored on the same storage as videos. -This ensures data locality with regard to storage and allows -getting all the information you need in one network trip to Storage. - -More details are described on the next step. - -Looking at the data [1 minute] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. note:: - - The following instructions are for Tarantool Enterprise Edition and the Try Tarantool cloud service. - - The Space-Explorer tool is unavailable in the open-source version. Use the console to view data. - - Check our documentation to learn more about :doc:`data viewing `. - To learn how to connect to a Tarantool instance, :ref:`read the basic Tarantool manual `. - - -Go to the "Space-Explorer" tab to see all the nodes in the cluster. -As we have only one storage and one router started so far, the data is stored -on only one node. - -Let's go to the node ``s1-master``: click "Connect" and select the necessary space. -Check that everything is in place and move on. - -.. figure:: images/hosts.png - :alt: Space Explorer, host list - - Space Explorer, host list - -.. figure:: images/likes.png - :alt: Space Explorer, view likes - - Space Explorer, viewing likes - - -Scaling the cluster [1 minute] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Let's create a second shard. Click on the "Cluster" tab, select -``s2-master``, and click "Configure". Select the roles as shown in the picture: - -.. figure:: images/configuring-server.png - :alt: Cluster, new shard configuration screen - - Cluster, new shard configuration screen - -Click on the necessary roles and create a shard (replica set). - -Checking how sharding works [1 minute] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Now we have two shards -- two logical nodes that -share data among themselves. The router decides what piece of data goes to what shard. -By default, the router uses the hash function from the field ``sharding_key`` -we've specified in the DDL. - -To enable a new shard, you need to set its weight to one. -Go back to the "Cluster" tab, open the ``s2-master`` settings, -set the Replica set weight to 1, and apply. - -Something has already happened. Let's go to Space-Explorer and check the node -``s2-master``. It turns out that some of the data from the first shard -has already migrated here! The scaling is done automatically. - -Now let's try adding more data to the cluster via the HTTP API. -We can check back later and make sure that the new data is also evenly -distributed across the two shards. - -Disconnecting a shard for a while [1 minute] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In the ``s1-master`` settings, set Replica set weight to 0 and -apply. Wait for a few seconds, then go to Space-Explorer and look at the -data in ``s2-master``. You will see that all the data has been migrated to -the remaining shard automatically. - -Now we can safely disable the first shard for maintenance. - -See also -~~~~~~~~ - -* README of the `DDL `__ module to create - your own data schema. -* README of the `CRUD `__ module to - learn more about the API and create your own cluster queries. - - -To continue to the next steps of the tutorial, -click the button in the bottom right corner -or select the section in the table of contents on the left. diff --git a/doc/getting_started/images/configuring-server.png b/doc/getting_started/images/configuring-server.png deleted file mode 100644 index 0ee06f3d07..0000000000 Binary files a/doc/getting_started/images/configuring-server.png and /dev/null differ diff --git a/doc/getting_started/images/console.png b/doc/getting_started/images/console.png deleted file mode 100755 index 602357530e..0000000000 Binary files a/doc/getting_started/images/console.png and /dev/null differ diff --git a/doc/getting_started/images/first-configuration-result.png b/doc/getting_started/images/first-configuration-result.png deleted file mode 100644 index f1bdee66a7..0000000000 Binary files a/doc/getting_started/images/first-configuration-result.png and /dev/null differ diff --git a/doc/getting_started/images/hosts-list.png b/doc/getting_started/images/hosts-list.png deleted file mode 100644 index 199bfe814b..0000000000 Binary files a/doc/getting_started/images/hosts-list.png and /dev/null differ diff --git a/doc/getting_started/images/hosts.png b/doc/getting_started/images/hosts.png deleted file mode 100644 index 59f41c98a3..0000000000 Binary files a/doc/getting_started/images/hosts.png and /dev/null differ diff --git a/doc/getting_started/images/likes.png b/doc/getting_started/images/likes.png deleted file mode 100644 index 164b1daf82..0000000000 Binary files a/doc/getting_started/images/likes.png and /dev/null differ diff --git a/doc/getting_started/images/router-configuration.png b/doc/getting_started/images/router-configuration.png deleted file mode 100644 index 12129afa9c..0000000000 Binary files a/doc/getting_started/images/router-configuration.png and /dev/null differ diff --git a/doc/getting_started/images/scaling.png b/doc/getting_started/images/scaling.png deleted file mode 100644 index d2e75a89eb..0000000000 Binary files a/doc/getting_started/images/scaling.png and /dev/null differ diff --git a/doc/getting_started/images/storage-configuration.png b/doc/getting_started/images/storage-configuration.png deleted file mode 100644 index d9a9d7f424..0000000000 Binary files a/doc/getting_started/images/storage-configuration.png and /dev/null differ diff --git a/doc/getting_started/index.rst b/doc/getting_started/index.rst index 3fdcd016a8..ca4215227a 100644 --- a/doc/getting_started/index.rst +++ b/doc/getting_started/index.rst @@ -3,41 +3,15 @@ .. _getting_started: -******************************************************************************** Getting started -******************************************************************************** +*************** -The :ref:`First steps ` section -will get you acquainted with Tarantool in 15 minutes. -We will be creating a basic microservice for TikTok. +.. TODO: New Getting Started https://github.com/tarantool/doc/issues/3636 + +The :ref:`Creating your first Tarantool database ` section +will get you acquainted with Tarantool. We will start Tarantool, create a data schema, and write our first data. You'll get an understanding of the technology and learn about the basic terms and features. -In the :ref:`Connecting to cluster ` section, -we'll show you how to read or write data to Tarantool -from your Python/Go/PHP application or another programming language. - -After connecting to the database for the first time, you might want to change the data schema. -In the section :ref:`Updating the data schema `, -we'll discuss the approaches to changing the data schema and the associated limitations. - -To make our code work with Tarantool, -we may want to transfer some of our data logic to Tarantool. -In the section :ref:`Writing cluster application code `, -we'll write a "Hello, World!" program in the Lua language, -which will work in our Tarantool cluster. -This will give you a basic understanding of how the role mechanism works. -In this way, you'll understand what part of your business logic you would like -to write in/migrate to Tarantool. - -.. toctree:: - :maxdepth: 1 - - getting_started_imcp - connecting_to_cluster - change_schema_dynamically - writing_cluster_code - To continue exploring Tarantool and its ecosystem, you might want to check out Tarantool :doc:`tutorials and guides <../how-to/index>`. -The :ref:`Cartridge beginner tutorial ` can also be found there. diff --git a/doc/getting_started/writing_cluster_code.rst b/doc/getting_started/writing_cluster_code.rst deleted file mode 100644 index 7a8f8ec10a..0000000000 --- a/doc/getting_started/writing_cluster_code.rst +++ /dev/null @@ -1,17 +0,0 @@ -.. _getting_started-wrirting_cluster-code: - -================================================================================= -Writing code in a cluster application -================================================================================= - -In the "Getting Started" tutorial, -we wrote the application code directly in the browser. -We used the file ``config.yml`` to describe HTTP endpoint handlers. -This is a convenient and fast way to write code -that allows you to use Tarantool as a repository without any additional HTTP service. -This functionality is implemented through the ``cartridge-extensions`` module. -It is also included in the tutorial default application. - -However, in Tarantool, you can implement absolutely any business logic on top of a cluster. -This :doc:`Cartridge getting started section ` -covers the cluster roles mechanism and writing a cluster application from scratch. diff --git a/doc/how-to/getting_started_cartridge.rst b/doc/how-to/getting_started_cartridge.rst deleted file mode 100644 index dc21e2edc2..0000000000 --- a/doc/how-to/getting_started_cartridge.rst +++ /dev/null @@ -1,231 +0,0 @@ -.. _getting_started_cartridge: - -Creating your first Tarantool Cartridge application -=================================================== - -Here we'll walk you through developing a simple cluster application. - -First, -:doc:`set up the development environment `. - -Next, create an application named ``myapp``. Run: - -.. code-block:: console - - $ cartridge create --name myapp - -This will create a Tarantool Cartridge application in the ``./myapp`` directory, -with a handful of -:doc:`template files and directories ` -inside. - -Go inside and make a dry run: - -.. code-block:: console - - $ cd ./myapp - $ cartridge build - $ cartridge start - -This will build the application locally, start 5 instances of Tarantool -and a :ref:`stateboard ` (state provider), and -run the application as it is, with no business logic yet. - -Why 5 instances and a stateboard? See the ``instances.yml`` file in your application directory. -It contains the :ref:`configuration ` of all instances -that you can use in the cluster. By default, it defines configuration for 5 -Tarantool instances and a stateboard. - -.. code-block:: yaml - - --- - myapp.router: - advertise_uri: localhost:3301 - http_port: 8081 - - myapp.s1-master: - advertise_uri: localhost:3302 - http_port: 8082 - - myapp.s1-replica: - advertise_uri: localhost:3303 - http_port: 8083 - - myapp.s2-master: - advertise_uri: localhost:3304 - http_port: 8084 - - myapp.s2-replica: - advertise_uri: localhost:3305 - http_port: 8085 - - myapp-stateboard: - listen: localhost:4401 - password: passwd - -You can already see these instances in the cluster management web interface at -http://localhost:8081 (here 8081 is the HTTP port of the first instance -specified in ``instances.yml``). - -.. image:: images/cluster_dry_run-border-5px.png - :align: center - :scale: 40% - -Okay, press ``Ctrl + C`` to stop the cluster for a while. - -Now it’s time to add some business logic to your application. -This will be an evergreen "Hello world!"" -- just to keep things simple. - -Rename the template file ``app/roles/custom.lua`` to ``hello-world.lua``. - -.. code-block:: console - - $ mv app/roles/custom.lua app/roles/hello-world.lua - -This will be your *role*. In Tarantool Cartridge, a role is a Lua module that -implements some instance-specific functions and/or logic. -Further on we'll show how to add code to a role, build it, enable and test. - -There is already some code in the role's ``init()`` function. - -.. code-block:: lua - :emphasize-lines: 5-7 - - local function init(opts) -- luacheck: no unused args - -- if opts.is_master then - -- end - - local httpd = assert(cartridge.service_get('httpd'), "Failed to get httpd service") - httpd:route({method = 'GET', path = '/hello'}, function() - return {body = 'Hello world!'} - end) - - return true - end - -This exports an HTTP endpoint ``/hello``. For example, http://localhost:8081/hello -if you address the first instance from the ``instances.yml`` file. -If you open it in a browser after enabling the role (we'll do it here a bit later), -you'll see "Hello world!" on the page. - -Let's add some more code there. - -.. code-block:: lua - :emphasize-lines: 9-11 - - local function init(opts) -- luacheck: no unused args - -- if opts.is_master then - -- end - - local httpd = cartridge.service_get('httpd') - httpd:route({method = 'GET', path = '/hello'}, function() - return {body = 'Hello world!'} - end) - - local log = require('log') - log.info('Hello world!') - - return true - end - -This writes "Hello, world!" to the console when the role gets enabled, -so you'll have a chance to spot this. No rocket science. - -Next, amend ``role_name`` in the "return" section of the ``hello-world.lua`` file. -You'll see this section at the bottom of the file. -This text will be displayed as a label for your role in the cluster management -web interface. - -.. code-block:: lua - :emphasize-lines: 2 - - return { - role_name = 'Hello world!', - init = init, - stop = stop, - validate_config = validate_config, - apply_config = apply_config, - -- dependencies = {'cartridge.roles.vshard-router'}, - } - -The final thing to do before you can run the application is to add your role to -the list of available cluster roles in the ``init.lua`` file in the project root directory. - -.. code-block:: lua - :emphasize-lines: 8 - - local cartridge = require('cartridge') - - local ok, err = cartridge.cfg({ - roles = { - 'cartridge.roles.vshard-storage', - 'cartridge.roles.vshard-router', - 'cartridge.roles.metrics', - 'app.roles.hello-world', - }, - }) - -Now the cluster will be aware of your role. - -Why ``app.roles.hello-world``? By default, the role name here should match the -path from the application root (``./myapp``) to the role file -(``app/roles/hello-world.lua``). - -Great! Your role is ready. Re-build the application and re-start the cluster now: - -.. code-block:: console - - $ cartridge build - $ cartridge start - -Now all instances are up, but idle, waiting for you to enable roles for them. - -Instances (replicas) in a Tarantool Cartridge cluster are organized into -*replica sets*. Roles are enabled per replica set, so all instances in a -replica set have the same roles enabled. - -Let's create a replica set containing just one instance and enable your role: - -#. Open the cluster management web interface at http://localhost:8081. -#. Next to the **router** instance, click :guilabel:`Configure`. -#. Check the role ``Hello world!`` to enable it. Notice that the role name here - matches the label text that you specified in the ``role_name`` parameter in - the ``hello-world.lua`` file. -#. (Optionally) Specify the replica set name, for example - "hello-world-replica-set". - - .. image:: images/cluster_create_replica_set-border-5px.png - :align: center - :scale: 40% - -#. Click :guilabel:`Create replica set` and see the newly-created replica set - in the web interface. - - .. image:: images/cluster_new_replica_set-border-5px.png - :align: center - :scale: 40% - -Your custom role got enabled. Find the "Hello world!" message in console, -like this: - -.. image:: images/cluster_hello_world_console-border-5px.png - :align: center - :scale: 40% - -Finally, open the HTTP endpoint of this instance at -http://localhost:8081/hello and see the reply to your GET request. - -.. image:: images/cluster_hello_http-border-5px.png - :align: center - :scale: 40% - -Everything is up and running! What's next? - -* Follow the :ref:`administrator's guide ` to set up the rest of the - cluster and try some cool cluster management features -- for example, enable failover. -* Check out the Cartridge :doc:`developer's guide ` - and implement more sophisticated business logic for your role. -* :doc:`Pack ` your application for easy distribution. - Choose what you like: a DEB or RPM package, a TGZ archive, or a Docker image. - Archives and packages can be deployed with `ansible-cartridge `__. -* Read the :doc:`Cartridge documentation `. diff --git a/doc/how-to/index.rst b/doc/how-to/index.rst index bf313d80c3..f95685c0af 100644 --- a/doc/how-to/index.rst +++ b/doc/how-to/index.rst @@ -18,7 +18,6 @@ If you are new to Tarantool, please see our Creating Tarantool database getting_started_connectors - getting_started_cartridge db/index getting_started_net_box vshard_quick diff --git a/doc/how-to/replication/index.rst b/doc/how-to/replication/index.rst index 463aa246eb..a7cfc1f561 100644 --- a/doc/how-to/replication/index.rst +++ b/doc/how-to/replication/index.rst @@ -1,4 +1,5 @@ .. _how-to-replication: +.. _replication-setup: Replication tutorials ===================== @@ -7,8 +8,6 @@ Replication tutorials :maxdepth: 2 repl_bootstrap - repl_add_instances - repl_remove_instances - repl_sync - repl_leader_elect + repl_bootstrap_auto + repl_bootstrap_master_master \ No newline at end of file diff --git a/doc/how-to/replication/repl_add_instances.rst b/doc/how-to/replication/repl_add_instances.rst deleted file mode 100644 index 8eb87e5ce8..0000000000 --- a/doc/how-to/replication/repl_add_instances.rst +++ /dev/null @@ -1,166 +0,0 @@ -.. _replication-add_instances: - -Adding instances -================ - -.. _replication-add_replica: - -This tutorial is intended as a follow-up to the -:ref:`replication bootstrapping ` guide. -It continues building on the examples from that page. -It is recommended that you complete the bootstrapping guide before you proceed. - - -Adding a replica ----------------- - -.. image:: mr-1m-2r-mesh-add.png - :align: center - -To add a second **replica** instance to the **master-replica** set from our -:ref:`bootstrapping example `, we need an -analog of the instance file that we created for the first replica in that set: - -.. code-block:: lua - - -- instance file for replica #2 - box.cfg{ - listen = 3301, - replication = {'replicator:password@192.168.0.101:3301', -- master URI - 'replicator:password@192.168.0.102:3301', -- replica #1 URI - 'replicator:password@192.168.0.103:3301'}, -- replica #2 URI - read_only = true - } - box.once("schema", function() - box.schema.user.create('replicator', {password = 'password'}) - box.schema.user.grant('replicator', 'replication') -- grant replication role - box.schema.space.create("test") - box.space.test:create_index("primary") - print('box.once executed on replica #2') - end) - -Here we add the URI of replica #2 to the :ref:`replication ` -parameter, so now it contains three URIs. - -After we launch the new replica instance, it gets connected to the master -instance and retrieves the master's write-ahead-log and snapshot files: - -.. code-block:: console - - $ # launching replica #2 - $ tarantool replica2.lua - 2017-06-14 14:54:33.927 [46945] main/101/replica2.lua C> version 1.7.4-52-g980d30092 - 2017-06-14 14:54:33.927 [46945] main/101/replica2.lua C> log level 5 - 2017-06-14 14:54:33.928 [46945] main/101/replica2.lua I> mapping 268435456 bytes for tuple arena... - 2017-06-14 14:54:33.930 [46945] main/104/applier/replicator@192.168.0.10 I> remote master is 1.7.4 at 192.168.0.101:3301 - 2017-06-14 14:54:33.930 [46945] main/104/applier/replicator@192.168.0.10 I> authenticated - 2017-06-14 14:54:33.930 [46945] main/101/replica2.lua I> bootstrapping replica from 192.168.0.101:3301 - 2017-06-14 14:54:33.933 [46945] main/104/applier/replicator@192.168.0.10 I> initial data received - 2017-06-14 14:54:33.933 [46945] main/104/applier/replicator@192.168.0.10 I> final data received - 2017-06-14 14:54:33.934 [46945] snapshot/101/main I> saving snapshot `/var/lib/tarantool/replica2/00000000000000000010.snap.inprogress' - 2017-06-14 14:54:33.934 [46945] snapshot/101/main I> done - 2017-06-14 14:54:33.935 [46945] main/101/replica2.lua I> vinyl checkpoint done - 2017-06-14 14:54:33.935 [46945] main/101/replica2.lua I> ready to accept requests - 2017-06-14 14:54:33.935 [46945] main/101/replica2.lua I> set 'read_only' configuration option to true - 2017-06-14 14:54:33.936 [46945] main C> entering the event loop - -Since we are adding a read-only instance, there is no need to dynamically -update the ``replication`` parameter on the other running instances. This update -would be required if we :ref:`added a master instance `. - -However, we recommend specifying the URI of replica #3 in all instance files of the -replica set. This will keep all the files consistent with each other and with -the current replication topology, and so will help to avoid configuration errors -in case of further configuration updates and replica set restart. - -.. _replication-add_master: - -Adding a master ---------------- - -.. image:: mm-3m-mesh-add.png - :align: center - -To add a third master instance to the **master-master** set from our -:ref:`bootstrapping example `, we need an -analog of the instance files that we created to bootstrap the other master -instances in that set: - -.. code-block:: lua - - -- instance file for master #3 - box.cfg{ - listen = 3301, - replication = {'replicator:password@192.168.0.101:3301', -- master#1 URI - 'replicator:password@192.168.0.102:3301', -- master#2 URI - 'replicator:password@192.168.0.103:3301'}, -- master#3 URI - read_only = true, -- temporarily read-only - } - box.once("schema", function() - box.schema.user.create('replicator', {password = 'password'}) - box.schema.user.grant('replicator', 'replication') -- grant replication role - box.schema.space.create("test") - box.space.test:create_index("primary") - end) - -Here we make the following changes: - -* Add the URI of master #3 to the :ref:`replication ` - parameter. -* Temporarily specify :ref:`read_only=true ` to disable - data-change operations on the instance. After launch, master #3 will act as a - replica until it retrieves all data from the other masters in the replica set. - -After we launch master #3, it gets connected to the other master -instances and retrieves their write-ahead-log and snapshot files: - -.. code-block:: console - - $ # launching master #3 - $ tarantool master3.lua - 2017-06-14 17:10:00.556 [47121] main/101/master3.lua C> version 1.7.4-52-g980d30092 - 2017-06-14 17:10:00.557 [47121] main/101/master3.lua C> log level 5 - 2017-06-14 17:10:00.557 [47121] main/101/master3.lua I> mapping 268435456 bytes for tuple arena... - 2017-06-14 17:10:00.559 [47121] iproto/101/main I> binary: bound to [::]:3301 - 2017-06-14 17:10:00.559 [47121] main/104/applier/replicator@192.168.0.10 I> remote master is 1.7.4 at 192.168.0.101:3301 - 2017-06-14 17:10:00.559 [47121] main/105/applier/replicator@192.168.0.10 I> remote master is 1.7.4 at 192.168.0.102:3301 - 2017-06-14 17:10:00.559 [47121] main/106/applier/replicator@192.168.0.10 I> remote master is 1.7.4 at 192.168.0.103:3301 - 2017-06-14 17:10:00.559 [47121] main/105/applier/replicator@192.168.0.10 I> authenticated - 2017-06-14 17:10:00.559 [47121] main/101/master3.lua I> bootstrapping replica from 192.168.0.102:3301 - 2017-06-14 17:10:00.562 [47121] main/105/applier/replicator@192.168.0.10 I> initial data received - 2017-06-14 17:10:00.562 [47121] main/105/applier/replicator@192.168.0.10 I> final data received - 2017-06-14 17:10:00.562 [47121] snapshot/101/main I> saving snapshot `/Users/e.shebunyaeva/work/tarantool-test-repl/master3_dir/00000000000000000009.snap.inprogress' - 2017-06-14 17:10:00.562 [47121] snapshot/101/main I> done - 2017-06-14 17:10:00.564 [47121] main/101/master3.lua I> vinyl checkpoint done - 2017-06-14 17:10:00.564 [47121] main/101/master3.lua I> ready to accept requests - 2017-06-14 17:10:00.565 [47121] main/101/master3.lua I> set 'read_only' configuration option to true - 2017-06-14 17:10:00.565 [47121] main C> entering the event loop - 2017-06-14 17:10:00.565 [47121] main/104/applier/replicator@192.168.0.10 I> authenticated - -Next, we add the URI of master #3 to the ``replication`` parameter on the existing two -masters. Replication-related parameters are dynamic, so we only need to make a -``box.cfg{}`` request on each of the running instances: - -.. code-block:: tarantoolsession - - # adding master #3 URI to replication sources - tarantool> box.cfg{replication = - > {'replicator:password@192.168.0.101:3301', - > 'replicator:password@192.168.0.102:3301', - > 'replicator:password@192.168.0.103:3301'}} - --- - ... - -When master #3 catches up with the other masters' state, we can disable -read-only mode for this instance: - -.. code-block:: tarantoolsession - - # making master #3 a real master - tarantool> box.cfg{read_only=false} - --- - ... - -We also recommend to specify master #3 URI in all instance files in order to -keep all the files consistent with each other and with the current replication -topology. diff --git a/doc/how-to/replication/repl_bootstrap.rst b/doc/how-to/replication/repl_bootstrap.rst index a6f1a81bff..95af3c9cac 100644 --- a/doc/how-to/replication/repl_bootstrap.rst +++ b/doc/how-to/replication/repl_bootstrap.rst @@ -1,386 +1,662 @@ .. _replication-bootstrap: +.. _replication-master_replica_bootstrap: -Bootstrapping a replica set -=========================== +Master-replica: manual failover +=============================== -.. _replication-setup: +**Example on GitHub**: `manual_leader `_ -Replication setup ------------------ +This tutorial shows how to configure and work with a replica set with manual failover. -To enable replication, you need to specify two parameters in a ``box.cfg{}`` -request: -* :ref:`replication ` which defines the - replication source(s), and -* :ref:`read_only ` which is ``true`` for a - replica and ``false`` for a master. +.. _replication-tt-env: -Both these parameters are "dynamic". This allows a replica to become a master -and vice versa on the fly with the help of a ``box.cfg{}`` request. +Prerequisites +------------- + +Before starting this tutorial: + +1. Install the :ref:`tt ` utility. + +2. Create a tt environment in the current directory by executing the :ref:`tt init ` command. + +3. Inside the ``instances.enabled`` directory of the created tt environment, create the ``manual_leader`` directory. + +4. Inside ``instances.enabled/manual_leader``, create the ``instances.yml`` and ``config.yaml`` files: + + - ``instances.yml`` specifies instances to :ref:`run ` in the current environment and should look like this: + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/manual_leader/instances.yml + :language: yaml + :end-at: instance002: + :dedent: + + - The ``config.yaml`` file is intended to store a :ref:`replica set configuration `. + + + +.. _replication-master_replica_configuring: + +Configuring a replica set +------------------------- + +This section describes how to configure a replica set in ``config.yaml``. + +.. _replication-master_replica_configuring_failover_mode: + +Step 1: Configuring a failover mode +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +First, set the :ref:`replication.failover ` option to ``manual``: + +.. literalinclude:: /code_snippets/snippets/replication/instances.enabled/manual_leader/config.yaml + :language: yaml + :start-at: replication: + :end-at: failover: manual + :dedent: + +.. _replication-master_replica_configuring_topology: + +Step 2: Defining a replica set topology +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Define a replica set topology inside the :ref:`groups ` section: + +- The :ref:`leader ` option sets ``instance001`` as a replica set leader. +- The :ref:`iproto.listen ` option specifies an address used to listen for incoming requests and allows replicas to communicate with each other. + +.. literalinclude:: /code_snippets/snippets/replication/instances.enabled/manual_leader/config.yaml + :language: yaml + :start-at: groups: + :end-at: listen: 127.0.0.1:3302 + :dedent: + + +.. _replication-master_replica_configuring_credentials: + +Step 3: Creating a user for replication +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In the :ref:`credentials ` section, create the ``replicator`` user with the ``replication`` role: + +.. literalinclude:: /code_snippets/snippets/replication/instances.enabled/manual_leader/config.yaml + :language: yaml + :start-at: credentials: + :end-at: roles: [replication] + :dedent: + + +.. _replication-master_replica_configuring_advertise: + +Step 4: Specifying advertise URIs +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Set :ref:`iproto.advertise.peer ` to advertise the current instance to other replica set members: + +.. literalinclude:: /code_snippets/snippets/replication/instances.enabled/manual_leader/config.yaml + :language: yaml + :start-at: iproto: + :end-at: peer: replicator@ + :dedent: + +.. _replication-master_replica_configuring_result: + +Resulting configuration +~~~~~~~~~~~~~~~~~~~~~~~ + +The resulting replica set configuration should look as follows: + +.. literalinclude:: /code_snippets/snippets/replication/instances.enabled/manual_leader/config.yaml + :language: yaml + :end-at: listen: 127.0.0.1:3302 + :dedent: + + + + +.. _replication-master_replica_work: + +Working with a replica set +-------------------------- + +.. _replication-master_replica_starting: + +Starting instances +~~~~~~~~~~~~~~~~~~ + +1. After configuring a replica set, execute the :ref:`tt start ` command from the :ref:`tt environment directory `: + + .. code-block:: console + + $ tt start manual_leader + • Starting an instance [manual_leader:instance001]... + • Starting an instance [manual_leader:instance002]... + +2. Check that instances are in the ``RUNNING`` status using the :ref:`tt status ` command: + + .. code-block:: console + + $ tt status manual_leader + INSTANCE STATUS PID + manual_leader:instance001 RUNNING 15272 + manual_leader:instance002 RUNNING 15273 + + +.. _replication-master_replica_status: + +Checking a replica set status +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. Connect to ``instance001`` using :ref:`tt connect `: + + .. code-block:: console + + $ tt connect manual_leader:instance001 + • Connecting to the instance... + • Connected to manual_leader:instance001 + +2. Make sure that the instance is in the ``running`` state by executing :ref:`box.info.status `: + + .. code-block:: console + + manual_leader:instance001> box.info.status + --- + - running + ... + +3. Check that the instance is writable using ``box.info.ro``: + + .. code-block:: console + + manual_leader:instance001> box.info.ro + --- + - false + ... + +4. Execute ``box.info.replication`` to check a replica set status. + For ``instance002``, ``upstream.status`` and ``downstream.status`` should be ``follow``. + + .. code-block:: console + + manual_leader:instance001> box.info.replication + --- + - 1: + id: 1 + uuid: 9bb111c2-3ff5-36a7-00f4-2b9a573ea660 + lsn: 7 + name: instance001 + 2: + id: 2 + uuid: 4cfa6e3c-625e-b027-00a7-29b2f2182f23 + lsn: 0 + upstream: + status: follow + idle: 0.3893879999996 + peer: replicator@127.0.0.1:3302 + lag: 0.00028800964355469 + name: instance002 + downstream: + status: follow + idle: 0.37777199999982 + vclock: {1: 7} + lag: 0 + ... + + +.. _replication-master_replica_add_data: + +Adding data +~~~~~~~~~~~ + +To check that a replica (``instance002``) gets all updates from the master, follow the steps below: + +1. On ``instance001``, create a space and add data as described in :ref:`CRUD operation examples `. + +2. Open the second terminal, connect to ``instance002`` using ``tt connect``, and use the ``select`` operation to make sure data is replicated. + +3. Check that :ref:`box.info.vclock ` values are the same on both instances: + + - ``instance001``: + + .. code-block:: console + + manual_leader:instance001> box.info.vclock + --- + - {1: 21} + ... + + - ``instance002``: + + .. code-block:: console + + manual_leader:instance002> box.info.vclock + --- + - {1: 21} + ... + + .. vclock_0th_component_note_start + + .. NOTE:: + + Note that a ``vclock`` value might include the ``0`` component that is related to local space operations and might differ for different instances in a replica set. + + .. vclock_0th_component_note_end + + + +.. _replication-add_instances: + +Adding instances +---------------- + +This section describes how to add a new replica to a replica set. + +.. _replication-add_instances-update-config: + +Adding an instance to the configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. Add ``instance003`` to the ``instances.yml`` file: + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/manual_leader/instances.yml + :language: yaml + :dedent: + +2. Add ``instance003`` with the specified ``iproto.listen`` option to the ``config.yaml`` file: + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/manual_leader/config.yaml + :language: yaml + :start-at: groups: + :end-at: listen: 127.0.0.1:3303 + :dedent: + + +.. _replication-add_instances-start-instance: + +Starting an instance +~~~~~~~~~~~~~~~~~~~~ + +1. Open the third terminal to work with a new instance. + Start ``instance003`` using ``tt start``: + + .. code-block:: console + + $ tt start manual_leader:instance003 + • Starting an instance [manual_leader:instance003]... + +2. Check a replica set status using ``tt status``: + + .. code-block:: console + + $ tt status manual_leader + INSTANCE STATUS PID + manual_leader:instance001 RUNNING 15272 + manual_leader:instance002 RUNNING 15273 + manual_leader:instance003 RUNNING 15551 + + +.. _replication-add_instances-reload-config: + +Reloading configuration +~~~~~~~~~~~~~~~~~~~~~~~ + +After you added ``instance003`` to the configuration and started it, you need to reload configurations on all instances. +This is required to allow ``instance001`` and ``instance002`` to get data from the new instance in case it becomes a master. + +1. Connect to ``instance003`` using ``tt connect``: + + .. code-block:: console + + $ tt connect manual_leader:instance003 + • Connecting to the instance... + • Connected to manual_leader:instance001 + +2. Reload configurations on all three instances using the ``reload()`` function provided by the :ref:`config ` module: + + - ``instance001``: + + .. code-block:: console + + manual_leader:instance001> require('config'):reload() + --- + ... + + - ``instance002``: + + .. code-block:: console + + manual_leader:instance002> require('config'):reload() + --- + ... + + - ``instance003``: + + .. code-block:: console + + manual_leader:instance003> require('config'):reload() + --- + ... + + +3. Execute ``box.info.replication`` to check a replica set status. + Make sure that ``upstream.status`` and ``downstream.status`` are ``follow`` for ``instance003``. + + .. code-block:: console + + manual_leader:instance001> box.info.replication + --- + - 1: + id: 1 + uuid: 9bb111c2-3ff5-36a7-00f4-2b9a573ea660 + lsn: 21 + name: instance001 + 2: + id: 2 + uuid: 4cfa6e3c-625e-b027-00a7-29b2f2182f23 + lsn: 0 + upstream: + status: follow + idle: 0.052655000000414 + peer: replicator@127.0.0.1:3302 + lag: 0.00010204315185547 + name: instance002 + downstream: + status: follow + idle: 0.09503500000028 + vclock: {1: 21} + lag: 0.00026917457580566 + 3: + id: 3 + uuid: 9a3a1b9b-8a18-baf6-00b3-a6e5e11fd8b6 + lsn: 0 + upstream: + status: follow + idle: 0.77522099999987 + peer: replicator@127.0.0.1:3303 + lag: 0.0001838207244873 + name: instance003 + downstream: + status: follow + idle: 0.33186100000012 + vclock: {1: 21} + lag: 0 + ... -.. _replication-master_replica_bootstrap: -Master-replica bootstrap ------------------------- - -Let us first bootstrap a simple **master-replica** set containing two instances, -each located on its own machine. For easier administration, we make the -:ref:`instance files ` almost identical. - -.. image:: mr-1m-1r-twoway.png - :align: center - -Here is an example of the master's instance file: - -.. code-block:: lua - - -- instance file for the master - box.cfg{ - listen = 3301, - replication = {'replicator:password@192.168.0.101:3301', -- master URI - 'replicator:password@192.168.0.102:3301'}, -- replica URI - read_only = false - } - box.once("schema", function() - box.schema.user.create('replicator', {password = 'password'}) - box.schema.user.grant('replicator', 'replication') -- grant replication role - box.schema.space.create("test") - box.space.test:create_index("primary") - print('box.once executed on master') - end) - -where: - -* the ``box.cfg()`` :ref:`listen ` parameter defines a URI - (port 3301 in our example), on which the master can accept connections from - replicas. -* the ``box.cfg()`` :ref:`replication ` parameter - defines the URIs at which all instances in the replica set can accept connections. - It includes the replica's URI as well, although the replica is not a replication - source right now. This parameter is mandatory only for master-master or full-mesh - cluster setups. - - .. note:: - - For security reasons, we recommend that administrators prevent unauthorized - replication sources by associating a password with every user that has a - replication :ref:`role `. That way, the :ref:`URI - ` for ``replication`` parameter must have the long form - ``username:password@host:port``. - -* the :ref:`read_only = false ` parameter setting enables - data-change operations on the instance and makes the instance act as a master, - not as a replica. *That is the only parameter setting in our instance files - that will differ.* -* the :doc:`box.once() ` function contains database initialization logic - that should be executed only once during the replica set lifetime. - -In this example, we create a space with a primary index, and a user for -replication purposes. We also say ``print('box.once executed on master')`` -so that it will later be visible on a console whether ``box.once()`` was executed. - -.. note:: - - Replication requires privileges. We can grant privileges for accessing spaces - directly to the user who will start the instance. However, it is more usual - to grant privileges for accessing spaces to a - :ref:`role `, and then grant the role to the user who - will start the replica. - -Here we use Tarantool's predefined role named "replication" which by default -grants "read" privileges for all database objects ("universe"), and we can -change privileges for this role as required. - -In the replica's instance file, we set the ``read_only`` parameter to "true", and -say ``print('box.once executed on replica')`` so that later it will be visible -that ``box.once()`` was not executed more than once. -Otherwise the replica's instance file is identical to the master's instance file. - -.. code-block:: lua - - -- instance file for the replica - box.cfg{ - listen = 3301, - replication = {'replicator:password@192.168.0.101:3301', -- master URI - 'replicator:password@192.168.0.102:3301'}, -- replica URI - read_only = true - } - box.once("schema", function() - box.schema.user.create('replicator', {password = 'password'}) - box.schema.user.grant('replicator', 'replication') -- grant replication role - box.schema.space.create("test") - box.space.test:create_index("primary") - print('box.once executed on replica') - end) - -.. note:: - - The replica does not inherit the master’s configuration parameters, such as - those making the :ref:`checkpoint daemon ` run on - the master. To get the same behavior, set the relevant parameters - explicitly so that they are the same on both master and replica. - -Now we can launch the two instances. The master... - -.. code-block:: console - - $ # launching the master - $ tarantool master.lua - 2017-06-14 14:12:03.847 [18933] main/101/master.lua C> version 1.7.4-52-g980d30092 - 2017-06-14 14:12:03.848 [18933] main/101/master.lua C> log level 5 - 2017-06-14 14:12:03.849 [18933] main/101/master.lua I> mapping 268435456 bytes for tuple arena... - 2017-06-14 14:12:03.859 [18933] iproto/101/main I> binary: bound to [::]:3301 - 2017-06-14 14:12:03.861 [18933] main/105/applier/replicator@192.168.0. I> can't connect to master - 2017-06-14 14:12:03.861 [18933] main/105/applier/replicator@192.168.0. coio.cc:105 !> SystemError connect, called on fd 14, aka 192.168.0.102:56736: Connection refused - 2017-06-14 14:12:03.861 [18933] main/105/applier/replicator@192.168.0. I> will retry every 1 second - 2017-06-14 14:12:03.861 [18933] main/104/applier/replicator@192.168.0. I> remote master is 1.7.4 at 192.168.0.101:3301 - 2017-06-14 14:12:19.878 [18933] main/105/applier/replicator@192.168.0. I> remote master is 1.7.4 at 192.168.0.102:3301 - 2017-06-14 14:12:19.879 [18933] main/101/master.lua I> initializing an empty data directory - 2017-06-14 14:12:19.908 [18933] snapshot/101/main I> saving snapshot `/var/lib/tarantool/master/00000000000000000000.snap.inprogress' - 2017-06-14 14:12:19.914 [18933] snapshot/101/main I> done - 2017-06-14 14:12:19.914 [18933] main/101/master.lua I> vinyl checkpoint done - 2017-06-14 14:12:19.917 [18933] main/101/master.lua I> ready to accept requests - 2017-06-14 14:12:19.918 [18933] main/105/applier/replicator@192.168.0. I> failed to authenticate - 2017-06-14 14:12:19.918 [18933] main/105/applier/replicator@192.168.0. xrow.cc:431 E> ER_LOADING: Instance bootstrap hasn't finished yet - box.once executed on master - 2017-06-14 14:12:19.920 [18933] main C> entering the event loop - -... (the display confirms that ``box.once()`` was executed on the master) -- and the replica: - -.. code-block:: console - - $ # launching the replica - $ tarantool replica.lua - 2017-06-14 14:12:19.486 [18934] main/101/replica.lua C> version 1.7.4-52-g980d30092 - 2017-06-14 14:12:19.486 [18934] main/101/replica.lua C> log level 5 - 2017-06-14 14:12:19.487 [18934] main/101/replica.lua I> mapping 268435456 bytes for tuple arena... - 2017-06-14 14:12:19.494 [18934] iproto/101/main I> binary: bound to [::]:3311 - 2017-06-14 14:12:19.495 [18934] main/104/applier/replicator@192.168.0. I> remote master is 1.7.4 at 192.168.0.101:3301 - 2017-06-14 14:12:19.495 [18934] main/105/applier/replicator@192.168.0. I> remote master is 1.7.4 at 192.168.0.102:3302 - 2017-06-14 14:12:19.496 [18934] main/104/applier/replicator@192.168.0. I> failed to authenticate - 2017-06-14 14:12:19.496 [18934] main/104/applier/replicator@192.168.0. xrow.cc:431 E> ER_LOADING: Instance bootstrap hasn't finished yet - -In both logs, there are messages saying that the replica was bootstrapped from the master: - -.. code-block:: console - - $ # bootstrapping the replica (from the master's log) - <...> - 2017-06-14 14:12:20.503 [18933] main/106/main I> initial data sent. - 2017-06-14 14:12:20.505 [18933] relay/[::ffff:192.168.0.101]:/101/main I> recover from `/var/lib/tarantool/master/00000000000000000000.xlog' - 2017-06-14 14:12:20.505 [18933] main/106/main I> final data sent. - 2017-06-14 14:12:20.522 [18933] relay/[::ffff:192.168.0.101]:/101/main I> recover from `/Users/e.shebunyaeva/work/tarantool-test-repl/master_dir/00000000000000000000.xlog' - 2017-06-14 14:12:20.922 [18933] main/105/applier/replicator@192.168.0. I> authenticated - -.. code-block:: console - - $ # bootstrapping the replica (from the replica's log) - <...> - 2017-06-14 14:12:20.498 [18934] main/104/applier/replicator@192.168.0. I> authenticated - 2017-06-14 14:12:20.498 [18934] main/101/replica.lua I> bootstrapping replica from 192.168.0.101:3301 - 2017-06-14 14:12:20.512 [18934] main/104/applier/replicator@192.168.0. I> initial data received - 2017-06-14 14:12:20.512 [18934] main/104/applier/replicator@192.168.0. I> final data received - 2017-06-14 14:12:20.517 [18934] snapshot/101/main I> saving snapshot `/var/lib/tarantool/replica/00000000000000000005.snap.inprogress' - 2017-06-14 14:12:20.518 [18934] snapshot/101/main I> done - 2017-06-14 14:12:20.519 [18934] main/101/replica.lua I> vinyl checkpoint done - 2017-06-14 14:12:20.520 [18934] main/101/replica.lua I> ready to accept requests - 2017-06-14 14:12:20.520 [18934] main/101/replica.lua I> set 'read_only' configuration option to true - 2017-06-14 14:12:20.520 [18934] main C> entering the event loop - -Notice that ``box.once()`` was executed only at the master, although we added -``box.once()`` to both instance files. - -We could as well launch the replica first: - -.. code-block:: console - - $ # launching the replica - $ tarantool replica.lua - 2017-06-14 14:35:36.763 [18952] main/101/replica.lua C> version 1.7.4-52-g980d30092 - 2017-06-14 14:35:36.765 [18952] main/101/replica.lua C> log level 5 - 2017-06-14 14:35:36.765 [18952] main/101/replica.lua I> mapping 268435456 bytes for tuple arena... - 2017-06-14 14:35:36.772 [18952] iproto/101/main I> binary: bound to [::]:3301 - 2017-06-14 14:35:36.772 [18952] main/104/applier/replicator@192.168.0. I> can't connect to master - 2017-06-14 14:35:36.772 [18952] main/104/applier/replicator@192.168.0. coio.cc:105 !> SystemError connect, called on fd 13, aka 192.168.0.101:56820: Connection refused - 2017-06-14 14:35:36.772 [18952] main/104/applier/replicator@192.168.0. I> will retry every 1 second - 2017-06-14 14:35:36.772 [18952] main/105/applier/replicator@192.168.0. I> remote master is 1.7.4 at 192.168.0.102:3301 - -... and the master later: - -.. code-block:: console - - $ # launching the master - $ tarantool master.lua - 2017-06-14 14:35:43.701 [18953] main/101/master.lua C> version 1.7.4-52-g980d30092 - 2017-06-14 14:35:43.702 [18953] main/101/master.lua C> log level 5 - 2017-06-14 14:35:43.702 [18953] main/101/master.lua I> mapping 268435456 bytes for tuple arena... - 2017-06-14 14:35:43.709 [18953] iproto/101/main I> binary: bound to [::]:3301 - 2017-06-14 14:35:43.709 [18953] main/105/applier/replicator@192.168.0. I> remote master is 1.7.4 at 192.168.0.102:3301 - 2017-06-14 14:35:43.709 [18953] main/104/applier/replicator@192.168.0. I> remote master is 1.7.4 at 192.168.0.101:3301 - 2017-06-14 14:35:43.709 [18953] main/101/master.lua I> initializing an empty data directory - 2017-06-14 14:35:43.721 [18953] snapshot/101/main I> saving snapshot `/var/lib/tarantool/master/00000000000000000000.snap.inprogress' - 2017-06-14 14:35:43.722 [18953] snapshot/101/main I> done - 2017-06-14 14:35:43.723 [18953] main/101/master.lua I> vinyl checkpoint done - 2017-06-14 14:35:43.723 [18953] main/101/master.lua I> ready to accept requests - 2017-06-14 14:35:43.724 [18953] main/105/applier/replicator@192.168.0. I> failed to authenticate - 2017-06-14 14:35:43.724 [18953] main/105/applier/replicator@192.168.0. xrow.cc:431 E> ER_LOADING: Instance bootstrap hasn't finished yet - box.once executed on master - 2017-06-14 14:35:43.726 [18953] main C> entering the event loop - 2017-06-14 14:35:43.779 [18953] main/103/main I> initial data sent. - 2017-06-14 14:35:43.780 [18953] relay/[::ffff:192.168.0.101]:/101/main I> recover from `/var/lib/tarantool/master/00000000000000000000.xlog' - 2017-06-14 14:35:43.780 [18953] main/103/main I> final data sent. - 2017-06-14 14:35:43.796 [18953] relay/[::ffff:192.168.0.102]:/101/main I> recover from `/var/lib/tarantool/master/00000000000000000000.xlog' - 2017-06-14 14:35:44.726 [18953] main/105/applier/replicator@192.168.0. I> authenticated - -In this case, the replica would wait for the master to become available, so the -launch order doesn't matter. Our ``box.once()`` logic would also be executed -only once, at the master. - -.. code-block:: console - - $ # the replica has eventually connected to the master - $ # and got bootstrapped (from the replica's log) - 2017-06-14 14:35:43.777 [18952] main/104/applier/replicator@192.168.0. I> remote master is 1.7.4 at 192.168.0.101:3301 - 2017-06-14 14:35:43.777 [18952] main/104/applier/replicator@192.168.0. I> authenticated - 2017-06-14 14:35:43.777 [18952] main/101/replica.lua I> bootstrapping replica from 192.168.0.199:3310 - 2017-06-14 14:35:43.788 [18952] main/104/applier/replicator@192.168.0. I> initial data received - 2017-06-14 14:35:43.789 [18952] main/104/applier/replicator@192.168.0. I> final data received - 2017-06-14 14:35:43.793 [18952] snapshot/101/main I> saving snapshot `/var/lib/tarantool/replica/00000000000000000005.snap.inprogress' - 2017-06-14 14:35:43.793 [18952] snapshot/101/main I> done - 2017-06-14 14:35:43.795 [18952] main/101/replica.lua I> vinyl checkpoint done - 2017-06-14 14:35:43.795 [18952] main/101/replica.lua I> ready to accept requests - 2017-06-14 14:35:43.795 [18952] main/101/replica.lua I> set 'read_only' configuration option to true - 2017-06-14 14:35:43.795 [18952] main C> entering the event loop .. _replication-controlled_failover: -Controlled failover -------------------- +Performing manual failover +-------------------------- + +This section shows how to perform manual failover and change a replica set leader. + +.. _replication-controlled_failover_read_only: + +Switching instances to read-only mode +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. In the ``config.yaml`` file, change the replica set leader from ``instance001`` to ``null``: + + .. code-block:: yaml + + replicaset001: + leader: null + +2. Reload configurations on all three instances using :ref:`config:reload() ` and check that instances are in read-only mode. + The example below shows how to do this for ``instance001``: + + .. code-block:: console + + manual_leader:instance001> require('config'):reload() + --- + ... + manual_leader:instance001> box.info.ro + --- + - true + ... + manual_leader:instance001> box.info.ro_reason + --- + - config + ... + + +3. Make sure that :ref:`box.info.vclock ` values are the same on all instances: + + - ``instance001``: + + .. code-block:: console + + manual_leader:instance001> box.info.vclock + --- + - {1: 21} + ... + + - ``instance002``: + + .. code-block:: console + + manual_leader:instance002> box.info.vclock + --- + - {1: 21} + ... + + + - ``instance003``: + + .. code-block:: console + + manual_leader:instance003> box.info.vclock + --- + - {1: 21} + ... + + +.. _replication-controlled_failover_new_leader: + +Configuring a new leader +~~~~~~~~~~~~~~~~~~~~~~~~ + +1. Change a replica set leader in ``config.yaml`` to ``instance002``: + + .. code-block:: yaml + + replicaset001: + leader: instance002 + +2. Reload configuration on all instances using :ref:`config:reload() `. + +3. Make sure that ``instance002`` is a new master: + + .. code-block:: console + + manual_leader:instance002> box.info.ro + --- + - false + ... + +4. Check replication status using ``box.info.replication``. + + +.. _replication-remove_instances: + +Removing instances +------------------ + +This section describes the process of removing an instance from a replica set. + +Before removing an instance, make sure it is in read-only mode. +If the instance is a master, perform :ref:`manual failover `. + +.. _replication-remove_instances-disconnect: + +Disconnecting an instance +~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. Clear the ``iproto`` option for ``instance003`` by setting its value to ``{}``: + + .. code-block:: yaml + + instance003: + iproto: {} + +2. Reload configurations on ``instance001`` and ``instance002``: + + - ``instance001``: + + .. code-block:: console + + manual_leader:instance001> require('config'):reload() + --- + ... + + - ``instance002``: + + .. code-block:: console + + manual_leader:instance002> require('config'):reload() + --- + ... + +3. Check that the ``upstream`` section is missing for ``instance003`` by executing ``box.info.replication[3]``: + + .. code-block:: console + + manual_leader:instance001> box.info.replication[3] + --- + - id: 3 + uuid: 9a3a1b9b-8a18-baf6-00b3-a6e5e11fd8b6 + lsn: 0 + downstream: + status: follow + idle: 0.4588760000006 + vclock: {1: 21} + lag: 0 + name: instance003 + ... + + +.. _replication-remove_instances-stop: + +Stopping an instance +~~~~~~~~~~~~~~~~~~~~ + +1. Stop ``instance003`` using the :ref:`tt stop ` command: + + .. code-block:: console + + $ tt stop manual_leader:instance003 + • The Instance manual_leader:instance003 (PID = 15551) has been terminated. + + +2. Check that ``downstream.status`` is ``stopped`` for ``instance003``: + + .. code-block:: console + + manual_leader:instance001> box.info.replication[3] + --- + - id: 3 + uuid: 9a3a1b9b-8a18-baf6-00b3-a6e5e11fd8b6 + lsn: 0 + downstream: + status: stopped + message: 'unexpected EOF when reading from socket, called on fd 27, aka 127.0.0.1:3301, + peer of 127.0.0.1:54185: Broken pipe' + system_message: Broken pipe + name: instance003 + ... + + +.. _replication-remove_instances-update-config: + +Removing an instance from the configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. Remove ``instance003`` from the ``instances.yml`` file: + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/manual_leader/instances.yml + :language: yaml + :end-at: instance002 + :dedent: + +2. Remove ``instance003`` from ``config.yaml``: + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/manual_leader/config.yaml + :language: yaml + :start-at: instances + :end-at: listen: 127.0.0.1:3302 + :dedent: + +3. Reload configurations on ``instance001`` and ``instance002``: + + - ``instance001``: + + .. code-block:: console + + manual_leader:instance001> require('config'):reload() + --- + ... + + - ``instance002``: + + .. code-block:: console + + manual_leader:instance002> require('config'):reload() + --- + ... + + +.. _replication-remove_instances-remove_cluster: + +Removing an instance from the '_cluster' space +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To remove an instance from the replica set permanently, it should be removed from the :ref:`box.space._cluster ` system space: + +1. Select all the tuples in the ``box.space._cluster`` system space: + + .. code-block:: console + + manual_leader:instance002> box.space._cluster:select{} + --- + - - [1, '9bb111c2-3ff5-36a7-00f4-2b9a573ea660', 'instance001'] + - [2, '4cfa6e3c-625e-b027-00a7-29b2f2182f23', 'instance002'] + - [3, '9a3a1b9b-8a18-baf6-00b3-a6e5e11fd8b6', 'instance003'] + ... + +2. Delete a tuple corresponding to ``instance003``: + + .. code-block:: console + + manual_leader:instance002> box.space._cluster:delete(3) + --- + - [3, '9a3a1b9b-8a18-baf6-00b3-a6e5e11fd8b6', 'instance003'] + ... -To perform a **controlled failover**, that is, swap the roles of the master and -replica, all we need to do is to set ``read_only=true`` at the master, and -``read_only=false`` at the replica. The order of actions is important here. -If a system is running in production, we do not want concurrent writes happening -both at the replica and the master. Nor do we want the new replica to accept -any writes until it has finished fetching all replication data from the old -master. To compare replica and master state, we can use -:ref:`box.info.signature `. +3. Execute ``box.info.replication`` to check the health status: -1. Set ``read_only=true`` at the master. + .. code-block:: console - .. code-block:: tarantoolsession - - # at the master - tarantool> box.cfg{read_only=true} - -2. Record the master’s current position with ``box.info.signature``, containing - the sum of all LSNs in the master’s vector clock. - - .. code-block:: tarantoolsession - - # at the master - tarantool> box.info.signature - -3. Wait until the replica’s signature is the same as the master’s. - - .. code-block:: tarantoolsession - - # at the replica - tarantool> box.info.signature - -4. Set ``read_only=false`` at the replica to enable write operations. - - .. code-block:: tarantoolsession - - # at the replica - tarantool> box.cfg{read_only=false} - -These four steps ensure that the replica doesn’t accept new writes until it’s done -fetching writes from the master. - -.. _replication-master_master_bootstrap: - -Master-master bootstrap ------------------------ - -Now let us bootstrap a two-instance **master-master** set. For easier -administration, we make master#1 and master#2 instance files fully identical. - -.. image:: mm-2m-mesh.png - :align: center - -We re-use the master's instance file from the -:ref:`master-replica example ` above. - -.. code-block:: lua - - -- instance file for any of the two masters - box.cfg{ - listen = 3301, - replication = {'replicator:password@192.168.0.101:3301', -- master1 URI - 'replicator:password@192.168.0.102:3301'}, -- master2 URI - read_only = false - } - box.once("schema", function() - box.schema.user.create('replicator', {password = 'password'}) - box.schema.user.grant('replicator', 'replication') -- grant replication role - box.schema.space.create("test") - box.space.test:create_index("primary") - print('box.once executed on master #1') - end) - -In the :ref:`replication ` parameter, we define the -URIs of both masters in the replica set and say -``print('box.once executed on master #1')`` so it will be clear when and where the -``box.once()`` logic is executed. - -Now we can launch the two masters. Again, the launch order doesn't matter. -The ``box.once()`` logic will also be executed only once, at the master which -is elected as the replica set :ref:`leader ` at bootstrap. - -.. code-block:: console - - $ # launching master #1 - $ tarantool master1.lua - 2017-06-14 15:39:03.062 [47021] main/101/master1.lua C> version 1.7.4-52-g980d30092 - 2017-06-14 15:39:03.062 [47021] main/101/master1.lua C> log level 5 - 2017-06-14 15:39:03.063 [47021] main/101/master1.lua I> mapping 268435456 bytes for tuple arena... - 2017-06-14 15:39:03.065 [47021] iproto/101/main I> binary: bound to [::]:3301 - 2017-06-14 15:39:03.065 [47021] main/105/applier/replicator@192.168.0.10 I> can't connect to master - 2017-06-14 15:39:03.065 [47021] main/105/applier/replicator@192.168.0.10 coio.cc:107 !> SystemError connect, called on fd 14, aka 192.168.0.102:57110: Connection refused - 2017-06-14 15:39:03.065 [47021] main/105/applier/replicator@192.168.0.10 I> will retry every 1 second - 2017-06-14 15:39:03.065 [47021] main/104/applier/replicator@192.168.0.10 I> remote master is 1.7.4 at 192.168.0.101:3301 - 2017-06-14 15:39:08.070 [47021] main/105/applier/replicator@192.168.0.10 I> remote master is 1.7.4 at 192.168.0.102:3301 - 2017-06-14 15:39:08.071 [47021] main/105/applier/replicator@192.168.0.10 I> authenticated - 2017-06-14 15:39:08.071 [47021] main/101/master1.lua I> bootstrapping replica from 192.168.0.102:3301 - 2017-06-14 15:39:08.073 [47021] main/105/applier/replicator@192.168.0.10 I> initial data received - 2017-06-14 15:39:08.074 [47021] main/105/applier/replicator@192.168.0.10 I> final data received - 2017-06-14 15:39:08.074 [47021] snapshot/101/main I> saving snapshot `/Users/e.shebunyaeva/work/tarantool-test-repl/master1_dir/00000000000000000008.snap.inprogress' - 2017-06-14 15:39:08.074 [47021] snapshot/101/main I> done - 2017-06-14 15:39:08.076 [47021] main/101/master1.lua I> vinyl checkpoint done - 2017-06-14 15:39:08.076 [47021] main/101/master1.lua I> ready to accept requests - box.once executed on master #1 - 2017-06-14 15:39:08.077 [47021] main C> entering the event loop - -.. code-block:: console - - $ # launching master #2 - $ tarantool master2.lua - 2017-06-14 15:39:07.452 [47022] main/101/master2.lua C> version 1.7.4-52-g980d30092 - 2017-06-14 15:39:07.453 [47022] main/101/master2.lua C> log level 5 - 2017-06-14 15:39:07.453 [47022] main/101/master2.lua I> mapping 268435456 bytes for tuple arena... - 2017-06-14 15:39:07.455 [47022] iproto/101/main I> binary: bound to [::]:3301 - 2017-06-14 15:39:07.455 [47022] main/104/applier/replicator@192.168.0.19 I> remote master is 1.7.4 at 192.168.0.101:3301 - 2017-06-14 15:39:07.455 [47022] main/105/applier/replicator@192.168.0.10 I> remote master is 1.7.4 at 192.168.0.102:3301 - 2017-06-14 15:39:07.455 [47022] main/101/master2.lua I> initializing an empty data directory - 2017-06-14 15:39:07.457 [47022] snapshot/101/main I> saving snapshot `/Users/e.shebunyaeva/work/tarantool-test-repl/master2_dir/00000000000000000000.snap.inprogress' - 2017-06-14 15:39:07.457 [47022] snapshot/101/main I> done - 2017-06-14 15:39:07.458 [47022] main/101/master2.lua I> vinyl checkpoint done - 2017-06-14 15:39:07.459 [47022] main/101/master2.lua I> ready to accept requests - 2017-06-14 15:39:07.460 [47022] main C> entering the event loop - 2017-06-14 15:39:08.072 [47022] main/103/main I> initial data sent. - 2017-06-14 15:39:08.073 [47022] relay/[::ffff:192.168.0.102]:/101/main I> recover from `/Users/e.shebunyaeva/work/tarantool-test-repl/master2_dir/00000000000000000000.xlog' - 2017-06-14 15:39:08.073 [47022] main/103/main I> final data sent. - 2017-06-14 15:39:08.077 [47022] relay/[::ffff:192.168.0.102]:/101/main I> recover from `/Users/e.shebunyaeva/work/tarantool-test-repl/master2_dir/00000000000000000000.xlog' - 2017-06-14 15:39:08.461 [47022] main/104/applier/replicator@192.168.0.10 I> authenticated + manual_leader:instance002> box.info.replication + --- + - 1: + id: 1 + uuid: 9bb111c2-3ff5-36a7-00f4-2b9a573ea660 + lsn: 21 + upstream: + status: follow + idle: 0.73316000000159 + peer: replicator@127.0.0.1:3301 + lag: 0.00016212463378906 + name: instance001 + downstream: + status: follow + idle: 0.7269320000014 + vclock: {2: 1, 1: 21} + lag: 0.00083398818969727 + 2: + id: 2 + uuid: 4cfa6e3c-625e-b027-00a7-29b2f2182f23 + lsn: 1 + name: instance002 + ... diff --git a/doc/how-to/replication/repl_bootstrap_auto.rst b/doc/how-to/replication/repl_bootstrap_auto.rst new file mode 100644 index 0000000000..ca80287eb6 --- /dev/null +++ b/doc/how-to/replication/repl_bootstrap_auto.rst @@ -0,0 +1,439 @@ +.. _replication-bootstrap-auto: + +Master-replica: automated failover +================================== + +**Example on GitHub**: `auto_leader `_ + +This tutorial shows how to configure and work with a replica set with automated failover. + + +.. _replication-automated-failover-tt-env: + +Prerequisites +------------- + +Before starting this tutorial: + +1. Install the :ref:`tt ` utility. + +2. Create a tt environment in the current directory by executing the :ref:`tt init ` command. + +3. Inside the ``instances.enabled`` directory of the created tt environment, create the ``auto_leader`` directory. + +4. Inside ``instances.enabled/auto_leader``, create the ``instances.yml`` and ``config.yaml`` files: + + - ``instances.yml`` specifies instances to :ref:`run ` in the current environment and should look like this: + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/auto_leader/instances.yml + :language: yaml + :dedent: + + - The ``config.yaml`` file is intended to store a :ref:`replica set configuration `. + + + + +.. _replication-automated-failover-configure-cluster: + +Configuring a replica set +------------------------- + +This section describes how to configure a replica set in ``config.yaml``. + +.. _replication-automated-failover_configuring_failover_mode: + +Step 1: Configuring a failover mode +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +First, set the :ref:`replication.failover ` option to ``election``: + +.. literalinclude:: /code_snippets/snippets/replication/instances.enabled/auto_leader/config.yaml + :language: yaml + :start-at: replication: + :end-at: failover: election + :dedent: + +.. _replication-automated-failover_configuring_topology: + +Step 2: Defining a replica set topology +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Define a replica set topology inside the :ref:`groups ` section. +The :ref:`iproto.listen ` option specifies an address used to listen for incoming requests and allows replicas to communicate with each other. + +.. literalinclude:: /code_snippets/snippets/replication/instances.enabled/auto_leader/config.yaml + :language: yaml + :start-at: groups: + :end-at: listen: 127.0.0.1:3303 + :dedent: + + +.. _replication-automated-failover_configuring_credentials: + +Step 3: Creating a user for replication +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In the :ref:`credentials ` section, create the ``replicator`` user with the ``replication`` role: + +.. literalinclude:: /code_snippets/snippets/replication/instances.enabled/auto_leader/config.yaml + :language: yaml + :start-at: credentials: + :end-at: roles: [replication] + :dedent: + + +.. _replication-automated-failover_configuring_advertise: + +Step 4: Specifying advertise URIs +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Set :ref:`iproto.advertise.peer ` to advertise the current instance to other replica set members: + +.. literalinclude:: /code_snippets/snippets/replication/instances.enabled/auto_leader/config.yaml + :language: yaml + :start-at: iproto: + :end-at: peer: replicator@ + :dedent: + +.. _replication-automated-failover_configuring_result: + +Resulting configuration +~~~~~~~~~~~~~~~~~~~~~~~ + +The resulting replica set configuration should look as follows: + +.. literalinclude:: /code_snippets/snippets/replication/instances.enabled/auto_leader/config.yaml + :language: yaml + :end-at: listen: 127.0.0.1:3303 + :dedent: + + + + +.. _replication-automated-failover-work: + +Working with a replica set +-------------------------- + +.. _replication-automated-failover-start-instances: + +Starting instances +~~~~~~~~~~~~~~~~~~ + +1. After configuring a replica set, execute the :ref:`tt start ` command from the :ref:`tt environment directory `: + + .. code-block:: console + + $ tt start auto_leader + • Starting an instance [auto_leader:instance001]... + • Starting an instance [auto_leader:instance002]... + • Starting an instance [auto_leader:instance003]... + +2. Check that instances are in the ``RUNNING`` status using the :ref:`tt status ` command: + + .. code-block:: console + + $ tt status auto_leader + INSTANCE STATUS PID + auto_leader:instance001 RUNNING 24768 + auto_leader:instance002 RUNNING 24769 + auto_leader:instance003 RUNNING 24767 + + + +.. _replication-automated-failover-work-status: + +Checking a replica set status +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. Connect to ``instance001`` using :ref:`tt connect `: + + .. code-block:: console + + $ tt connect auto_leader:instance001 + • Connecting to the instance... + • Connected to auto_leader:instance001 + +2. Check the instance state in regard to :ref:`leader election ` using :ref:`box.info.election `. + The output below shows that ``instance001`` is a follower while ``instance002`` is a replica set leader. + + .. code-block:: console + + auto_leader:instance001> box.info.election + --- + - leader_idle: 0.77491499999815 + leader_name: instance002 + state: follower + vote: 0 + term: 2 + leader: 1 + ... + +3. Check that ``instance001`` is in read-only mode using ``box.info.ro``: + + .. code-block:: console + + auto_leader:instance001> box.info.ro + --- + - true + ... + +4. Execute ``box.info.replication`` to check a replica set status. + Make sure that ``upstream.status`` and ``downstream.status`` are ``follow`` for ``instance002`` and ``instance003``. + + .. code-block:: console + + auto_leader:instance001> box.info.replication + --- + - 1: + id: 1 + uuid: 4cfa6e3c-625e-b027-00a7-29b2f2182f23 + lsn: 9 + upstream: + status: follow + idle: 0.8257709999998 + peer: replicator@127.0.0.1:3302 + lag: 0.00012326240539551 + name: instance002 + downstream: + status: follow + idle: 0.81174199999805 + vclock: {1: 9} + lag: 0 + 2: + id: 2 + uuid: 9bb111c2-3ff5-36a7-00f4-2b9a573ea660 + lsn: 0 + name: instance001 + 3: + id: 3 + uuid: 9a3a1b9b-8a18-baf6-00b3-a6e5e11fd8b6 + lsn: 0 + upstream: + status: follow + idle: 0.83125499999733 + peer: replicator@127.0.0.1:3303 + lag: 0.00010204315185547 + name: instance003 + downstream: + status: follow + idle: 0.83213399999659 + vclock: {1: 9} + lag: 0 + ... + + +.. _replication-automated-failover-add-data: + +Adding data +~~~~~~~~~~~ + +To check that replicas (``instance001`` and ``instance003``) get all updates from the master (``instance002``), follow the steps below: + +1. Connect to ``instance002`` using ``tt connect``: + + .. code-block:: console + + $ tt connect auto_leader:instance002 + • Connecting to the instance... + • Connected to auto_leader:instance002 + +2. Create a space and add data as described in :ref:`CRUD operation examples `. + +3. Use the ``select`` operation on ``instance001`` and ``instance003`` to make sure data is replicated. + +4. Check that the ``1`` component of :ref:`box.info.vclock ` values are the same on all instances: + + - ``instance001``: + + .. code-block:: console + + auto_leader:instance001> box.info.vclock + --- + - {0: 1, 1: 32} + ... + + - ``instance002``: + + .. code-block:: console + + auto_leader:instance002> box.info.vclock + --- + - {0: 1, 1: 32} + ... + + - ``instance003``: + + .. code-block:: console + + auto_leader:instance003> box.info.vclock + --- + - {0: 1, 1: 32} + ... + +.. include:: /how-to/replication/repl_bootstrap.rst + :start-after: vclock_0th_component_note_start + :end-before: vclock_0th_component_note_end + + + +.. _replication-automated-failover-testing: + +Testing automated failover +-------------------------- + +To test how automated failover works if the current master is stopped, follow the steps below: + +1. Stop the current master instance (``instance002``) using the ``tt stop`` command: + + .. code-block:: console + + $ tt stop auto_leader:instance002 + • The Instance auto_leader:instance002 (PID = 24769) has been terminated. + + +2. On ``instance001``, check ``box.info.election``. + In this example, a new replica set leader is ``instance001``. + + .. code-block:: console + + auto_leader:instance001> box.info.election + --- + - leader_idle: 0 + leader_name: instance001 + state: leader + vote: 2 + term: 3 + leader: 2 + ... + +3. Check replication status using ``box.info.replication`` for ``instance002``: + + - ``upstream.status`` is ``disconnected``. + - ``downstream.status`` is ``stopped``. + + .. code-block:: console + + auto_leader:instance001> box.info.replication + --- + - 1: + id: 1 + uuid: 4cfa6e3c-625e-b027-00a7-29b2f2182f23 + lsn: 32 + upstream: + peer: replicator@127.0.0.1:3302 + lag: 0.00032305717468262 + status: disconnected + idle: 48.352504000002 + message: 'connect, called on fd 20, aka 127.0.0.1:62575: Connection refused' + system_message: Connection refused + name: instance002 + downstream: + status: stopped + message: 'unexpected EOF when reading from socket, called on fd 32, aka 127.0.0.1:3301, + peer of 127.0.0.1:62204: Broken pipe' + system_message: Broken pipe + 2: + id: 2 + uuid: 9bb111c2-3ff5-36a7-00f4-2b9a573ea660 + lsn: 1 + name: instance001 + 3: + id: 3 + uuid: 9a3a1b9b-8a18-baf6-00b3-a6e5e11fd8b6 + lsn: 0 + upstream: + status: follow + idle: 0.18620999999985 + peer: replicator@127.0.0.1:3303 + lag: 0.00012516975402832 + name: instance003 + downstream: + status: follow + idle: 0.19718099999955 + vclock: {2: 1, 1: 32} + lag: 0.00051403045654297 + ... + + +4. Start ``instance002`` back using ``tt start``: + + .. code-block:: console + + $ tt start auto_leader:instance002 + • Starting an instance [auto_leader:instance002]... + + +.. _replication-automated-failover-new-leader: + +Choosing a leader manually +-------------------------- + +1. Make sure that :ref:`box.info.vclock ` values (except the ``0`` components) are the same on all instances: + + - ``instance001``: + + .. code-block:: console + + auto_leader:instance001> box.info.vclock + --- + - {0: 2, 1: 32, 2: 1} + ... + + - ``instance002``: + + .. code-block:: console + + auto_leader:instance002> box.info.vclock + --- + - {0: 2, 1: 32, 2: 1} + ... + + + - ``instance003``: + + .. code-block:: console + + auto_leader:instance003> box.info.vclock + --- + - {0: 3, 1: 32, 2: 1} + ... + +2. On ``instance002``, run :ref:`box.ctl.promote() ` to choose it as a new replica set leader: + + .. code-block:: console + + auto_leader:instance002> box.ctl.promote() + --- + ... + +3. Check ``box.info.election`` to make sure ``instance002`` is a leader now: + + .. code-block:: console + + auto_leader:instance002> box.info.election + --- + - leader_idle: 0 + leader_name: instance002 + state: leader + vote: 1 + term: 4 + leader: 1 + ... + + + +.. _replication-automated-failover-add-remove-instances: + +Adding and removing instances +----------------------------- + +The process of adding instances to a replica set and removing them is similar for all failover modes. +Learn how to do this from the :ref:`Master-replica: manual failover ` tutorial: + +- :ref:`Adding instances ` +- :ref:`Removing instances ` + +Before removing an instance from a replica set with :ref:`replication.failover ` set to ``election``, make sure this instance is in read-only mode. +If the instance is a master, choose a :ref:`new leader manually `. diff --git a/doc/how-to/replication/repl_bootstrap_master_master.rst b/doc/how-to/replication/repl_bootstrap_master_master.rst new file mode 100644 index 0000000000..677ae52cb7 --- /dev/null +++ b/doc/how-to/replication/repl_bootstrap_master_master.rst @@ -0,0 +1,557 @@ +.. _replication-bootstrap-master-master: + +Master-master +============= + +**Example on GitHub**: `master_master `_ + +This tutorial shows how to configure and work with a master-master replica set. + + +.. _replication-master-master-tt-env: + +Prerequisites +------------- + +Before starting this tutorial: + +1. Install the :ref:`tt ` utility. + +2. Create a tt environment in the current directory by executing the :ref:`tt init ` command. + +3. Inside the ``instances.enabled`` directory of the created tt environment, create the ``master_master`` directory. + +4. Inside ``instances.enabled/master_master``, create the ``instances.yml`` and ``config.yaml`` files: + + - ``instances.yml`` specifies instances to :ref:`run ` in the current environment and should look like this: + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/master_master/instances.yml + :language: yaml + :end-at: instance002: + :dedent: + + - The ``config.yaml`` file is intended to store a :ref:`replica set configuration `. + + + + +.. _replication-master-master-configure-cluster: + +Configuring a replica set +------------------------- + +This section describes how to configure a replica set in ``config.yaml``. + + +.. _replication-master-master-configure-failover_mode: + +Step 1: Configuring a failover mode +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +First, set the :ref:`replication.failover ` option to ``off``: + +.. literalinclude:: /code_snippets/snippets/replication/instances.enabled/master_master/config.yaml + :language: yaml + :start-at: replication: + :end-at: failover: off + :dedent: + + + +.. _replication-master-master-configure-topology: + +Step 2: Defining a replica set topology +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Define a replica set topology inside the :ref:`groups ` section: + +- The ``database.mode`` option should be set to ``rw`` to make instances work in read-write mode. +- The :ref:`iproto.listen ` option specifies an address used to listen for incoming requests and allows replicas to communicate with each other. + +.. literalinclude:: /code_snippets/snippets/replication/instances.enabled/master_master/config.yaml + :language: yaml + :start-at: groups: + :end-at: listen: 127.0.0.1:3302 + :dedent: + + +.. _replication-master-master-configure_credentials: + +Step 3: Creating a user for replication +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In the :ref:`credentials ` section, create the ``replicator`` user with the ``replication`` role: + +.. literalinclude:: /code_snippets/snippets/replication/instances.enabled/master_master/config.yaml + :language: yaml + :start-at: credentials: + :end-at: roles: [replication] + :dedent: + + +.. _replication-master-master-configure_advertise: + +Step 4: Specifying advertise URIs +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Set :ref:`iproto.advertise.peer ` to advertise the current instance to other replica set members: + +.. literalinclude:: /code_snippets/snippets/replication/instances.enabled/master_master/config.yaml + :language: yaml + :start-at: iproto: + :end-at: peer: replicator@ + :dedent: + + +.. _replication-master-master-configure_result: + +Resulting configuration +~~~~~~~~~~~~~~~~~~~~~~~ + +The resulting replica set configuration should look as follows: + +.. literalinclude:: /code_snippets/snippets/replication/instances.enabled/master_master/config.yaml + :language: yaml + :end-at: listen: 127.0.0.1:3302 + :dedent: + + + + +.. _replication-master-master-work: + +Working with a replica set +-------------------------- + +.. _replication-master-master-start-instances: + +Starting instances +~~~~~~~~~~~~~~~~~~ + +1. After configuring a replica set, execute the :ref:`tt start ` command from the :ref:`tt environment directory `: + + .. code-block:: console + + $ tt start master_master + • Starting an instance [master_master:instance001]... + • Starting an instance [master_master:instance002]... + +2. Check that instances are in the ``RUNNING`` status using the :ref:`tt status ` command: + + .. code-block:: console + + $ tt status master_master + INSTANCE STATUS PID + master_master:instance001 RUNNING 30818 + master_master:instance002 RUNNING 30819 + + +.. _replication-master-master-check-status: + +Checking a replica set status +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. Connect to both instances using :ref:`tt connect `. + Below is the example for ``instance001``: + + .. code-block:: console + + $ tt connect master_master:instance001 + • Connecting to the instance... + • Connected to master_master:instance001 + +2. Check that both instances are writable using ``box.info.ro``: + + - ``instance001``: + + .. code-block:: console + + master_master:instance001> box.info.ro + --- + - false + ... + + - ``instance002``: + + .. code-block:: console + + master_master:instance002> box.info.ro + --- + - false + ... + +3. Execute ``box.info.replication`` to check a replica set status. + For ``instance002``, ``upstream.status`` and ``downstream.status`` should be ``follow``. + + .. code-block:: console + + master_master:instance001> box.info.replication + --- + - 1: + id: 1 + uuid: 4cfa6e3c-625e-b027-00a7-29b2f2182f23 + lsn: 7 + upstream: + status: follow + idle: 0.21281599999929 + peer: replicator@127.0.0.1:3302 + lag: 0.00031614303588867 + name: instance002 + downstream: + status: follow + idle: 0.21800899999653 + vclock: {1: 7} + lag: 0 + 2: + id: 2 + uuid: 9bb111c2-3ff5-36a7-00f4-2b9a573ea660 + lsn: 0 + name: instance001 + ... + +.. include:: /how-to/replication/repl_bootstrap.rst + :start-after: vclock_0th_component_note_start + :end-before: vclock_0th_component_note_end + + + + +.. _replication-master-master-add-data: + +Adding data +~~~~~~~~~~~ + +To check that both instances get updates from each other, follow the steps below: + +1. On ``instance001``, create a space, format it, and create a primary index: + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/master_master/myapp.lua + :start-at: box.schema.space.create + :end-at: box.space.bands:create_index + :language: lua + :dedent: + + Then, add sample data to this space: + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/master_master/myapp.lua + :start-at: Roxette + :end-at: Scorpions + :language: lua + :dedent: + +2. On ``instance002``, use the ``select`` operation to make sure data is replicated: + + .. code-block:: console + + master_master:instance002> box.space.bands:select() + --- + - - [1, 'Roxette', 1986] + - [2, 'Scorpions', 1965] + ... + +3. Add more data to the created space on ``instance002``: + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/master_master/myapp.lua + :start-at: Ace of Base + :end-at: The Beatles + :language: lua + :dedent: + +4. Get back to ``instance001`` and use ``select`` to make sure new records are replicated. + +5. Check that :ref:`box.info.vclock ` values are the same on both instances: + + - ``instance001``: + + .. code-block:: console + + master_master:instance001> box.info.vclock + --- + - {2: 5, 1: 9} + ... + + - ``instance002``: + + .. code-block:: console + + master_master:instance002> box.info.vclock + --- + - {2: 5, 1: 9} + ... + + + +.. _replication-master-master-resolve-conflicts: + +Resolving replication conflicts +------------------------------- + +.. NOTE:: + + To learn how to fix and prevent replication conflicts using trigger functions, see :ref:`Resolving replication conflicts `. + +.. _replication-master-master_conflicting_records: + +Inserting conflicting records +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To insert conflicting records to ``instance001`` and ``instance002``, follow the steps below: + +1. Stop ``instance001`` using the ``tt stop`` command: + + .. code-block:: console + + $ tt stop master_master:instance001 + +2. On ``instance002``, insert a new record: + + .. code-block:: lua + + box.space.bands:insert { 5, 'incorrect data', 0 } + +3. Stop ``instance002`` using ``tt stop``: + + .. code-block:: console + + $ tt stop master_master:instance002 + +4. Start ``instance001`` back: + + .. code-block:: lua + + $ tt start master_master:instance001 + +5. Connect to ``instance001`` and insert a record that should conflict with a record already inserted on ``instance002``: + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/master_master/myapp.lua + :start-at: Pink Floyd + :end-at: Pink Floyd + :language: lua + :dedent: + +6. Start ``instance002`` back: + + .. code-block:: console + + $ tt start master_master:instance002 + + Then, check ``box.info.replication`` on ``instance001``. + ``upstream.status`` should be ``stopped`` because of the ``Duplicate key exists`` error: + + .. code-block:: console + + master_master:instance001> box.info.replication + --- + - 1: + id: 1 + uuid: 4cfa6e3c-625e-b027-00a7-29b2f2182f23 + lsn: 9 + upstream: + peer: replicator@127.0.0.1:3302 + lag: 143.52251672745 + status: stopped + idle: 3.9462469999999 + message: Duplicate key exists in unique index "primary" in space "bands" with + old tuple - [5, "Pink Floyd", 1965] and new tuple - [5, "incorrect data", 0] + name: instance002 + downstream: + status: stopped + message: 'unexpected EOF when reading from socket, called on fd 12, aka 127.0.0.1:3301, + peer of 127.0.0.1:59258: Broken pipe' + system_message: Broken pipe + 2: + id: 2 + uuid: 9bb111c2-3ff5-36a7-00f4-2b9a573ea660 + lsn: 6 + name: instance001 + ... + + +.. _replication-master-master-reseed-replica: + +Reseeding a replica +~~~~~~~~~~~~~~~~~~~ + +To resolve a replication conflict, ``instance002`` should get the correct data from ``instance001`` first. +To achieve this, ``instance002`` should be rebootstrapped: + +1. In the ``config.yaml`` file, change ``database.mode`` of ``instance002`` to ``ro``: + + .. code-block:: yaml + + instance002: + database: + mode: ro + +2. Reload configurations on both instances using the ``reload()`` function provided by the :ref:`config ` module: + + - ``instance001``: + + .. code-block:: console + + master_master:instance001> require('config'):reload() + --- + ... + + - ``instance002``: + + .. code-block:: console + + master_master:instance002> require('config'):reload() + --- + ... + +3. Delete write-ahead logs and snapshots stored in the ``var/lib/instance002`` directory. + + .. NOTE:: + + ``var/lib`` is the default directory used by tt to store write-ahead logs and snapshots. + Learn more from :ref:`Configuration `. + +4. Restart ``instance002`` using the :ref:`tt restart ` command: + + .. code-block:: console + + $ tt restart master_master:instance002 + +5. Connect to ``instance002`` and make sure it received the correct data from ``instance001``: + + .. code-block:: console + + master_master:instance002> box.space.bands:select() + --- + - - [1, 'Roxette', 1986] + - [2, 'Scorpions', 1965] + - [3, 'Ace of Base', 1987] + - [4, 'The Beatles', 1960] + - [5, 'Pink Floyd', 1965] + ... + + +.. _replication-master-master-resolve-conflict: + +Restarting replication +~~~~~~~~~~~~~~~~~~~~~~ + +After :ref:`reseeding a replica `, you need to resolve a replication conflict that keeps replication stopped: + +1. Execute ``box.info.replication`` on ``instance001``. + ``upstream.status`` is still stopped: + + .. code-block:: console + + master_master:instance001> box.info.replication + --- + - 1: + id: 1 + uuid: 4cfa6e3c-625e-b027-00a7-29b2f2182f23 + lsn: 9 + upstream: + peer: replicator@127.0.0.1:3302 + lag: 143.52251672745 + status: stopped + idle: 1309.943383 + message: Duplicate key exists in unique index "primary" in space "bands" with + old tuple - [5, "Pink Floyd", 1965] and new tuple - [5, "incorrect data", + 0] + name: instance002 + downstream: + status: follow + idle: 0.47881799999959 + vclock: {2: 6, 1: 9} + lag: 0 + 2: + id: 2 + uuid: 9bb111c2-3ff5-36a7-00f4-2b9a573ea660 + lsn: 6 + name: instance001 + ... + + +2. In the ``config.yaml`` file, clear the ``iproto`` option for ``instance001`` by setting its value to ``{}`` to disconnect this instance from ``instance002``. + Set ``database.mode`` to ``ro``: + + .. code-block:: yaml + + instance001: + database: + mode: ro + iproto: {} + +3. Reload configuration on ``instance001`` only: + + .. code-block:: console + + master_master:instance001> require('config'):reload() + --- + ... + +4. Change ``database.mode`` values back to ``rw`` for both instances and restore ``iproto.listen`` for ``instance001``: + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/master_master/config.yaml + :language: yaml + :start-at: instance001 + :end-at: listen: 127.0.0.1:3302 + :dedent: + +5. Reload configurations on both instances one more time: + + - ``instance001``: + + .. code-block:: console + + master_master:instance001> require('config'):reload() + --- + ... + + - ``instance002``: + + .. code-block:: console + + master_master:instance002> require('config'):reload() + --- + ... + +6. Check ``box.info.replication``. + ``upstream.status`` be ``follow`` now. + + .. code-block:: console + + master_master:instance001> box.info.replication + --- + - 1: + id: 1 + uuid: 4cfa6e3c-625e-b027-00a7-29b2f2182f23 + lsn: 9 + upstream: + status: follow + idle: 0.21281300000192 + peer: replicator@127.0.0.1:3302 + lag: 0.00031113624572754 + name: instance002 + downstream: + status: follow + idle: 0.035179000002245 + vclock: {2: 6, 1: 9} + lag: 0 + 2: + id: 2 + uuid: 9bb111c2-3ff5-36a7-00f4-2b9a573ea660 + lsn: 6 + name: instance001 + ... + + + +.. _replication-master-master-add-remove-instances: + +Adding and removing instances +----------------------------- + +The process of adding instances to a replica set and removing them is similar for all failover modes. +Learn how to do this from the :ref:`Master-replica: manual failover ` tutorial: + +- :ref:`Adding instances ` +- :ref:`Removing instances ` + +Before removing an instance from a replica set with :ref:`replication.failover ` set to ``off``, make sure this instance is in read-only mode. diff --git a/doc/how-to/replication/repl_leader_elect.rst b/doc/how-to/replication/repl_leader_elect.rst deleted file mode 100644 index 2daca37163..0000000000 --- a/doc/how-to/replication/repl_leader_elect.rst +++ /dev/null @@ -1,114 +0,0 @@ -.. _how-to-repl_leader_elect: - -Managing leader elections -========================= - -Starting from version :doc:`2.6.1 `, -Tarantool has the built-in functionality -managing automated leader election in a replica set. -Learn more about the :ref:`concept of leader election `. - -.. _repl_leader_elect_config: - -Configuration -------------- - -.. code-block:: console - - box.cfg({ - election_mode = , - election_fencing_mode = , - election_timeout = , - replication_timeout = , - replication_synchro_quorum = - }) - -* ``election_mode`` -- specifies the role of a node in the leader election - process. For the details, refer to the :ref:`option description ` - in the configuration reference. -* ``election_fencing_mode`` -- specifies the :ref:`leader fencing mode `. - For the details, refer to the :ref:`option description ` in the configuration reference. -* ``election_timeout`` -- specifies the timeout between election rounds if the - previous round ended up with a split vote. For the details, refer to the - :ref:`option description ` in the configuration - reference. -* ``replication_timeout`` -- reuse of the :ref:`replication_timeout ` - configuration option for the purpose of the leader election process. - Heartbeats sent by an active leader have a timeout after which a new election - starts. Heartbeats are sent once per seconds. - The default value is ``1``. The leader is considered dead if it hasn't sent any - heartbeats for the period of ``replication_timeout * 4``. -* ``replication_synchro_quorum`` -- reuse of the :ref:`replication_synchro_quorum ` - option for the purpose of configuring the election quorum. The default value is ``1``, - meaning that each node becomes a leader immediately after voting for itself. - It is best to set up this option value to the ``( / 2) + 1``. - Otherwise, there is no guarantee that there is only one leader at a time. - -It is important to know that being a leader is not the only requirement for a node to be writable. -The leader should also satisfy the following requirements: - -* The :ref:`read_only ` option is set to ``false``. - -* The leader shouldn't be in the orphan state. - -Nothing prevents you from setting the ``read_only`` option to ``true``, -but the leader just won't be writable then. The option doesn't affect the -election process itself, so a read-only instance can still vote and become -a leader. - -.. _repl_leader_elect_monitoring: - -Monitoring ----------- - -To monitor the current state of a node regarding the leader election, you can -use the ``box.info.election`` function. -For details, -refer to the :doc:`function description `. - -**Example:** - -.. code-block:: console - - tarantool> box.info.election - --- - - state: follower - vote: 0 - leader: 0 - term: 1 - ... - -The Raft-based election implementation logs all its actions -with the ``RAFT:`` prefix. The actions are new Raft message handling, -node state changing, voting, and term bumping. - -.. _repl_leader_elect_important: - -Important notes ---------------- - -Leader election doesn't work correctly if the election quorum is set to less or equal -than `` / 2`` because in that case, a split vote can lead to -a state when two leaders are elected at once. - -For example, suppose there are five nodes. When the quorum is set to ``2``, ``node1`` -and ``node2`` can both vote for ``node1``. ``node3`` and ``node4`` can both vote -for ``node5``. In this case, ``node1`` and ``node5`` both win the election. -When the quorum is set to the cluster majority, that is -``( / 2) + 1`` or greater, the split vote is impossible. - -That should be considered when adding new nodes. -If the majority value is changing, it's better to update the quorum on all the existing nodes -before adding a new one. - -Also, the automated leader election doesn't bring many benefits in terms of data -safety when used *without* :ref:`synchronous replication `. -If the replication is asynchronous and a new leader gets elected, -the old leader is still active and considers itself the leader. -In such case, nothing stops -it from accepting requests from clients and making transactions. -Non-synchronous transactions are successfully committed because -they are not checked against the quorum of replicas. -Synchronous transactions fail because they are not able -to collect the quorum -- most of the replicas reject -these old leader's transactions since it is not a leader anymore. diff --git a/doc/how-to/replication/repl_remove_instances.rst b/doc/how-to/replication/repl_remove_instances.rst deleted file mode 100644 index 4ebd93cc25..0000000000 --- a/doc/how-to/replication/repl_remove_instances.rst +++ /dev/null @@ -1,225 +0,0 @@ -.. _replication-remove_instances: - -Removing instances -================== - -Let's assume that we have the following configured replica set with 3 instances -(*instance1*, *instance2* and *intance3*) and we want to remove *instance2*. - -.. image:: /concepts/replication/images/replication.svg - :align: left - -To remove it politely, follow these steps: - -1. Disconnect *instance2* from the cluster. -2. Disconnect the cluster from *instance2*. -3. Remove *instance2* from the ``_cluster`` space. - -.. image:: replicationX.svg - :align: left - -**Step 1: disconnecting an instance from the cluster** - -On the disconnecting instance *instance2*, run ``box.cfg{}`` -with a blank replication source: - -.. code-block:: tarantoolsession - - tarantool> box.cfg{replication=''} - -Then check that it was disconnected. Take a look at ``box.info.replication`` -on *instance2* (notice that ``replication.{1,3}.upstream`` is absent): - -.. code-block:: tarantoolsession - - tarantool> box.info.replication - --- - - 1: - id: 1 - uuid: db89978f-7115-4537-8417-9982bb5a256f - lsn: 9 - -- upstream is absent - downstream: - status: follow - idle: 0.93983899999876 - vclock: {1: 9} - 2: - id: 2 - uuid: 0a756d14-e437-4296-85b0-d27a0621613e - lsn: 0 - 3: - id: 3 - uuid: bb362584-c265-4e53-aeb6-450ae818bf59 - lsn: 0 - -- upstream is absent - downstream: - status: follow - idle: 0.26624799999991 - vclock: {1: 9} - ... - -Check *instance1* and *instance3* as well -(notice that the status of ``replication.2.downstream`` is ``stopped``): - -.. code-block:: tarantoolsession - - -- instance1 - tarantool> box.info.replication - --- - - 1: - id: 1 - uuid: db89978f-7115-4537-8417-9982bb5a256f - lsn: 9 - 2: - id: 2 - uuid: 0a756d14-e437-4296-85b0-d27a0621613e - lsn: 0 - upstream: - status: follow - idle: 0.3533439999992 - peer: replicator@localhost:3302 - lag: 0.0001220703125 - downstream: - status: stopped -- status has changed: - message: unexpected EOF when reading from socket, called on fd 13, aka [::1]:3301, - peer of [::1]:53776 - system_message: Broken pipe - 3: - id: 3 - uuid: bb362584-c265-4e53-aeb6-450ae818bf59 - lsn: 0 - upstream: - status: follow - idle: 0.35327999999936 - peer: replicator@localhost:3303 - lag: 0.00018095970153809 - downstream: - status: follow - idle: 0.68685100000221 - vclock: {1: 9} - ... - -**Step 2: disconnecting the cluster from the decommissioned instance** - -On every other instance in the cluster remove *instance2* from -the ``box.cfg{ replication }`` list and call an appropriate -``box.cfg{ replication = {instance1, instance3} }``: - -.. code-block:: tarantoolsession - - tarantool> box.cfg{ replication = { 'instance1-uri', 'instance3-uri' } } - -Take a look at ``box.info.replication`` on *instance2* to check that *instance1* and *instance3* were -disconnected -(notice that the status of ``replication.{1,3}.downstream`` is ``stopped``): - -.. code-block:: tarantoolsession - - tarantool> box.info.replication - --- - - 1: - id: 1 - uuid: db89978f-7115-4537-8417-9982bb5a256f - lsn: 9 - downstream: - status: stopped -- status has changed - message: unexpected EOF when reading from socket, called on fd 16, aka [::1]:3302, - peer of [::1]:53832 - system_message: Broken pipe - 2: - id: 2 - uuid: 0a756d14-e437-4296-85b0-d27a0621613e - lsn: 0 - 3: - id: 3 - uuid: bb362584-c265-4e53-aeb6-450ae818bf59 - lsn: 0 - downstream: - status: stopped -- status has changed - message: unexpected EOF when reading from socket, called on fd 18, aka [::1]:3302, - peer of [::1]:53825 - system_message: Broken pipe - ... - -Check *instance1* and *instance3* as well -(notice that the status of ``replication.2.upstream`` is ``stopped``): - -.. code-block:: tarantoolsession - - -- instance1 - tarantool> box.info.replication - --- - - 1: - id: 1 - uuid: db89978f-7115-4537-8417-9982bb5a256f - lsn: 9 - 2: - id: 2 - uuid: 0a756d14-e437-4296-85b0-d27a0621613e - lsn: 0 - downstream: - status: stopped -- status has changed - message: unexpected EOF when reading from socket, called on fd 13, aka [::1]:3301, - peer of [::1]:53776 - system_message: Broken pipe - 3: - id: 3 - uuid: bb362584-c265-4e53-aeb6-450ae818bf59 - lsn: 0 - upstream: - status: follow - idle: 0.50240100000156 - peer: replicator@localhost:3303 - lag: 0.00015711784362793 - downstream: - status: follow - idle: 0.14237199999843 - vclock: {1: 9} - ... - -**Step 3: persistent removal** - -If a removed instance rejoins later, it will receive all the updates made -by the other instances while it was disconnected. - -If an instance is decommissioned forever, we should clean up the ``_cluster`` space. -First, discover the ``id`` and ``uuid`` of the instance. -On *instance2*, call ``return box.info.id, box.info.uuid``: - -.. code-block:: tarantoolsession - - tarantool> return box.info.id, box.info.uuid - --- - - 2 - - '0a756d14-e437-4296-85b0-d27a0621613e' - ... - -Take a note of ``id`` and ``uuid``. - -Now choose any master from the remaining cluster and perform the following actions on it -(let's assume that we chose *instance1*): - -1. Select all records from the ``_cluster`` space: - -.. code-block:: tarantoolsession - - tarantool> box.space._cluster:select{} - --- - - - [1, 'db89978f-7115-4537-8417-9982bb5a256f'] - - [2, '0a756d14-e437-4296-85b0-d27a0621613e'] - - [3, 'bb362584-c265-4e53-aeb6-450ae818bf59'] - ... - -2. Check if the ``id`` and ``uuid`` of *instance2* are correct and remove them - from the cluster: - -.. code-block:: tarantoolsession - - tarantool> box.space._cluster:delete(2) - --- - - [2, '0a756d14-e437-4296-85b0-d27a0621613e'] - ... - -**Final checks** - -After all modifications, say ``box.info.replication`` to check the health status. diff --git a/doc/how-to/replication/repl_sync.rst b/doc/how-to/replication/repl_sync.rst deleted file mode 100644 index 9c89429eff..0000000000 --- a/doc/how-to/replication/repl_sync.rst +++ /dev/null @@ -1,108 +0,0 @@ -.. _how-to-repl_sync: - -Configuring synchronous replication -=================================== - -Since version :doc:`2.5.1 `, -:ref:`synchronous replication ` -can be enabled per-space by using the ``is_sync`` option: - -.. code-block:: lua - - box.schema.create_space('test1', {is_sync = true}) - -Any transaction doing a DML request on this space becomes synchronous. -Notice that DDL on this space (including truncation) is **not** synchronous. - -To control the behavior of synchronous transactions, there exist global -``box.cfg`` :ref:`options `: - -.. code-block:: lua - - box.cfg{replication_synchro_quorum = } - -.. code-block:: lua - - box.cfg{replication_synchro_quorum = "N / 2 + 1"} - -This option tells how many replicas should confirm the receipt of a synchronous transaction before it is committed. -Since version :doc:`2.5.3 `, the parameter supports dynamic evaluation of the quorum number -(see :ref:`reference for the replication_synchro_quorum parameter ` for details). -Since version :doc:`2.10.0 `, -this option does not account for anonymous replicas. -As a usage example, consider this: - -.. code-block:: lua - - -- Instance 1 - box.cfg{ - listen = 3313, - replication_synchro_quorum = 2, - } - box.schema.user.grant('guest', 'super') - _ = box.schema.space.create('sync', {is_sync=true}) - _ = _:create_index('pk') - -.. code-block:: lua - - -- Instance 2 - box.cfg{ - listen = 3314, - replication = 'localhost:3313' - } - -.. code-block:: lua - - -- Instance 1 - box.space.sync:replace{1} - -When the first instance makes ``replace()``, it won't finish until the second -instance confirms its receipt and successful appliance. Note that the quorum is -set to 2, but the transaction was still committed even though there is only one -replica. This is because the master instance itself also participates in the quorum. - -Now, if the second instance is down, the first one won't be able to commit any -synchronous change. - -.. code-block:: lua - - -- Instance 2 - Ctrl+D - -.. code-block:: tarantoolsession - - -- Instance 1 - tarantool> box.space.sync:replace{2} - --- - - error: Quorum collection for a synchronous transaction is timed out - ... - -The transaction wasn't committed because it failed to achieve the quorum in the -given time. The time is a second configuration option: - -.. code-block:: lua - - box.cfg{replication_synchro_timeout = } - -It tells how many seconds to wait for a synchronous transaction quorum -replication until it is declared failed and is rolled back. - -A successful synchronous transaction commit is persisted in the WAL as a special -CONFIRM record. The rollbacks are similarly persisted with a ROLLBACK record. - -The ``timeout`` and ``quorum`` options are not used on replicas. It means if -the master dies, the pending synchronous transactions will be kept waiting on -the replicas until a new master is elected. - - -Tips and tricks ---------------- - -If a transaction is rolled back, it does not mean the ROLLBACK message reached -the replicas. It still can happen that the master node suddenly dies, so the -transaction will be committed by the new master. Your application logic should be -ready for that. - -Synchronous transactions are better to use with full mesh. Then the replicas can -talk to each other in case of the master node's death and still confirm some -pending transactions. diff --git a/doc/index.rst b/doc/index.rst index 3c0d334c1b..3255bf13da 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -55,7 +55,6 @@ how-to/index concepts/index CRUD operations - Cluster on Cartridge book/admin/index book/connectors enterprise/index diff --git a/doc/reference/configuration/configuration_reference.rst b/doc/reference/configuration/configuration_reference.rst new file mode 100644 index 0000000000..a40c619d9c --- /dev/null +++ b/doc/reference/configuration/configuration_reference.rst @@ -0,0 +1,1261 @@ +.. _configuration_reference: + +Configuration reference +======================= + +.. TODO + https://github.com/tarantool/doc/issues/3664 + +This topic describes all :ref:`configuration parameters ` provided by Tarantool. + +Most of the configuration options described in this reference can be applied to a specific instance, replica set, group, or to all instances globally. +To do so, you need to define the required option at the :ref:`specified level `. + + +.. _configuration_reference_config: + +config +------ + +The ``config`` section defines various parameters related to centralized configuration. + +.. NOTE:: + + ``config`` can be defined in the global :ref:`scope ` only. + +* :ref:`config.reload ` +* :ref:`config.version ` +* :ref:`config.etcd.* ` + +.. _configuration_reference_config_reload: + +.. confval:: config.reload + + **Since:** :doc:`3.0.0 `. + + Specify how the configuration is reloaded. + This option accepts the following values: + + - ``auto``: configuration is reloaded automatically when it is changed. + - ``manual``: configuration should be reloaded manually. In this case, you can reload the configuration in the application code using :ref:`config:reload() `. + + See also: :ref:`Reloading configuration `. + + | + | Type: string + | Possible values: 'auto', 'manual' + | Default: 'auto' + | Environment variable: TT_CONFIG_RELOAD + + +.. _configuration_reference_config_version: + +.. confval:: config.version + + **Since:** :doc:`3.0.0 `. + + A configuration version. + + | + | Type: string + | Default: nil + | Environment variable: TT_CONFIG_VERSION + + + +.. _configuration_reference_config_etcd: + +config.etcd.* +~~~~~~~~~~~~~ + +.. include:: /concepts/configuration/configuration_etcd.rst + :start-after: ee_note_etcd_start + :end-before: ee_note_etcd_end + +This section describes options related to :ref:`storing configuration in etcd `. + +* :ref:`config.etcd.endpoints ` +* :ref:`config.etcd.prefix ` +* :ref:`config.etcd.username ` +* :ref:`config.etcd.password ` +* :ref:`config.etcd.ssl.ca_file ` +* :ref:`config.etcd.ssl.ca_path ` +* :ref:`config.etcd.ssl.ssl_key ` +* :ref:`config.etcd.ssl.verify_host ` +* :ref:`config.etcd.ssl.verify_peer ` +* :ref:`config.etcd.http.request.timeout ` +* :ref:`config.etcd.http.request.unix_socket ` + + + +.. _config_etcd_endpoints: + +.. confval:: config.etcd.endpoints + + **Since:** :doc:`3.0.0 `. + + The list of endpoints used to access an etcd server. + + See also: :ref:`Local etcd configuration `. + + | + | Type: array + | Default: nil + | Environment variable: TT_CONFIG_ETCD_ENDPOINTS + + +.. _config_etcd_prefix: + +.. confval:: config.etcd.prefix + + **Since:** :doc:`3.0.0 `. + + A key prefix used to search a configuration on an etcd server. + Tarantool searches keys by the following path: ``/config/*``. + Note that ```` should start with a slash (``/``). + + See also: :ref:`Local etcd configuration `. + + | + | Type: string + | Default: nil + | Environment variable: TT_CONFIG_ETCD_PREFIX + +.. _config_etcd_username: + +.. confval:: config.etcd.username + + **Since:** :doc:`3.0.0 `. + + A username used for authentication. + + | + | Type: string + | Default: nil + | Environment variable: TT_CONFIG_ETCD_USERNAME + +.. _config_etcd_password: + +.. confval:: config.etcd.password + + **Since:** :doc:`3.0.0 `. + + A password used for authentication. + + | + | Type: string + | Default: nil + | Environment variable: TT_CONFIG_ETCD_PASSWORD + + +.. _config_etcd_ssl_ca_file: + +.. confval:: config.etcd.ssl.ca_file + + **Since:** :doc:`3.0.0 `. + + A path to a trusted certificate authorities (CA) file. + + | + | Type: string + | Default: nil + | Environment variable: TT_CONFIG_ETCD_SSL_CA_FILE + + +.. _config_etcd_ssl_ca_path: + +.. confval:: config.etcd.ssl.ca_path + + **Since:** :doc:`3.0.0 `. + + A path to a directory holding certificates to verify the peer with. + + | + | Type: string + | Default: nil + | Environment variable: TT_CONFIG_ETCD_SSL_CA_PATH + + +.. _config_etcd_ssl_ssl_key: + +.. confval:: config.etcd.ssl.ssl_key + + **Since:** :doc:`3.0.0 `. + + A path to a private SSL key file. + + | + | Type: string + | Default: nil + | Environment variable: TT_CONFIG_ETCD_SSL_SSL_KEY + + +.. _config_etcd_ssl_verify_host: + +.. confval:: config.etcd.ssl.verify_host + + **Since:** :doc:`3.0.0 `. + + Enable verification of the certificate's name (CN) against the specified host. + + | + | Type: boolean + | Default: nil + | Environment variable: TT_CONFIG_ETCD_SSL_VERIFY_HOST + + +.. _config_etcd_ssl_verify_peer: + +.. confval:: config.etcd.ssl.verify_peer + + **Since:** :doc:`3.0.0 `. + + Enable verification of the peer's SSL certificate. + + | + | Type: boolean + | Default: nil + | Environment variable: TT_CONFIG_ETCD_SSL_VERIFY_PEER + + +.. _config_etcd_http_request_timeout: + +.. confval:: config.etcd.http.request.timeout + + **Since:** :doc:`3.0.0 `. + + A time period required to process an HTTP request to an etcd server: from sending a request to receiving a response. + + | + | Type: number + | Default: nil + | Environment variable: TT_CONFIG_ETCD_HTTP_REQUEST_TIMEOUT + +.. _config_etcd_http_request_unix_socket: + +.. confval:: config.etcd.http.request.unix_socket + + **Since:** :doc:`3.0.0 `. + + A Unix domain socket used to connect to an etcd server. + + | + | Type: string + | Default: nil + | Environment variable: TT_CONFIG_ETCD_HTTP_REQUEST_UNIX_SOCKET + + + + +.. _configuration_reference_credentials: + +credentials +----------- + +.. TODO: https://github.com/tarantool/doc/issues/3666 + +.. NOTE:: + + ``credentials`` can be defined in any :ref:`scope `. + + +- :ref:`credentials.roles.* ` +- :ref:`credentials.users.* ` +- :ref:`.privileges.* ` + + +.. _configuration_reference_credentials_roles: + +.. confval:: credentials.roles + + | Type: map + | Default: nil + | Environment variable: TT_CREDENTIALS_ROLES + + +.. _configuration_reference_credentials_users: + +.. confval:: credentials.users + + | Type: map + | Default: nil + | Environment variable: TT_CREDENTIALS_USERS + + + +.. _configuration_reference_credentials_role: + +credentials.roles.* +~~~~~~~~~~~~~~~~~~~ + +.. _configuration_reference_credentials_roles_name_roles: + +.. confval:: credentials.roles..roles + + +.. _configuration_reference_credentials_roles_name_privileges: + +.. confval:: credentials.roles..privileges + + See :ref:`privileges `. + + +.. _configuration_reference_credentials_user: + +credentials.users.* +~~~~~~~~~~~~~~~~~~~ + + +.. _configuration_reference_credentials_users_name_password: + +.. confval:: credentials.users..password + + +.. _configuration_reference_credentials_users_name_roles: + +.. confval:: credentials.users..roles + + +.. _configuration_reference_credentials_users_name_privileges: + +.. confval:: credentials.users..privileges + + See :ref:`privileges `. + + +.. _configuration_reference_credentials_privileges: + +.privileges.* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _configuration_reference_credentials_users_name_privileges_permissions: + +.. confval:: .privileges.permissions + + +.. _configuration_reference_credentials_users_name_privileges_spaces: + +.. confval:: .privileges.spaces + + +.. _configuration_reference_credentials_users_name_privileges_functions: + +.. confval:: .privileges.functions + + +.. _configuration_reference_credentials_users_name_privileges_sequences: + +.. confval:: .privileges.sequences + + +.. _configuration_reference_credentials_users_name_privileges_lua_eval: + +.. confval:: .privileges.lua_eval + + +.. _configuration_reference_credentials_users_name_privileges_lua_call: + +.. confval:: .privileges.lua_call + + +.. _configuration_reference_credentials_users_name_privileges_sql: + +.. confval:: .privileges.sql + + + + +.. _configuration_reference_database: + +database +-------- + +The ``database`` section defines database-specific configuration parameters, such as an instance's read-write mode or transaction isolation level. + +.. NOTE:: + + ``database`` can be defined in any :ref:`scope `. + +- :ref:`database.hot_standby ` +- :ref:`database.instance_uuid ` +- :ref:`database.mode ` +- :ref:`database.replicaset_uuid ` +- :ref:`database.txn_isolation ` +- :ref:`database.txn_timeout ` +- :ref:`database.use_mvcc_engine ` + +.. _configuration_reference_database_hot_standby: + +.. confval:: database.hot_standby + + | Type: boolean + | Default: false + | Environment variable: TT_DATABASE_HOT_STANDBY + + +.. _configuration_reference_database_instance_uuid: + +.. confval:: database.instance_uuid + + An :ref:`instance UUID `. + + By default, instance UUIDs are generated automatically. + ``database.instance_uuid`` can be used to specify an instance identifier manually. + + UUIDs should follow these rules: + + * The values must be true unique identifiers, not shared by other instances + or replica sets within the common infrastructure. + + * The values must be used consistently, not changed after the initial setup. + The initial values are stored in :ref:`snapshot files ` + and are checked whenever the system is restarted. + + .. TODO: https://github.com/tarantool/doc/issues/3661 mention that UUIDs can be dropped during migration. + + * The values must comply with `RFC 4122 `_. + The `nil UUID `_ is not allowed. + + See also: :ref:`database.replicaset_uuid ` + + | + | Type: string + | Default: :ref:`box.NULL ` + | Environment variable: TT_DATABASE_INSTANCE_UUID + + +.. _configuration_reference_database_mode: + +.. confval:: database.mode + + An instance's operating mode. + This option is in effect if :ref:`replication.failover ` is set to ``off``. + + The following modes are available: + + - ``rw``: an instance is in read-write mode. + - ``ro``: an instance is in read-only mode. + + If not specified explicitly, the default value depends on the number of instances in a replica set. For a single instance, the ``rw`` mode is used, while for multiple instances, the ``ro`` mode is used. + + **Example** + + You can set the ``database.mode`` option to ``rw`` on all instances in a replica set to make a :ref:`master-master ` configuration. + In this case, ``replication.failover`` should be set to ``off``. + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/master_master/config.yaml + :language: yaml + :dedent: + + | Type: string + | Default: :ref:`box.NULL ` (the actual default value depends on the number of instances in a replica set) + | Environment variable: TT_DATABASE_MODE + + +.. _configuration_reference_database_replicaset_uuid: + +.. confval:: database.replicaset_uuid + + A :ref:`replica set UUID `. + + By default, replica set UUIDs are generated automatically. + ``database.replicaset_uuid`` can be used to specify a replica set identifier manually. + + See also: :ref:`database.instance_uuid ` + + | + | Type: string + | Default: :ref:`box.NULL ` + | Environment variable: TT_DATABASE_REPLICASET_UUID + + +.. _configuration_reference_database_txn_isolation: + +.. confval:: database.txn_isolation + + A transaction :ref:`isolation level `. + + | + | Type: string + | Default: ``best-effort`` + | Possible values: ``best-effort``, ``read-committed``, ``read-confirmed`` + | Environment variable: TT_DATABASE_TXN_ISOLATION + + +.. _configuration_reference_database_txn_timeout: + +.. confval:: database.txn_timeout + + A timeout (in seconds) after which the transaction is rolled back. + + See also: :ref:`box.begin() ` + + | + | Type: number + | Default: 3153600000 (~100 years) + | Environment variable: TT_DATABASE_TXN_TIMEOUT + + +.. _configuration_reference_database_use_mvcc_engine: + +.. confval:: database.use_mvcc_engine + + Whether the :ref:`transactional manager ` is enabled. + + | + | Type: boolean + | Default: false + | Environment variable: TT_DATABASE_USE_MVCC_ENGINE + + + + + +.. _configuration_reference_iproto: + +iproto +------ + +The ``iproto`` section is used to configure parameters related to communicating to and between cluster instances. + +.. NOTE:: + + ``iproto`` can be defined in any :ref:`scope `. + + +- :ref:`iproto.advertise.client ` +- :ref:`iproto.advertise.peer ` +- :ref:`iproto.advertise.sharding ` +- :ref:`iproto.listen ` +- :ref:`iproto.net_msg_max ` +- :ref:`iproto.readahead ` +- :ref:`iproto.threads ` + + +.. _configuration_reference_iproto_advertise_client: + +.. confval:: iproto.advertise.client + + An URI used to advertise the current instance to clients. + + The ``iproto.advertise.client`` option accepts an URI in the following formats: + + - An address: ``host:port``. + + - A Unix domain socket: ``unix/:``. + + Note that this option doesn't allow to set a username and password. + If a remote client needs this information, it should be delivered outside of the cluster configuration. + + .. host_port_limitations_start + + .. NOTE:: + + The ``host`` value cannot be ``0.0.0.0``/``[::]`` and the ``port`` value cannot be ``0``. + + .. host_port_limitations_end + + | + | Type: string + | Default: :ref:`box.NULL ` + | Environment variable: TT_IPROTO_ADVERTISE_CLIENT + +.. _configuration_reference_iproto_advertise_peer: + +.. confval:: iproto.advertise.peer + + An URI used to advertise the current instance to other cluster members. + + The ``iproto.advertise.peer`` option accepts an URI in the following formats: + + - User :ref:`credentials ` and an address: ``username@host:port`` or ``username:password@host:port``. + + - User credentials: ``username@`` or ``username:password@``. + In this case, an advertise address is taken from :ref:`iproto.listen `. + + - An address: ``host:port``. + + If ``password`` is missing, it is taken from :ref:`credentials ` for the specified ``username``. + + You can also use a Unix domain socket (``unix/:``) instead of ``host:port``. + + .. include:: /reference/configuration/configuration_reference.rst + :start-after: host_port_limitations_start + :end-before: host_port_limitations_end + + **Example** + + In the example below, the following configuration options are specified: + + - In the :ref:`credentials ` section, the ``replicator`` user with the ``replication`` role is created. + - ``iproto.advertise.peer`` specifies that other instances should connect to an address defined in :ref:`iproto.listen ` using the ``replicator`` user. + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/auto_leader/config.yaml + :language: yaml + :start-at: credentials: + :end-at: listen: 127.0.0.1:3303 + :dedent: + + | Type: string + | Default: :ref:`box.NULL ` + | Environment variable: TT_IPROTO_ADVERTISE_PEER + +.. _configuration_reference_iproto_advertise_sharding: + +.. confval:: iproto.advertise.sharding + + An advertise URI used by a router and rebalancer. + + The ``iproto.advertise.sharding`` option accepts an URI in the same formats as :ref:`iproto.advertise.peer `. + + **Example** + + In the example below, the following configuration options are specified: + + - In the :ref:`credentials ` section, the ``replicator`` and ``storage`` users are created. + - ``iproto.advertise.peer`` specifies that other instances should connect to an address defined in :ref:`iproto.listen ` with the ``replicator`` user. + - ``iproto.advertise.sharding`` specifies that a router should connect to storages using an address defined in :ref:`iproto.listen ` with the ``storage`` user. + + .. literalinclude:: /code_snippets/snippets/sharding/instances.enabled/sharded_cluster/config.yaml + :language: yaml + :start-at: credentials: + :end-at: sharding: storage@ + :dedent: + + | Type: string + | Default: :ref:`box.NULL ` + | Environment variable: TT_IPROTO_ADVERTISE_SHARDING + + +.. _configuration_reference_iproto_listen: + +.. confval:: iproto.listen + + An address used to listen for incoming requests. + This address is used for different purposes, for example: + + - Communicating between replica set peers or cluster members. + - Remote administration using :ref:`tt connect `. + - Connecting to an instance using :ref:`connectors ` for different languages. + + To grant the specified privileges for connecting to an instance, use the :ref:`credentials ` configuration section. + + **Example** + + In the example below, ``iproto.listen`` is set explicitly for each instance in a cluster: + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/auto_leader/config.yaml + :language: yaml + :start-at: groups: + :end-before: Load sample data + :dedent: + + See also: :ref:`Connection settings `. + + | + | Type: string + | Default: :ref:`box.NULL ` + | Environment variable: TT_IPROTO_LISTEN + + +.. _configuration_reference_iproto_net_msg_max: + +.. confval:: iproto.net_msg_max + + To handle messages, Tarantool allocates :ref:`fibers `. + To prevent fiber overhead from affecting the whole system, + Tarantool restricts how many messages the fibers handle, + so that some pending requests are blocked. + + - On powerful systems, increase ``net_msg_max``, and the scheduler + starts processing pending requests immediately. + + - On weaker systems, decrease ``net_msg_max``, and the overhead + may decrease. Although this may take some time because the + scheduler must wait until already-running requests finish. + + When ``net_msg_max`` is reached, + Tarantool suspends processing of incoming packages until it + has processed earlier messages. This is not a direct restriction of + the number of fibers that handle network messages, rather it + is a system-wide restriction of channel bandwidth. + This in turn restricts the number of incoming + network messages that the + :ref:`transaction processor thread ` + handles, and therefore indirectly affects the fibers that handle + network messages. + + .. NOTE:: + + The number of fibers is smaller than the number of messages because + messages can be released as soon as they are delivered, while + incoming requests might not be processed until some time after delivery. + + | Type: integer + | Default: 768 + | Environment variable: TT_IPROTO_NET_MSG_MAX + + +.. _configuration_reference_iproto_readahead: + +.. confval:: iproto.readahead + + The size of the read-ahead buffer associated with a client connection. + The larger the buffer, the more memory an active connection consumes, and the + more requests can be read from the operating system buffer in a single + system call. + + The recommendation is to make sure that the buffer can contain at least a few dozen requests. + Therefore, if a typical tuple in a request is large, e.g. a few kilobytes or even megabytes, the read-ahead buffer size should be increased. + If batched request processing is not used, it’s prudent to leave this setting at its default. + + | + | Type: integer + | Default: 16320 + | Environment variable: TT_IPROTO_READAHEAD + + +.. _configuration_reference_iproto_threads: + +.. confval:: iproto.threads + + The number of :ref:`network threads `. + There can be unusual workloads where the network thread + is 100% loaded and the transaction processor thread is not, so the network + thread is a bottleneck. + In that case, set ``iproto_threads`` to 2 or more. + The operating system kernel determines which connection goes to + which thread. + + | + | Type: integer + | Default: 1 + | Environment variable: TT_IPROTO_THREADS + + + + + +.. _configuration_reference_groups: + +groups +------ + +The ``groups`` section provides the ability to define the :ref:`full topology of a Tarantool cluster `. + +.. NOTE:: + + ``groups`` can be defined in the global :ref:`scope ` only. + +- :ref:`groups.\ ` +- :ref:`groups.\.replicasets ` +- :ref:`groups.\.\ ` + +.. _configuration_reference_groups_name: + +.. confval:: groups. + + A group name. + + +.. _configuration_reference_groups_name_replicasets: + +.. confval:: groups..replicasets + + Replica sets that belong to this group. See :ref:`replicasets `. + + +.. _configuration_reference_groups_name_config_parameter: + +.. confval:: groups.. + + Any configuration parameter that can be defined in the group :ref:`scope `. + For example, :ref:`iproto ` and :ref:`database ` configuration parameters defined at the group level are applied to all instances in this group. + + + +.. _configuration_reference_replicasets: + +replicasets +~~~~~~~~~~~ + +.. NOTE:: + + ``replicasets`` can be defined in the group :ref:`scope ` only. + +- :ref:`replicasets.\ ` +- :ref:`replicasets.\.leader ` +- :ref:`replicasets.\.bootstrap_leader ` +- :ref:`replicasets.\.instances ` +- :ref:`replicasets.\.\ ` + +.. _configuration_reference_replicasets_name: + +.. confval:: replicasets. + + A replica set name. + + +.. _configuration_reference_replicasets_name_leader: + +.. confval:: replicasets..leader + + A replica set leader. + This option can be used to set a replica set leader when ``manual`` :ref:`replication.failover ` is used. + + To perform :ref:`controlled failover `, ``.leader`` can be temporarily removed or set to ``null``. + + **Example** + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/manual_leader/config.yaml + :language: yaml + :start-at: replication: + :end-at: listen: 127.0.0.1:3303 + :dedent: + + +.. _configuration_reference_replicasets_name_bootstrap_leader: + +.. confval:: replicasets..bootstrap_leader + + A bootstrap leader for a replica set. + To specify a bootstrap leader manually, you need to set :ref:`replication.bootstrap_strategy ` to ``config``. + + **Example** + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/bootstrap_strategy/config.yaml + :language: yaml + :start-at: groups: + :end-at: listen: 127.0.0.1:3303 + :dedent: + + +.. _configuration_reference_replicasets_name_instances: + +.. confval:: replicasets..instances + + Instances that belong to this replica set. See :ref:`instances `. + + +.. _configuration_reference_replicasets_name_config_parameter: + +.. confval:: replicasets.. + + Any configuration parameter that can be defined in the replica set :ref:`scope `. + For example, :ref:`iproto ` and :ref:`database ` configuration parameters defined at the replica set level are applied to all instances in this replica set. + + + +.. _configuration_reference_instances: + +instances +********* + +.. NOTE:: + + ``instances`` can be defined in the replica set :ref:`scope ` only. + +- :ref:`instances.\ ` +- :ref:`instances.\.\ ` + +.. _configuration_reference_instances_name: + +.. confval:: instances. + + An instance name. + + +.. _configuration_reference_instances_name_config_parameter: + +.. confval:: instances.. + + Any configuration parameter that can be defined in the instance :ref:`scope `. + For example, :ref:`iproto ` and :ref:`database ` configuration parameters defined at the instance level are applied to this instance only. + + + + + + + + + + + + + + +.. _configuration_reference_replication: + +replication +----------- + +The ``replication`` section defines configuration parameters related to :ref:`replication `. + +- :ref:`replication.anon ` +- :ref:`replication.bootstrap_strategy ` +- :ref:`replication.connect_timeout ` +- :ref:`replication.election_mode ` +- :ref:`replication.election_timeout ` +- :ref:`replication.election_fencing_mode ` +- :ref:`replication.failover ` +- :ref:`replication.peers ` +- :ref:`replication.skip_conflict ` +- :ref:`replication.sync_lag ` +- :ref:`replication.sync_timeout ` +- :ref:`replication.synchro_quorum ` +- :ref:`replication.synchro_timeout ` +- :ref:`replication.threads ` +- :ref:`replication.timeout ` + + +.. _configuration_reference_replication_anon: + +.. confval:: replication.anon + + | Type: boolean + | Default: ``false`` + | Environment variable: TT_REPLICATION_ANON + + +.. _configuration_reference_replication_bootstrap_strategy: + +.. confval:: replication.bootstrap_strategy + + Specifies a strategy used to bootstrap a :ref:`replica set `. + The following strategies are available: + + * ``auto``: a node doesn't boot if half or more of the other nodes in a replica set are not connected. + For example, if a replica set contains 2 or 3 nodes, a node requires 2 connected instances. + In the case of 4 or 5 nodes, at least 3 connected instances are required. + Moreover, a bootstrap leader fails to boot unless every connected node has chosen it as a bootstrap leader. + + * ``config``: use the specified node to bootstrap a replica set. + To specify the bootstrap leader, use the :ref:`.bootstrap_leader ` option. + + * ``supervised``: a bootstrap leader isn't chosen automatically but should be appointed using :ref:`box.ctl.make_bootstrap_leader() ` on the desired node. + + * ``legacy`` (deprecated since :doc:`2.11.0 `): a node requires the :ref:`replication_connect_quorum ` number of other nodes to be connected. + This option is added to keep the compatibility with the current versions of Cartridge and might be removed in the future. + + | Type: string + | Default: ``auto`` + | Environment variable: TT_REPLICATION_BOOTSTRAP_STRATEGY + + +.. _configuration_reference_replication_connect_timeout: + +.. confval:: replication.connect_timeout + + A timeout (in seconds) a replica waits when trying to connect to a master in a cluster. + See :ref:`orphan status ` for details. + + This parameter is different from + :ref:`replication.timeout `, + which a master uses to disconnect a replica when the master + receives no acknowledgments of heartbeat messages. + + | + | Type: number + | Default: 30 + | Environment variable: TT_REPLICATION_CONNECT_TIMEOUT + + +.. _configuration_reference_replication_election_mode: + +.. confval:: replication.election_mode + + A role of a replica set node in the :ref:`leader election process `. + + The possible values are: + + * ``off``: a node doesn't participate in the election activities. + + * ``voter``: a node can participate in the election process but can't be a leader. + + * ``candidate``: a node should be able to become a leader. + + * ``manual``: allow to control which instance is the leader explicitly instead of relying on automated leader election. + By default, the instance acts like a voter -- it is read-only and may vote for other candidate instances. + Once :ref:`box.ctl.promote() ` is called, the instance becomes a candidate and starts a new election round. + If the instance wins the elections, it becomes a leader but won't participate in any new elections. + + | + | Type: string + | Default: :ref:`box.NULL ` (the actual default value depends on :ref:`replication.failover `) + | Environment variable: TT_REPLICATION_ELECTION_MODE + + +.. _configuration_reference_replication_election_timeout: + +.. confval:: replication.election_timeout + + Specifies the timeout (in seconds) between election rounds in the + :ref:`leader election process ` if the previous round + ended up with a split vote. + + It is quite big, and for most of the cases, it can be lowered to + 300-400 ms. + + To avoid the split vote repeat, the timeout is randomized on each node + during every new election, from 100% to 110% of the original timeout value. + For example, if the timeout is 300 ms and there are 3 nodes started + the election simultaneously in the same term, + they can set their election timeouts to 300, 310, and 320 respectively, + or to 305, 302, and 324, and so on. In that way, the votes will never be split + because the election on different nodes won't be restarted simultaneously. + + | + | Type: number + | Default: 5 + | Environment variable: TT_REPLICATION_ELECTION_TIMEOUT + + +.. _configuration_reference_replication_election_fencing_mode: + +.. confval:: replication.election_fencing_mode + + Specifies the :ref:`leader fencing mode ` that + affects the leader election process. When the parameter is set to ``soft`` + or ``strict``, the leader resigns its leadership if it has less than + :ref:`replication.synchro_quorum ` + of alive connections to the cluster nodes. + The resigning leader receives the status of a follower in the current election term and becomes + read-only. + + * In ``soft`` mode, a connection is considered dead if there are no responses for + :ref:`4 * replication.timeout ` seconds both on the current leader and the followers. + + * In ``strict`` mode, a connection is considered dead if there are no responses + for :ref:`2 * replication.timeout ` seconds on the + current leader and + :ref:`4 * replication.timeout ` seconds on the + followers. This improves the chances that there is only one leader at any time. + + Fencing applies to the instances that have the + :ref:`replication.election_mode ` set to ``candidate`` or ``manual``. + To turn off leader fencing, set ``election_fencing_mode`` to ``off``. + + | + | Type: string + | Default: ``soft`` + | Possible values: ``off``, ``soft``, ``strict`` + | Environment variable: TT_REPLICATION_ELECTION_FENCING_MODE + + +.. _configuration_reference_replication_failover: + +.. confval:: replication.failover + + A failover mode used to take over a master role when the current master instance fails. + The following modes are available: + + - ``off`` + + Leadership in a replica set is controlled using the :ref:`database.mode ` option. + In this case, you can set the ``database.mode`` option to ``rw`` on all instances in a replica set to make a :ref:`master-master ` configuration. + + The default ``database.mode`` is determined as follows: ``rw`` if there is one instance in a replica set; ``ro`` if there are several instances. + + - ``manual`` + + Leadership in a replica set is controlled using the :ref:`.leader ` option. + In this case, a :ref:`master-master ` configuration is forbidden. + + In the ``manual`` mode, the :ref:`database.mode ` option cannot be set explicitly. + The leader is configured in the read-write mode, all the other instances are read-only. + + - ``election`` + + :ref:`Automated leader election ` is used to control leadership in a replica set. + + In the ``election`` mode, :ref:`database.mode ` and :ref:`.leader ` shouldn't be set explicitly. + + - ``supervised`` (`Enterprise Edition `_ only) + + Leadership in a replica set is controlled using an external failover agent. + + In the ``supervised`` mode, :ref:`database.mode ` and :ref:`.leader ` shouldn't be set explicitly. + + .. TODO: https://github.com/tarantool/enterprise_doc/issues/253 + + + See also: :ref:`Replication tutorials `. + + .. NOTE:: + + ``replication.failover`` can be defined in the global, group, and replica set :ref:`scope `. + + **Example** + + In the example below, the following configuration options are specified: + + - In the :ref:`credentials ` section, the ``replicator`` user with the ``replication`` role is created. + - :ref:`iproto.advertise.peer ` specifies that other instances should connect to an address defined in :ref:`iproto.listen ` using the ``replicator`` user. + - ``replication.failover`` specifies that a master instance should be set manually. + - :ref:`.leader ` sets ``instance001`` as a replica set leader. + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/manual_leader/config.yaml + :language: yaml + :end-before: Load sample data + :dedent: + + | Type: string + | Default: ``off`` + | Environment variable: TT_REPLICATION_FAILOVER + + +.. _configuration_reference_replication_peers: + +.. confval:: replication.peers + + URIs of instances that constitute a replica set. + These URIs are used by an instance to connect to another instance as a replica. + + Alternatively, you can use :ref:`iproto.advertise.peer ` to specify a URI used to advertise the current instance to other cluster members. + + **Example** + + In the example below, the following configuration options are specified: + + - In the :ref:`credentials ` section, the ``replicator`` user with the ``replication`` role is created. + - ``replication.peers`` specifies URIs of replica set instances. + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/peers/config.yaml + :language: yaml + :start-at: credentials: + :end-at: - replicator:topsecret@127.0.0.1:3303 + :dedent: + + | Type: array + | Default: :ref:`box.NULL ` + | Environment variable: TT_REPLICATION_PEERS + + +.. _configuration_reference_replication_skip_conflict: + +.. confval:: replication.skip_conflict + + By default, if a replica adds a unique key that another replica has + added, replication :ref:`stops ` + with the ``ER_TUPLE_FOUND`` :ref:`error `. + If ``replication.skip_conflict`` is set to ``true``, such errors are ignored. + + .. NOTE:: + + Instead of saving the broken transaction to the write-ahead log, it is written as ``NOP`` (No operation). + + | Type: boolean + | Default: false + | Environment variable: TT_REPLICATION_SKIP_CONFLICT + + +.. _configuration_reference_replication_sync_lag: + +.. confval:: replication.sync_lag + + The maximum delay (in seconds) between the time when data is written to the master and the time when it is written to a replica. + If ``replication.sync_lag`` is set to ``nil`` or 365 * 100 * 86400 (``TIMEOUT_INFINITY``), + a replica is always considered to be "synced". + + .. NOTE:: + + This parameter is ignored during bootstrap. + See :ref:`orphan status ` for details. + + | Type: number + | Default: 10 + | Environment variable: TT_REPLICATION_SYNC_LAG + + +.. _configuration_reference_replication_sync_timeout: + +.. confval:: replication.sync_timeout + + The timeout (in seconds) that a node waits when trying to sync with + other nodes in a replica set after connecting or during a :ref:`configuration update `. + This could fail indefinitely if :ref:`replication.sync_lag ` is smaller than network latency, or if the replica cannot keep pace with master updates. + If ``replication.sync_timeout`` expires, the replica enters :ref:`orphan status `. + + | + | Type: number + | Default: 0 + | Environment variable: TT_REPLICATION_SYNC_TIMEOUT + + +.. _configuration_reference_replication_synchro_quorum: + +.. confval:: replication.synchro_quorum + + A number of replicas that should confirm the receipt of a :ref:`synchronous ` transaction before it can finish its commit. + + This option supports dynamic evaluation of the quorum number. + For example, the default value is ``N / 2 + 1`` where ``N`` is the current number of replicas registered in a cluster. + Once any replicas are added or removed, the expression is re-evaluated automatically. + + Note that the default value (``at least 50% of the cluster size + 1``) guarantees data reliability. + Using a value less than the canonical one might lead to unexpected results, + including a :ref:`split-brain `. + + ``replication.synchro_quorum`` is not used on replicas. If the master fails, the pending synchronous + transactions will be kept waiting on the replicas until a new master is elected. + + .. NOTE:: + + ``replication.synchro_quorum`` does not account for anonymous replicas. + + | Type: string, number + | Default: ``N / 2 + 1`` + | Environment variable: TT_REPLICATION_SYNCHRO_QUORUM + + +.. _configuration_reference_replication_synchro_timeout: + +.. confval:: replication.synchro_timeout + + For :ref:`synchronous replication ` only. + Specify how many seconds to wait for a synchronous transaction quorum + replication until it is declared failed and is rolled back. + + It is not used on replicas, so if the master fails, the pending synchronous + transactions will be kept waiting on the replicas until a new master is + elected. + + | + | Type: number + | Default: 5 + | Environment variable: TT_REPLICATION_SYNCHRO_TIMEOUT + + +.. _configuration_reference_replication_threads: + +.. confval:: replication.threads + + The number of threads spawned to decode the incoming replication data. + + In most cases, one thread is enough for all incoming data. + Possible values range from 1 to 1000. + If there are multiple replication threads, connections to serve are distributed evenly between the threads. + + | + | Type: integer + | Default: 1 + | Environment variable: TT_REPLICATION_THREADS + + +.. _configuration_reference_replication_timeout: + +.. confval:: replication.timeout + + A time interval (in seconds) used by a master to send heartbeat requests to a replica when there are no updates to send to this replica. + For each request, a replica should return a heartbeat acknowledgment. + + If a master or replica gets no heartbeat message for ``4 * replication.timeout`` seconds, a connection is dropped and a replica tries to reconnect to the master. + + See also: :ref:`Monitoring a replica set `. + + | + | Type: number + | Default: 1 + | Environment variable: TT_REPLICATION_TIMEOUT + diff --git a/doc/reference/configuration/index.rst b/doc/reference/configuration/index.rst index be2a510d02..1840ce5ecc 100644 --- a/doc/reference/configuration/index.rst +++ b/doc/reference/configuration/index.rst @@ -1,503 +1,71 @@ -.. _index-book_cfg: - -================================================================================ -Configuration reference -================================================================================ - -This reference covers all options and parameters which can be set for Tarantool -on the command line or in an :ref:`initialization file `. - -Tarantool is started by entering either of the following command: - -.. cssclass:: highlight -.. parsed-literal:: - - $ **tarantool** - - $ **tarantool** *options* - - $ **tarantool** *lua-initialization-file* **[** *arguments* **]** - --------------------------------------------------------------------------------- -Command options --------------------------------------------------------------------------------- - -.. option:: -h, --help - - Print an annotated list of all available options and exit. - -.. _index-tarantool_version: - -.. option:: -v, -V, --version - - Print the product name and version. - - **Example** - - .. code-block:: console - - % tarantool --version - Tarantool 2.11.1-0-g96877bd - Target: Darwin-arm64-Release - ... - - In this example: - - * ``2.11.1`` is a Tarantool version. - Tarantool follows semantic versioning, which is described in the :ref:`Tarantool release policy ` section. - - * ``Target`` is the platform Tarantool is built on. - Platform-specific details may follow this line. - - -.. option:: -e EXPR - - Execute the 'EXPR' string. See also: `lua man page `_. - - **Example** - - .. code-block:: console - - % tarantool -e "print('Hello, world!')" - Hello, world! - -.. option:: -l NAME - - Require the 'NAME' library. See also: `lua man page `_. - - **Example** - - .. code-block:: console - - % tarantool -l luatest.coverage script.lua - -.. option:: -j cmd - - Perform a LuaJIT control command. See also: `Command Line Options `_. - - **Example** - - .. code-block:: console - - % tarantool -j off app.lua - -.. option:: -b ... - - Save or list bytecode. See also: `Command Line Options `_. - - **Example** - - .. code-block:: console - - % tarantool -b test.lua test.out - -.. option:: -d SCRIPT - - Activate a debugging session for 'SCRIPT'. See also: `luadebug.lua `_. - - **Example** - - .. code-block:: console - - % tarantool -d app.lua - - -.. option:: -i [SCRIPT] - - Enter an :ref:`interactive mode ` after executing 'SCRIPT'. - - **Example** - - .. code-block:: console - - % tarantool -i - - -.. option:: -- - - Stop handling options. See also: `lua man page `_. - - -.. option:: - - - Stop handling options and execute the standard input as a file. See also: `lua man page `_. - - -.. _index-uri: - --------------------------------------------------------------------------------- -URI --------------------------------------------------------------------------------- - -Some configuration parameters and some functions depend on a URI (Universal Resource Identifier). -The URI string format is similar to the -`generic syntax for a URI schema `_. -It may contain (in order): - -* user name for login -* password -* host name or host IP address -* port number. - -Only a port number is always mandatory. A password is mandatory if a user -name is specified, unless the user name is 'guest'. - -Formally, the URI -syntax is ``[host:]port`` or ``[username:password@]host:port``. -If host is omitted, then "0.0.0.0" or "[::]" is assumed -meaning respectively any IPv4 address or any IPv6 address -on the local machine. -If ``username:password`` is omitted, then the "guest" user is assumed. Some examples: - -.. container:: table - - .. rst-class:: left-align-column-1 - .. rst-class:: left-align-column-2 - - +-----------------------------+------------------------------+ - | URI fragment | Example | - +=============================+==============================+ - | port | 3301 | - +-----------------------------+------------------------------+ - | host:port | 127.0.0.1:3301 | - +-----------------------------+------------------------------+ - | username:password@host:port | notguest:sesame@mail.ru:3301 | - +-----------------------------+------------------------------+ - -In code, the URI value can be passed as a number (if only a port is specified) or a string: - -.. code-block:: lua - - box.cfg { listen = 3301 } - - box.cfg { listen = "127.0.0.1:3301" } - -In certain circumstances, a Unix domain socket may be used -where a URI is expected, for example, "unix/:/tmp/unix_domain_socket.sock" or -simply "/tmp/unix_domain_socket.sock". - -The :ref:`uri ` module provides functions that convert URI strings into their -components, or turn components into URI strings. - -.. _index-uri-several: - -Specifying several URIs -~~~~~~~~~~~~~~~~~~~~~~~ - -Starting from version 2.10.0, a user can open several listening iproto sockets on a Tarantool instance -and, consequently, can specify several URIs in the configuration parameters -such as :ref:`box.cfg.listen ` and :ref:`box.cfg.replication `. - -URI values can be set in a number of ways: - -* As a string with URI values separated by commas. - - .. code-block:: lua - - box.cfg { listen = "127.0.0.1:3301, /unix.sock, 3302" } - -* As a table that contains URIs in the string format. - - .. code-block:: lua - - box.cfg { listen = {"127.0.0.1:3301", "/unix.sock", "3302"} } - -* As an array of tables with the ``uri`` field. - - .. code-block:: lua - - box.cfg { listen = { - {uri = "127.0.0.1:3301"}, - {uri = "/unix.sock"}, - {uri = 3302} - } - } - -* In a combined way -- an array that contains URIs in both the string and the table formats. - - .. code-block:: lua - - box.cfg { listen = { - "127.0.0.1:3301", - { uri = "/unix.sock" }, - { uri = 3302 } - } - } - -.. _index-uri-several-params: - -Also, starting from version 2.10.0, it is possible to specify additional parameters for URIs. -You can do this in different ways: - -* Using the ``?`` delimiter when URIs are specified in a string format. - - .. code-block:: lua - - box.cfg { listen = "127.0.0.1:3301?p1=value1&p2=value2, /unix.sock?p3=value3" } - -* Using the ``params`` table: a URI is passed in a table with additional parameters in the "params" table. - Parameters in the "params" table overwrite the ones from a URI string ("value2" overwrites "value1" for ``p1`` in the example below). - - .. code-block:: lua - - box.cfg { listen = { - "127.0.0.1:3301?p1=value1", - params = {p1 = "value2", p2 = "value3"} - } - } - -* Using the ``default_params`` table for specifying default parameter values. - - In the example below, two URIs are passed in a table. - The default value for the ``p3`` parameter is defined in the ``default_params`` table - and used if this parameter is not specified in URIs. - Parameters in the ``default_params`` table are applicable to all the URIs passed in a table. - - .. code-block:: lua - - box.cfg { listen = { - "127.0.0.1:3301?p1=value1", - { uri = "/unix.sock", params = { p2 = "value2" } }, - default_params = { p3 = "value3" } - } - } - -The recommended way for specifying URI with additional parameters is the following: - -.. code-block:: lua - - box.cfg { listen = { - {uri = "127.0.0.1:3301", params = {p1 = "value1"}}, - {uri = "/unix.sock", params = {p2 = "value2"}}, - {uri = 3302, params = {p3 = "value3"}} - } - } - -In case of a single URI, the following syntax also works: - -.. code-block:: lua - - box.cfg { listen = { - uri = "127.0.0.1:3301", - params = { p1 = "value1", p2 = "value2" } - } - } - -.. _index-init_label: - --------------------------------------------------------------------------------- -Initialization file --------------------------------------------------------------------------------- - -If the command to start Tarantool includes :codeitalic:`lua-initialization-file`, then -Tarantool begins by invoking the Lua program in the file, which by convention -may have the name "``script.lua``". The Lua program may get further arguments -from the command line or may use operating-system functions, such as ``getenv()``. -The Lua program almost always begins by invoking ``box.cfg()``, if the database -server will be used or if ports need to be opened. For example, suppose -``script.lua`` contains the lines - -.. _index-init-example: - -.. code-block:: lua - - #!/usr/bin/env tarantool - box.cfg{ - listen = os.getenv("LISTEN_URI"), - memtx_memory = 33554432, - pid_file = "tarantool.pid", - wal_max_size = 2500 - } - print('Starting ', arg[1]) - -and suppose the environment variable LISTEN_URI contains 3301, -and suppose the command line is ``~/tarantool/src/tarantool script.lua ARG``. -Then the screen might look like this: - -.. code-block:: console - - $ export LISTEN_URI=3301 - $ ~/tarantool/src/tarantool script.lua ARG - ... main/101/script.lua C> Tarantool 2.8.3-0-g01023dbc2 - ... main/101/script.lua C> log level 5 - ... main/101/script.lua I> mapping 33554432 bytes for memtx tuple arena... - ... main/101/script.lua I> recovery start - ... main/101/script.lua I> recovering from './00000000000000000000.snap' - ... main/101/script.lua I> set 'listen' configuration option to "3301" - ... main/102/leave_local_hot_standby I> ready to accept requests - Starting ARG - ... main C> entering the event loop - -If you wish to start an interactive session on the same terminal after -initialization is complete, you can use :ref:`console.start() `. - -.. _index-local_hot_standby: -.. _index-replication_port: -.. _index-slab_alloc_arena: -.. _index-replication_source: -.. _index-snap_dir: -.. _index-wal_dir: -.. _index-wal_mode: -.. _index-checkpoint daemon: - -.. _box_cfg_params: - --------------------------------------------------------------------------------- -Configuration parameters --------------------------------------------------------------------------------- - -Configuration parameters have the form: - -:extsamp:`{**{box.cfg}**}{[{*{key = value}*} [, {*{key = value ...}*}]]}` - -Since ``box.cfg`` may contain many configuration parameters and since some of the -parameters (such as directory addresses) are semi-permanent, it's best to keep -``box.cfg`` in a Lua file. Typically this Lua file is the initialization file -which is specified on the Tarantool command line. - -Most configuration parameters are for allocating resources, opening ports, and -specifying database behavior. All parameters are optional. -A few parameters are dynamic, that is, they can be changed at runtime by calling ``box.cfg{}`` a second time. -For example, the command below sets the :ref:`listen port ` to ``3301``. - -.. code-block:: tarantoolsession - - tarantool> box.cfg{ listen = 3301 } - 2023-05-10 13:28:54.667 [31326] main/103/interactive I> tx_binary: stopped - 2023-05-10 13:28:54.667 [31326] main/103/interactive I> tx_binary: bound to [::]:3301 - 2023-05-10 13:28:54.667 [31326] main/103/interactive/box.load_cfg I> set 'listen' configuration option to 3301 - --- - ... - - -To see all the non-null parameters, execute ``box.cfg`` (no parentheses). - -.. code-block:: tarantoolsession - - tarantool> box.cfg - --- - - replication_skip_conflict: false - wal_queue_max_size: 16777216 - feedback_host: https://feedback.tarantool.io - memtx_dir: . - memtx_min_tuple_size: 16 - -- other parameters -- - ... - -To see a particular parameter value, call a corresponding ``box.cfg`` option. -For example, ``box.cfg.listen`` shows the specified :ref:`listen address `. - -.. code-block:: tarantoolsession - - tarantool> box.cfg.listen - --- - - 3301 - ... - - -.. _box-cfg-params-prior: - -Methods of setting and priorities -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Tarantool configuration parameters can be specified in different ways. -The priority of parameter sources is the following, from higher to lower: - -* ``box.cfg`` options -* :ref:`environment variables ` -* :ref:`tt configuration ` -* default values. - -.. _box-cfg-params-env: - -Setting via environment variables -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Starting from version :doc:`2.8.1 `, you can specify configuration parameters via special environment variables. -The name of a variable should have the following pattern: ``TT_``, -where ```` is the uppercase name of the corresponding :ref:`box.cfg parameter `. - -For example: - -* ``TT_LISTEN`` -- corresponds to the ``box.cfg.listen`` option. -* ``TT_MEMTX_DIR`` -- corresponds to the ``box.cfg.memtx_dir`` option. - -In case of an array value, separate the array elements by comma without space: - -.. code-block:: console - - export TT_REPLICATION="localhost:3301,localhost:3302" - -If you need to pass :ref:`additional parameters for URI `, use the ``?`` and ``&`` delimiters: - -.. code-block:: console - - export TT_LISTEN="localhost:3301?param1=value1¶m2=value2" +.. _index-book_cfg: +.. _box-cfg-params-ref: -An empty variable (``TT_LISTEN=``) has the same effect as an unset one meaning that the corresponding configuration parameter won't be set when calling ``box.cfg{}``. +Configuration reference (box.cfg) +================================= -.. _box-cfg-params-ref: +.. include:: /concepts/configuration/configuration_code.rst + :start-after: box_cfg_legacy_note_start + :end-before: box_cfg_legacy_note_end -Reference -~~~~~~~~~ -The sections that follow describe all configuration parameters for basic operations, storage, -binary logging and snapshots, replication, networking, logging, and feedback. +This topic describes all configuration parameters +that can be specified :ref:`in code ` using the ``box.cfg`` API. .. contents:: :local: :depth: 1 Basic parameters -^^^^^^^^^^^^^^^^ +---------------- .. include:: cfg_basic.rst Configuring the storage -^^^^^^^^^^^^^^^^^^^^^^^ +----------------------- .. include:: cfg_storage.rst .. _book_cfg_checkpoint_daemon: Checkpoint daemon -^^^^^^^^^^^^^^^^^ +----------------- .. include:: cfg_snapshot_daemon.rst Binary logging and snapshots -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +---------------------------- .. include:: cfg_binary_logging_snapshots.rst .. _index-hot_standby: Hot standby -^^^^^^^^^^^ +----------- .. include:: cfg_hot_standby.rst Replication -^^^^^^^^^^^ +----------- .. include:: cfg_replication.rst Networking -^^^^^^^^^^ +---------- .. include:: cfg_networking.rst Logging -^^^^^^^ +------- .. include:: cfg_logging.rst Feedback -^^^^^^^^ +-------- .. include:: cfg_feedback.rst Deprecated parameters -^^^^^^^^^^^^^^^^^^^^^ +--------------------- .. include:: cfg_deprecated.rst diff --git a/doc/reference/index.rst b/doc/reference/index.rst index eb61be86a6..ae8a1cfce6 100644 --- a/doc/reference/index.rst +++ b/doc/reference/index.rst @@ -10,6 +10,7 @@ Reference .. toctree:: :maxdepth: 2 + configuration/configuration_reference configuration/index tooling/index reference_sql/index diff --git a/doc/reference/reference_lua/box_ctl.rst b/doc/reference/reference_lua/box_ctl.rst index fa15c761d7..57b1d605c1 100644 --- a/doc/reference/reference_lua/box_ctl.rst +++ b/doc/reference/reference_lua/box_ctl.rst @@ -26,7 +26,7 @@ Below is a list of all ``box.ctl`` functions. .. rst-class:: left-align-column-2 .. list-table:: - :widths: 25 75 + :widths: 35 65 :header-rows: 1 * - Name @@ -62,6 +62,9 @@ Below is a list of all ``box.ctl`` functions. * - :doc:`./box_ctl/demote` - Revoke the leader role from the instance + * - :doc:`./box_ctl/make_bootstrap_leader` + - Make the instance a bootstrap leader of a replica set + .. toctree:: :hidden: @@ -75,3 +78,4 @@ Below is a list of all ``box.ctl`` functions. box_ctl/is_recovery_finished box_ctl/promote box_ctl/demote + box_ctl/make_bootstrap_leader diff --git a/doc/reference/reference_lua/box_ctl/make_bootstrap_leader.rst b/doc/reference/reference_lua/box_ctl/make_bootstrap_leader.rst new file mode 100644 index 0000000000..e58a8e17e8 --- /dev/null +++ b/doc/reference/reference_lua/box_ctl/make_bootstrap_leader.rst @@ -0,0 +1,20 @@ +.. _box_ctl-make_bootstrap_leader: + +box.ctl.make_bootstrap_leader() +=============================== + +.. function:: make_bootstrap_leader() + + **Since:** :doc:`3.0.0 `. + + Make the instance a bootstrap leader of a replica set. + + To be able to make the instance a bootstrap leader manually, the :ref:`replication.bootstrap_strategy ` configuration option should be set to ``supervised``. + In this case, the instances do not choose a bootstrap leader automatically but wait for it to be appointed manually. + Configuration fails if no bootstrap leader is appointed during a :ref:`replication.connect_timeout `. + + .. NOTE:: + + When a new instance joins a replica set configured with the ``supervised`` bootstrap strategy, + this instance doesn't choose the bootstrap leader automatically but joins to the instance on which + ``box.ctl.make_bootstrap_leader()`` was executed last time. diff --git a/doc/reference/reference_lua/box_ctl/promote.rst b/doc/reference/reference_lua/box_ctl/promote.rst index 6e871b17aa..b6d75de2d0 100644 --- a/doc/reference/reference_lua/box_ctl/promote.rst +++ b/doc/reference/reference_lua/box_ctl/promote.rst @@ -10,7 +10,7 @@ box.ctl.promote() Wait, then choose new replication leader. - For :ref:`synchronous transactions ` it is + For :ref:`synchronous transactions ` it is possible that a new leader will be chosen but the transactions of the old leader have not been completed. Therefore to finalize the transaction, the function ``box.ctl.promote()`` diff --git a/doc/reference/reference_lua/box_info/election.rst b/doc/reference/reference_lua/box_info/election.rst index 39b99a5e46..68f418ba98 100644 --- a/doc/reference/reference_lua/box_info/election.rst +++ b/doc/reference/reference_lua/box_info/election.rst @@ -4,41 +4,45 @@ box.info.election ================================================================================ -.. module:: box.info +.. module:: box.info -.. data:: election +.. data:: election - Since version :doc:`2.6.1 `. - Show the current state of a replica set node in regards to - :ref:`leader election `. + Since version :doc:`2.6.1 `. - The following information is provided: + Show the current state of a replica set node in regards to :ref:`leader election `. + The following information is provided: - * ``state`` -- election state (mode) of the node. Possible values are ``leader``, ``follower``, or ``candidate``. + * ``state`` -- the election state (mode) of the node. Possible values are ``leader``, ``follower``, or ``candidate``. For more details, refer to description of the :ref:`leader election process `. - When election is enabled, the node is writable only in the ``leader`` state. + When :ref:`replication.failover ` is set to ``election``, the node is writable only in the ``leader`` state. - * ``term`` -- current election term. + * ``term`` -- the current election term. - * ``vote`` -- ID of a node the current node votes for. If the value is ``0``, it means the node hasn't voted in the current term yet. + * ``vote`` -- the ID of a node the current node votes for. If the value is ``0``, it means the node hasn't voted in the current term yet. - * ``leader`` -- leader node ID in the current term. If the value is ``0``, it means the node doesn't know which node is the leader in the current term. + * ``leader`` -- a leader node ID in the current term. If the value is ``0``, it means the node doesn't know which node is the leader in the current term. - * ``leader_idle`` -- time in seconds since the last interaction with the known leader. Since version :doc:`2.10.0 `. + * ``leader_name`` -- a leader name. Returns ``nil`` if there is no leader in a cluster or :ref:`box.NULL ` if a leader does not have a name. Since version :doc:`3.0.0 `. - .. note:: + * ``leader_idle`` -- time in seconds since the last interaction with the known leader. Since version :doc:`2.10.0 `. + + .. note:: IDs in the ``box.info.election`` output are the replica IDs visible in the ``box.info.id`` output on each node and in the ``_cluster`` space. - **Example:** + **Example:** + + .. code-block:: tarantoolsession - .. code-block:: tarantoolsession + auto_leader:instance001> box.info.election + --- + - leader_idle: 0 + leader_name: instance001 + state: leader + vote: 2 + term: 3 + leader: 2 + ... - tarantool> box.info.election - --- - - state: follower - term: 2 - vote: 0 - leader: 0 - leader_idle: 0.45112800000061 - ... + See also: :ref:`Master-replica: automated failover `. \ No newline at end of file diff --git a/doc/reference/reference_lua/box_schema/space_create.rst b/doc/reference/reference_lua/box_schema/space_create.rst index 9c98cd22d4..8e51c31767 100644 --- a/doc/reference/reference_lua/box_schema/space_create.rst +++ b/doc/reference/reference_lua/box_schema/space_create.rst @@ -136,10 +136,19 @@ space_opts | Default: ``false`` .. _space_opts_is_sync: + .. _how-to-repl_sync: .. data:: is_sync - Any transaction doing a DML request on this space becomes synchronous. + Any transaction doing a DML request on this space becomes :ref:`synchronous `. + + **Example:** + + .. literalinclude:: /code_snippets/snippets/replication/instances.enabled/auto_leader/data.lua + :language: lua + :start-at: is_sync = true + :end-at: is_sync = true + :dedent: | Type: boolean | Default: ``false`` diff --git a/doc/reference/reference_lua/config.rst b/doc/reference/reference_lua/config.rst new file mode 100644 index 0000000000..9ddacc11df --- /dev/null +++ b/doc/reference/reference_lua/config.rst @@ -0,0 +1,8 @@ +.. _config-module: + +Module config +============= + +**Since:** :doc:`3.0.0 ` + +.. TODO: https://github.com/tarantool/doc/issues/3662 diff --git a/doc/reference/reference_lua/index.rst b/doc/reference/reference_lua/index.rst index f09443274d..2002f75e4f 100644 --- a/doc/reference/reference_lua/index.rst +++ b/doc/reference/reference_lua/index.rst @@ -25,6 +25,7 @@ This reference covers Tarantool's built-in Lua modules. checks clock compat + config console crypto csv diff --git a/doc/reference/reference_rock/index.rst b/doc/reference/reference_rock/index.rst index 279ed717e4..3e19e710b3 100644 --- a/doc/reference/reference_rock/index.rst +++ b/doc/reference/reference_rock/index.rst @@ -9,7 +9,6 @@ This reference covers third-party Lua modules for Tarantool. .. toctree:: :maxdepth: 1 - ../../book/cartridge/index membership Module metrics <../../book/monitoring/index> Module luatest diff --git a/doc/reference/tooling/index.rst b/doc/reference/tooling/index.rst index d68e4c91ec..f3b8d598c1 100644 --- a/doc/reference/tooling/index.rst +++ b/doc/reference/tooling/index.rst @@ -7,8 +7,9 @@ to work with Tarantool. .. toctree:: :maxdepth: 1 - interactive_console tt_cli/index + tcm/index + interactive_console tarantoolctl luajit_memprof luajit_getmetrics diff --git a/doc/reference/tooling/tcm/index.rst b/doc/reference/tooling/tcm/index.rst new file mode 100644 index 0000000000..4b52edfffa --- /dev/null +++ b/doc/reference/tooling/tcm/index.rst @@ -0,0 +1,43 @@ +.. _tcm: + +Tarantool Cluster Manager +========================= + +.. ee_note_tcm_start + +.. admonition:: Enterprise Edition + :class: fact + + |tcm_full_name| is a part of the `Enterprise Edition `_. + +.. ee_note_tcm_end + +|tcm_full_name| (|tcm|) is a web-based visual tool for configuring, managing, and +monitoring Tarantool EE clusters. It provides a GUI for working with clusters +and individual instances, from monitoring their state to executing commands interactively +in an instance's console. + +|tcm| is a standalone application included in the Tarantool Enterprise Edition +:ref:`distribution package `. It is shipped as ready-to-run +executable for Linux platforms. + +|tcm| works only with Tarantool EE clusters that use :ref:`etcd as a configuration storage `. +When you create or edit a cluster's configuration in |tcm|, it publishes the saved +configuration to etcd. This ensures consistent and reliable configuration storage. +A single |tcm| installation can connect to multiple Tarantool EE clusters and +switch between them in one click. + +To provide enterprise-grade security, |tcm| features its own role-based access control. +You can create users and assign them roles that include required permissions. +For example, a user can be an administrator of a specific cluster or only have the right +to read data. LDAP authorization is supported as well. + +.. toctree:: + :maxdepth: 1 + + tcm_connect_clusters + tcm_cluster_config + tcm_access_control + tcm_audit_log + tcm_configuration + tcm_configuration_reference diff --git a/doc/reference/tooling/tcm/tcm_access_control.rst b/doc/reference/tooling/tcm/tcm_access_control.rst new file mode 100644 index 0000000000..04e9f7b99c --- /dev/null +++ b/doc/reference/tooling/tcm/tcm_access_control.rst @@ -0,0 +1,392 @@ +.. _tcm_access_control: + +Access control +============== + +.. include:: index.rst + :start-after: ee_note_tcm_start + :end-before: ee_note_tcm_end + +|tcm_full_name| features a role-based access control system. It enables flexible +management of access to |tcm| functions, connected clusters, and stored data. +The |tcm| access system uses three main entities: permissions, roles, +and users (or user accounts). They work as follows: + +- Permissions correspond to specific functions or objects in + |tcm| (*administrative permissions*) or operations on clusters (*cluster permissions*). +- Roles are predefined sets of *administrative* permissions to + assign to users. +- Users have roles that define their access rights to |tcm| functions and objects, and + *cluster* permissions that are assigned for each cluster separately. + +.. note:: + + |tcm| users, roles, and permissions are not to be confused with similar subjects + of the :ref:`Tarantool access control system `. To access Tarantool + instances directly, Tarantool users with corresponding roles are required. + +.. _tcm_access_control_permissions: + +Permissions +----------- + +Permissions define access to specific actions that users can do in |tcm|. For example, +there are permissions to view connected clusters or to manage users. + +There are two types of permissions in |tcm|: *administrative* and *cluster* permissions. + +* *Administrative permissions* provide access to |tcm| functions. They define which + pages and controls are available to users in the web UI. Typically, *read* permissions + define pages shown in the left menu. *Write* permissions define the availability + of controls for managing objects on the pages. + For example, users with read permission to clusters can view the **Clusters** page + but they don't see **Add**, **Edit**, or **Remove** buttons unless they have the + write permission. + + Administrative permissions are assigned to users through :ref:`roles `. + +* *Cluster permissions* enable actions with connected Tarantool clusters. + These permissions are granted to users on a per-cluster level: each user has a separate + set of permissions for each cluster. + + Cluster permissions define which pages of the **Cluster** menu section users + see and what actions they can take on these pages. + For example, users with the read configuration permission to a cluster configuration + see the **Configuration** page when this cluster is selected. + + Cluster permissions are assigned to users individually when creating or editing them. + +Permissions are predefined in |tcm|, there is no way to change, add, or delete them. +The complete lists of administrative and cluster permissions in |tcm| are provided +in the :ref:`Permissions reference `. + +.. _tcm_access_control_roles: + +Roles +----- + +Roles are groups of :ref:`administrative permissions ` +that are assigned to users together. + +The assigned roles define pages that users see in |tcm| and actions available +on these pages. + +.. note:: + + Roles don't include cluster permissions. Access to connected clusters + is configured for each user individually. + +Default roles +~~~~~~~~~~~~~ + +|tcm| comes with default roles that cover three common usage scenarios: + +- **Super Admin Role** is a default role with all available + :ref:`administrative permissions `. + Additionally, the users with this role automatically gain all + :ref:`cluster permissions ` + to all clusters. +- **Cluster Admin Role** is a default role for cluster administration. It includes + administrative permissions for cluster management. +- **Default User Role** is a default role for working with clusters. It includes + basic administrative *read* permissions that are required to log in to |tcm| + and navigate to a cluster. + +Managing roles +~~~~~~~~~~~~~~ + +Administrators can create new roles, edit, and delete existing ones. + +Roles are listed on the **Roles** page. + +To create a new role, click **Add**, enter the role name, and select the permissions +to include in the role. + +To edit an existing role, click **Edit** in the **Actions** menu of the corresponding +table row. + +To delete a role, click **Delete** in the **Actions** menu of the corresponding +table row. + +.. note:: + + You can delete a role only if there are no users with this role. + +Users +----- + +|tcm| users gain access to objects and actions through assigned :ref:`roles ` +and :ref:`cluster permissions `. + +A user can have any number of roles or none of them. Users without roles +have access only to clusters that are assigned to them. + +|tcm| uses password authentication for users. For information on password management, +see the :ref:`Passwords ` section below. + +Default admin +~~~~~~~~~~~~~ + +There is one default user **Default Admin**. It has all the available permissions, +both administrative and cluster ones. When new clusters are added in |tcm|, +**Default Admin** automatically receives all cluster permissions for them as well. + +.. _tcm_access_control_users_manage: + +Managing users +~~~~~~~~~~~~~~ + +Administrators can create new users, edit, and delete existing ones. + +The tools for managing users are located on the **Users** page. + +To create a user: + +1. Click **Add**. +2. Fill in the user information: username, full name, and description. +3. Generate or type in a password. +4. Select roles to assign to the user. +5. Add clusters to give the user access to, and select cluster permissions for + each of them. + +To edit a user, click **Edit** in the **Actions** menu of the corresponding table row. + +To delete a user, click **Delete** in the **Actions** menu of the corresponding table row. + +.. _tcm_access_control_password: + +Passwords +--------- + +|tcm| uses the general term *secret* for user authentication keys. A secret is any +pair of a public and a private key that can be used for authentication. In |tcm| |tcm_version|, +*password* is the only supported secret type. In this case, the public key is a username, +and the private key is a password. + +Users receive their first passwords during their :ref:`account creation `. + +All passwords are governed by the :ref:`password policy `. +It can be flexibly configured to follow the security requirements of your organization. + +Changing your password +~~~~~~~~~~~~~~~~~~~~~~ + +To change your own password, click your name in the top-right corner and go to +**Settings** > **Change password**. + +Changing users' passwords +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Administrators can manage a user's password on this user's **Secrets** page. +To open it, click **Secrets** in the **Actions** menu of the corresponding **Users** table row. + +To change a user's password, click **Edit** in the **Actions** menu of the corresponding +**Secrets** table row and enter the new password in the **New secret key** field. + +.. _tcm_access_control_password_expiry: + +Password expiry +~~~~~~~~~~~~~~~ + +Passwords expire automatically after the expiration period defined in the :ref:`password policy `. +When a user logs in to |tcm| with an expired password, the only action available to +them is a password change. All other |tcm| functions and objects are unavailable until +the new password is set. + +Administrators can also set users' passwords to expired manually. +To set a user's password to expired, click **Expire** in the **Actions** +menu of the corresponding **Secrets** table row. + +.. important:: + + Password expiration can't be reverted. + +Blocking passwords +~~~~~~~~~~~~~~~~~~ + +To forbid users' access to |tcm|, administrators can temporarily block their +passwords. A blocked password can't be used to log into |tcm| until it's +unblocked manually or the blocking period expires. + +To block a user's password, click **Block** in the **Actions** menu of the corresponding +**Secrets** table row. Then provide a blocking reason and enter the blocking period. + +To unblock a blocked password, click **Unblock** in the **Actions** menu of the corresponding +**Secrets** table row. + +.. _tcm_access_control_password_policy: + +Password policy +~~~~~~~~~~~~~~~ + +Password policy helps improve security and comply with security requirements that +can apply to your organization. + +You can edit the |tcm| password policy on the **Password policy** page. +There are the following password policy settings: + +- **Minimal password length**. +- **Do not use last N passwords**. +- **Password expiration in days**. Users' passwords :ref:`expire ` + after this number of days since they were set. Users with expired passwords + lose access to any objects and functions except password change until they set + a new password. +- **Password expiration warning in days**. After this number of days, the user + sees a warning that their password expires soon. +- **Block after N login attempts**. Temporarily block users if they enter their + username or password incorrectly this number of times consecutively. +- **User lockout time in seconds**. The time interval for which users can't log + in after spending all failed login attempts. +- **Password must include**. Characters and symbols that must be present in passwords: + + - **Lowercase characters (a-z)** + - **Uppercase characters (A-Z)** + - **Digits (0-9)** + - **Symbols (such as !@#$%^&\*()_+№"':,.;=][{}`?>/.)** + +.. _tcm_access_control_sessions: + +Sessions +-------- + +Administrators can view and revoke user sessions in |tcm|. All active sessions +are listed on the **Sessions** page. To revoke a session, click **Revoke** in the +**Actions** menu of the corresponding table row. + +To revoke all sessions of a user, go to **Users** and click **Revoke all sessions** +in the **Actions** menu of the corresponding table row. + +.. _tcm_access_control_permissions_ref: + +Permissions reference +--------------------- + +.. _tcm_access_control_permissions_admin: + +Administrative permissions +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following administrative permissions are available in |tcm|: + +.. list-table:: + :widths: auto + :header-rows: 1 + + * - Permission + - Description + + * - ``admin.clusters.read`` + - View connected clusters' details + + * - ``admin.clusters.write`` + - Edit cluster details and add new clusters + + * - ``admin.users.read`` + - View users' details + + * - ``admin.users.write`` + - Edit user details and add new users + + * - ``admin.roles.read`` + - View roles' details + + * - ``admin.roles.write`` + - Edit roles and add new roles + + * - ``admin.addons.read`` + - View add-ons + + * - ``admin.addons.write`` + - Edit add-on flags + + * - ``admin.addons.upload`` + - Upload new add-ons + + * - ``admin.auditlog.read`` + - View audit log configuration and read audit log in |tcm| + + * - ``admin.auditlog.write`` + - Edit audit log configuration + + * - ``admin.sessions.read`` + - View users' sessions + + * - ``admin.sessions.write`` + - Revoke users' sessions + + * - ``admin.ldap.read`` + - View LDAP configurations + + * - ``admin.ldap.write`` + - Manage LDAP configurations + + * - ``admin.passwordpolicy.read`` + - View password policy + + * - ``admin.passwordpolicy.write`` + - Manage password policy + + * - ``admin.devmode.toggle`` + - Toggle development mode + + * - ``admin.secrets.read`` + - View information about users' secrets + + * - ``admin.secrets.write`` + - Manage users' secrets: add, edit, expire, block, delete + + * - ``user.password.change`` + - User's permission to change their own password + + * - ``admin.lowlevel.state.read`` + - Read low-level information from |tcm| storage (for debug purposes) + + * - ``admin.lowlevel.state.write`` + - Write low-level information to |tcm| storage (for debug purposes) + +.. _tcm_access_control_permissions_cluster: + +Cluster permissions +~~~~~~~~~~~~~~~~~~~ + +The following cluster permissions are available in |tcm|: + +.. list-table:: + :widths: auto + :header-rows: 1 + + * - Permission + - Description + + * - ``cluster.config.read`` + - View cluster configuration + + * - ``cluster.config.write`` + - Manage cluster configuration + + * - ``cluster.stateboard.read`` + - View cluster stateboard + + * - ``cluster.explorer.read`` + - Read data from cluster instances + + * - ``cluster.explorer.write`` + - Write data to cluster instances + + * - ``cluster.explorer.call`` + - Execute stored functions on cluster instances + + * - ``cluster.explorer.eval`` + - Execute code on cluster instances + + * - ``cluster.space.read`` + - Read cluster data schema + + * - ``cluster.space.write`` + - Modify cluster data schema + + * - ``cluster.lowlevel.state.read`` + - Read low-level information about cluster configuration (for debug purposes) + + * - ``cluster.lowlevel.state.write`` + - Write low-level information about cluster configuration (for debug purposes) diff --git a/doc/reference/tooling/tcm/tcm_audit_log.rst b/doc/reference/tooling/tcm/tcm_audit_log.rst new file mode 100644 index 0000000000..d702462027 --- /dev/null +++ b/doc/reference/tooling/tcm/tcm_audit_log.rst @@ -0,0 +1,332 @@ +.. _tcm_audit_log: + +Audit log +========= + +.. include:: index.rst + :start-after: ee_note_tcm_start + :end-before: ee_note_tcm_end + +|tcm_full_name| provides the audit logging functionality for tracking user activity +and security-related events, such as: + +* Successful and failed login attempts. +* Access to clusters, their configurations, data models, and stored data. +* Changes in the access control system: users, roles, passwords, LDAP configurations. + +The complete list of |tcm| audit events is provided in :ref:`Event types `. + +.. note:: + + |tcm| audit log records only events that happen in |tcm| itself. + For information about Tarantool audit logging, see :ref:`Audit module `. + +Audit logging is disabled in |tcm| by default. To start recording events, you need +to :ref:`enable ` and :ref:`configure ` it. + +The audit log stores event details in the JSON format. Each log entry contains the +event type, description, time, impacted objects, and other information that +may be used for incident investigation. The complete list of fields is provided in +:ref:`Structure of audit log events `. + +|tcm| also provides a built-in interface for reading and searching the audit log. +For details, see :ref:`Viewing audit log `. + +.. _tcm_audit_log_enable: + +Enabling audit logging +---------------------- + +To enable audit logging in |tcm|, go to **Audit settings** and click **Enable**. + +To additionally send audit log events to the standard output, click **Send to stdout**. + +.. _tcm_audit_log_config: + +Audit log configuration +----------------------- + +|tcm| audit events can be logged to a local file or sent to a +`syslog `__ server. +To configure audit logging, go to **Audit settings**. + +Writing to a file +~~~~~~~~~~~~~~~~~ + +To write |tcm| audit logs to a file: + +1. Go to **Audit settings** and select the **file** protocol. +2. Specify the name of the audit log file. The file appears in the |tcm| working directory. +3. Configure the log files rotation: the maximum file size and age, and the number + of files to store simultaneously. +4. (Optional) Enable compression of audit log files. + +.. TODO: move to UI reference + +Configuration parameters: + +- **Output file name**. The name of the audit log file. Default: ``audit.log`` +- **Max size (in MB)**. The maximum size of the log file before it gets rotated, in megabytes. Default: 100. +- **Max backups**. The maximum number of stored audit log files. Default: 10. +- **Max age (in days)**. The maximum age of audit log files in days. Default: 30. +- **Compress**. Compress audit log files into ``gzip`` archives when rotating. + +Sending to syslog +~~~~~~~~~~~~~~~~~ + +If you use a centralized log management system based on `syslog `__, +you can configure |tcm| to send its audit log to your syslog server: + +1. Go to **Audit settings** and select the **syslog** protocol. +2. Enter the syslog server URI and select the network protocol. Typically, + ``syslogd`` listens on port 514 and uses the UDP protocol. +3. Specify the syslog logging parameters: timeout, priority, and facility. + +.. TODO: move to UI reference + +Configuration parameters: + +- **Protocol**. The network protocol used for connecting to the syslog server. Default: ``udp``. +- **Output**. The syslog server URI. Default: 127.0.0.1:514 (localhost). +- **Timeout**. The syslog write timeout in the `ISO 8601 duration format `__. + Default: ``PT2S`` (two seconds). +- **Priority**. The syslog severity level. Default: ``info``. +- **Facility**. The syslog facility. Default: ``local0``. + +Selecting audit events to record +-------------------------------- + +When the audit log is enabled, |tcm| records all audit events listed in :ref:`Event types `. +To decrease load and make the audit log comply with specific security +requirements, you can record only selected events. For example, these can be events +of user account management or events of cluster data access. + +To select events to record into the audit log, go to **Audit settings** and +enter their :ref:`types ` into the **Filters** field +one-by-one, pressing the **Enter** key after each type. + +To remove an event type from a filters list, click the cross icon beside it. + +.. _tcm_audit_log_view: + +Viewing audit log +----------------- + +If the audit log is written to a file, you can view it in |tcm| on the **Audit log** page. +On this page, you can view or search for events. + +To view the details of a logged audit event, click the corresponding line in the +table. + +To search for an event, use the search bar at the top of the page. Note that the +search is case-sensitive. For example, to find events with the ``ALARM`` severity, +enter ``ALARM``, not ``alarm``. + +.. _tcm_audit_log_structure: + +Structure of audit log events +----------------------------- + +All entries of the |tcm| audit log include the mandatory fields listed in the table below. + +.. container:: table + + .. list-table:: + :widths: 20 40 40 + :header-rows: 1 + + * - Field + - Description + - Example + * - ``time`` + - Time of the event + - 2023-11-23T12:05:27.099+07:00 + * - ``severity`` + - Event severity: ``VERBOSE``, ``INFO``, ``WARNING``, or ``ALARM`` + - INFO + * - ``type`` + - Audit :ref:`event type ` + - user.update + * - ``description`` + - Human-readable event description + - Update user + * - ``uuid`` + - Event UUID + - f8744f51-5760-40c3-ae2d-0b4d6b44836f + * - ``user`` + - UUID of the user who triggered the event + - 942a4f54-cf7f-4f46-80ce-3511dbbb57b7 + * - ``remote`` + - Remote host that triggered the event + - 100.96.163.226:48722 + * - ``host`` + - The |tcm| host on which the event happened + - 100.96.163.226:8080 + * - ``userAgent`` + - Information about the client application and platform that was used to trigger the event + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 + * - ``permission`` + - The permission that was used to trigger the event + - ["admin.users.write"] + * - ``result`` + - Event result: ``ok`` or ``nok`` + - ok + * - ``err`` + - Human-readable error description for events with ``nok`` result + - failed to login + * - ``fields`` + - Additional fields for specific event types in the key-value format + - Key examples: + + - ``clusterId`` in cluster-related events + - ``payload`` in events that include sending data to the server + - ``username`` in ``current.*`` or ``auth.*`` events + + +This is an example of an audit log entry on a successful login attempt: + +.. code-block:: json + + { + "time": "2023-11-23T12:01:27.247+07:00", + "severity": "INFO", + "description": "Login user", + "type": "current.login", + "uuid": "4b9c2dd1-d9a1-4b40-a448-6bef4a0e5c79", + "user": "", + "remote": "127.0.0.1:63370", + "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36", + "host": "127.0.0.1:8080", + "permissions": [], + "result": "ok", + "fields": [ + { + "Key": "username", + "Value": "admin" + }, + { + "Key": "method", + "Value": "null" + }, + { + "Key": "output", + "Value": "true" + } + ] + } + +.. _tcm_audit_log_event_types: + +Event types +----------- + +The following table lists all possible values of the ``type`` field of |tcm| +audit log events. + +.. container:: table + + .. list-table:: + :widths: auto + :header-rows: 1 + + * - Event type + - Description + + * - ``auth.fail`` + - Authentication failed + * - ``auth.ok`` + - Authentication successful + * - ``access.denied`` + - An attempt to access an object without the required permission + * - ``user.add`` + - User added + * - ``user.update`` + - User updated + * - ``user.delete`` + - User deleted + * - ``secret.add`` + - User secret added + * - ``secret.update`` + - User secret updated + * - ``secret.block`` + - User secret blocked + * - ``secret.unblock`` + - User secret unblocked + * - ``secret.delete`` + - User secret deleted + * - ``secret.expire`` + - User secret expired + * - ``session.revoke`` + - Session revoked + * - ``session.revokeuser`` + - All user's sessions revoked + * - ``explorer.insert`` + - Data inserted in a cluster + * - ``explorer.delete`` + - Data deleted from a cluster + * - ``explorer.replace`` + - Data replaced in a cluster + * - ``explorer.call`` + - Stored function called on a cluster + * - ``explorer.evaluate`` + - Code executed on a cluster + * - ``explorer.switchover`` + - Master switched manually + * - ``test.devmode`` + - Switched to development mode + * - ``auditlog.config`` + - Audit log configuration changed + * - ``passwordpolicy.save`` + - Password policy changed + * - ``passwordpolicy.resetpasswords`` + - All passwords expired by an administrator + * - ``ddl.save`` + - Cluster data model saved + * - ``ddl.apply`` + - Cluster data model applied + * - ``cluster.config.save`` + - Cluster configuration saved + * - ``cluster.config.reset`` + - Saved cluster configuration reset + * - ``cluster.config.apply`` + - Cluster configuration applied + * - ``current.logout`` + - User logged out their own session + * - ``current.revoke`` + - User revoked their own session + * - ``current.revokeall`` + - User revoked all their active sessions + * - ``current.changepassword`` + - User changed their password + * - ``role.add`` + - Role added + * - ``role.update`` + - Role updated + * - ``role.delete`` + - Role deleted + * - ``cluster.add`` + - Cluster added + * - ``cluster.update`` + - Cluster updated + * - ``cluster.delete`` + - Cluster removed + * - ``ldap.testlogin`` + - Login test executed for a LDAP configuration + * - ``ldap.testconnection`` + - Connection test executed for a LDAP configuration + * - ``ldap.add`` + - LDAP configuration added + * - ``ldap.update`` + - LDAP configuration updated + * - ``ldap.delete`` + - LDAP configuration deleted + * - ``addon.enable`` + - Add-on enabled + * - ``addon.disable`` + - Add-on disabled + * - ``addon.delete`` + - Add-on removed + * - ``tcmstate.save`` + - Low-level information saved in the TCM storage (for debug purposes) + * - ``tcmstate.delete`` + - Low-level information deleted from the TCM storage (for debug purposes) diff --git a/doc/reference/tooling/tcm/tcm_cluster_config.rst b/doc/reference/tooling/tcm/tcm_cluster_config.rst new file mode 100644 index 0000000000..817433baa3 --- /dev/null +++ b/doc/reference/tooling/tcm/tcm_cluster_config.rst @@ -0,0 +1,85 @@ +.. _tcm_configuring_clusters: + +Configuring clusters +==================== + +.. include:: index.rst + :start-after: ee_note_tcm_start + :end-before: ee_note_tcm_end + +|tcm_full_name| features a built-in text editor for Tarantool EE cluster configurations. + +When you :ref:`connect a cluster ` to |tcm|, it gains access +to the cluster's centralized configuration storage: an etcd or a Tarantool cluster. +|tcm| has both read and write access to the cluster configuration. This enables +the configuration editor to work in two ways: + +* If a configuration already exists, the editor shows its current state. +* When you change the configuration in the editor and apply changes, they + are sent to the configuration storage. + +To learn how to write Tarantool cluster configurations, see :ref:`configuration`. + +.. _tcm_configuring_clusters_manage: + +Managing a cluster's configuration +---------------------------------- + +The configuration editor is available on the **Cluster** > **Configuration** page. + +To start managing a cluster's configuration, select this cluster in the **Cluster** +drop-down and go to the **Configuration** page. + +A cluster configuration in |tcm| can consist of one or multiple YAML files. +When there are multiple files, they are all considered parts of a single cluster +configuration. You can use this for structuring big cluster configurations. +All files that form the configuration of a cluster are listed on the left side +of the **Cluster configuration** page. + +To add a cluster configuration file, click the plus icon (**+**) below the page title. + +To open a configuration file in the editor, click its name in the file list. + +To delete a cluster configuration file, click the **Delete** button beside the filename. + +To download a cluster configuration file, click the **Download** button beside the filename. + +.. warning:: + + All configuration changes are discarded when you leave the **Cluster configuration** page. + :ref:`Save ` the configuration if you want to continue + editing it later or :ref:`apply ` it + to start using it on the cluster. + +.. _tcm_configuring_clusters_save: + +Saving a configuration draft +---------------------------- + +|tcm| can store configurations drafts. If you want to leave an unfinished configuration +and return to it later, save it in |tcm|. Saving applies to whole cluster configurations: +it records the edits of all files, file additions, and file deletions. + +To save a cluster configuration draft after editing, click **Save** in the **Cluster configuration** page. + +All unsaved changes are discarded when you leave the **Cluster configuration** page. + +If you have a saved configuration draft, you can reset the changes for each of its +files individually. A reset returns the file into the state that is currently used +by a cluster (that is, saved in the configuration storage). If you reset a newly +added file, it is deleted. + +To reset a saved configuration file, click the **Reset** button beside the filename. + + +.. _tcm_configuring_clusters_apply: + +Applying a configuration +------------------------ + +When you finish editing a configuration and it's ready to use, apply the updated +configuration to the cluster. To apply a cluster configuration, click **Apply** +on the **Cluster configuration** page. This sends the new configuration to the cluster +configuration storage, and it comes into effect upon the cluster configuration reload. + + diff --git a/doc/reference/tooling/tcm/tcm_configuration.rst b/doc/reference/tooling/tcm/tcm_configuration.rst new file mode 100644 index 0000000000..c2179cef80 --- /dev/null +++ b/doc/reference/tooling/tcm/tcm_configuration.rst @@ -0,0 +1,228 @@ +.. _tcm_configuration: + +Configuration +============= + + +.. include:: index.rst + :start-after: ee_note_tcm_start + :end-before: ee_note_tcm_end + +.. TODO: write specific configuration tutorials for http, security, logging, and so on. (https://github.com/tarantool/doc/issues/3545) + +This topic describes how to configure |tcm_full_name|. For the complete +list of |tcm| configuration parameters, see the :ref:`TCM configuration reference `. + +Configuration structure +----------------------- + +|tcm_full_name| configuration is a set of parameters that define various aspects +of |tcm| functioning. Parameters are grouped by the particular aspect that they +affect. There are the following groups: + +* HTTP +* logging +* configuration storage +* security +* add-ons +* limits +* |tcm| running mode + +Parameter groups can be nested. For example, in the ``http`` group there are +``tls`` and ``websession-cookie`` groups, which define TLS encryption and +cookie settings. + +Parameter names are the full paths from the top-level group to the specific parameter. +For example: + +* ``http.host`` is the ``host`` parameter that is defined directly in the ``http`` group. +* ``http.tls.enabled`` is the ``enabled`` parameter that is defined in the ``tls`` + nested group within ``http``. + +.. _tcm_configuration_ways: + +Ways to pass configuration parameters +------------------------------------- + +There are three ways to pass |tcm| configuration parameters: + +- a YAML file +- environment variables +- command-line options of the |tcm| executable + +.. _tcm_configuration_ways_yaml: + +YAML file +~~~~~~~~~ + +|tcm| configuration can be stored in a YAML file. Its structure must reflect the +configuration parameters hierarchy. + +The example below shows a fragment of a |tcm| configuration file: + +.. code-block:: yaml + + # a fragment of a YAML configuration file + cluster: # top-level group + on-air-limit: 4096 + connection-rate-limit: 512 + tarantool-timeout: 10s + tarantool-ping-timeout: 5s + http: # top-level group + basic-auth: # nested group + enabled: false + network: tcp + host: 127.0.0.1 + port: 8080 + request-size: 1572864 + websocket: # nested group + read-buffer-size: 16384 + write-buffer-size: 16384 + keepalive-ping-interval: 20s + handshake-timeout: 10s + init-timeout: 15s + +To start |tcm| with a YAML configuration, pass the location of the configuration +file in the ``-c`` command-line option: + +.. code-block:: console + + tcm -c=config.yml + +.. _tcm_configuration_ways_env: + +Environment variables +~~~~~~~~~~~~~~~~~~~~~ + +|tcm| can take values of its configuration parameters from environment variables. +The variable names start with ``TCM_``. Then goes the full path to the parameter, +converted to upper case. All delimiters are replaced with underscores (``_``). +Examples: + +- ``TCM_HTTP_HOST`` is a variable for the ``http.host`` parameter. +- ``TCM_HTTP_WEBSESSION_COOKIE_NAME`` is a variable for the ``http.websession-cookie.name`` parameter. + +The example below shows how to start |tcm| with configuration parameters passed in +environment variables: + +.. code-block:: console + + export TCM_HTTP_HOST=0.0.0.0 + export TCM_HTTP_PORT=8888 + tcm + +.. _tcm_configuration_ways_cli: + +Command-line arguments +~~~~~~~~~~~~~~~~~~~~~~ + +The |tcm| executable has ``--`` command-line options for each configuration parameter. +Their names reflect the full path to the parameter, with all delimiters replaced by +hyphens (``-``). Examples: + +- ``--http-host`` is an option for ``http.host``. +- ``--http-websession-cookie-name`` is an option for ``http.websession-cookie.name``. + +The example below shows how to start |tcm| with configuration parameters passed in +command-line options: + +.. code-block:: console + + ./tcm --storage.etcd.embed.enabled --addon.enabled --http.host=0.0.0.0 --http.port=8888 + + +.. _tcm_configuration_precedence: + +Configuration precedence +~~~~~~~~~~~~~~~~~~~~~~~~ + +|tcm| configuration options are applied from multiple sources with the following precedence, +from highest to lowest: + +#. ``tcm`` executable arguments. +#. `TCM_*` environment variables. +#. Configuration from a YAML file. + +If the same option is defined in two or more locations, the option with the highest +precedence is applied. For options that aren't defined in any location, the default +values are used. + +You can combine different ways of |tcm| configuration for efficient management of +multiple |tcm| installations: + +- A single YAML file for all installations can contain the common configuration parts. + For example, a single configuration storage that is used for all installations, or + TLS settings. +- Environment variables that set specific parameters for each server, such as + local directories and paths. +- Command-line options for parameters that must be unique for different |tcm| instances + running on a single server. For example, ``http.port``. + +Configuration parameter types +----------------------------- + +|tcm| configuration parameters have the `Go `__ language +types. Note that this is different from the :ref:`Tarantool configuration parameters `, +which have Lua types. + +Most options have the Go's basic types: ``int`` and other numeric types, ``bool``, ``string``. + +.. code-block:: yaml + + http: + basic-auth: + enabled: false # bool + network: tcp # string + host: 127.0.0.1 # string + port: 8080 # int + request-size: 1572864 # int64 + +Parameters that can take multiple values are arrays. In YAML, they are passed as +YAML arrays: each item on a new line, starting with a dash. + +.. code-block:: yaml + + storage: + provider: etcd + etcd: + endpoints: # array + - https://192.168.0.1:2379 # item 1 + - https://192.168.0.2:2379 # item 2 + +.. note:: + + In environment variables and command line options, such arrays are passed as + semicolon-separated strings of items. + +Parameters that set timeouts, TTLs, and other duration values, have the Go's `time.Duration `__ +type. Their values can be passed in time-formatted strings such as ``4h30m25s``. + +.. code-block:: yaml + + cluster: + tarantool-timeout: 10s # duration + tarantool-ping-timeout: 5s # duration + +Finally, there are parameters whose values are constants defined in Go packages. +For example, :ref:`http.websession-cookie.same-site ` +values are constants from the Go's `http.SameSite `__ +type. To find out the exact values available for such parameters, refer to the `Go +packages documentation `__. + +.. code-block:: yaml + + http: + websession-cookie: + same-site: SameSiteStrictMode + +Creating a configuration template +--------------------------------- + +You can create a YAML configuration template for |tcm| with all parameters and +their default values using the ``generate-config`` option of the ``tcm`` executable. + +To write a default |tcm| configuration to the ``tcm.example.yml`` file, run: + +.. code-block:: console + + tcm generate-config > tcm.example.yml. \ No newline at end of file diff --git a/doc/reference/tooling/tcm/tcm_configuration_reference.rst b/doc/reference/tooling/tcm/tcm_configuration_reference.rst new file mode 100644 index 0000000000..dec444ea2d --- /dev/null +++ b/doc/reference/tooling/tcm/tcm_configuration_reference.rst @@ -0,0 +1,2096 @@ +.. _tcm_configuration_reference: + +Configuration reference +======================= + +.. include:: index.rst + :start-after: ee_note_tcm_start + :end-before: ee_note_tcm_end + +This topic describes :ref:`configuration parameters ` of |tcm_full_name|. + +There are the following groups of |tcm| configuration parameters: + +- :ref:`cluster ` +- :ref:`http ` +- :ref:`log ` +- :ref:`storage ` +- :ref:`addon ` +- :ref:`limits ` +- :ref:`security ` +- :ref:`mode ` + +.. _tcm_configuration_reference_cluster: + +cluster +------- + +The ``cluster`` group defines parameters of |tcm| interaction with connected +Tarantool clusters. + +- :ref:`on-air-limit ` +- :ref:`connection-rate-limit ` +- :ref:`tarantool-timeout ` +- :ref:`tarantool-ping-timeout ` + +.. _tcm_configuration_reference_cluster_on-air-limit: + +.. confval:: cluster.on-air-limit + + The maximum number of on-air requests from |tcm| to all connected clusters. + + | + | Type: int64 + | Default: 4096 + | Environment variable: TCM_CLUSTER_ON_AIR_LIMIT + | Command-line option: ``--cluster-on-air-limit`` + +.. _tcm_configuration_reference_cluster_connection-rate-limit: + +.. confval:: cluster.connection-rate-limit + + A rate limit for connections to Tarantool instances. + + | + | Type: uint + | Default: 512 + | Environment variable: TCM_CLUSTER_CONNECTION_RATE_LIMIT + | Command-line option: ``--cluster-connection-rate-limit`` + +.. _tcm_configuration_reference_cluster_tarantool-timeout: + +.. confval:: cluster.tarantool-timeout + + A timeout for receiving a response from Tarantool instances. + + | + | Type: time.Duration + | Default: 10s + | Environment variable: TCM_CLUSTER_TARANTOOL_TIMEOUT + | Command-line option: ``--cluster-tarantool-timeout`` + +.. _tcm_configuration_reference_cluster_tarantool-ping-timeout: + +.. confval:: cluster.tarantool-ping-timeout + + A timeout for receiving a ping response from Tarantool instances. + + | + | Type: time.Duration + | Default: 5s + | Environment variable: TCM_CLUSTER_TARANTOOL_PING_TIMEOUT + | Command-line option: ``--cluster-tarantool-ping-timeout`` + +.. _tcm_configuration_reference_http: + +http +---- + +The ``http`` group defines parameters of HTTP connections between |tcm| and clients. + +- :ref:`http.basic_auth.enabled ` +- :ref:`http.network ` +- :ref:`http.host ` +- :ref:`http.port ` +- :ref:`http.request-size ` +- :ref:`http.websocket.read-buffer-size ` +- :ref:`http.websocket.write-buffer-size ` +- :ref:`http.websocket.keepalive-ping-interval ` +- :ref:`http.websocket.handshake-timeout ` +- :ref:`http.websocket.init-timeout ` +- :ref:`http.websession-cookie.name ` +- :ref:`http.websession-cookie.path ` +- :ref:`http.websession-cookie.domain ` +- :ref:`http.websession-cookie.ttl ` +- :ref:`http.websession-cookie.secure ` +- :ref:`http.websession-cookie.http-only ` +- :ref:`http.websession-cookie.same-site ` +- :ref:`http.cors.enabled ` +- :ref:`http.cors.allowed-origins ` +- :ref:`http.cors.allowed-methods ` +- :ref:`http.cors.allowed-headers ` +- :ref:`http.cors.exposed-headers ` +- :ref:`http.cors.allow-credentials ` +- :ref:`http.cors.debug ` +- :ref:`http.metrics-endpoint ` +- :ref:`http.tls.enabled ` +- :ref:`http.tls.cert-file ` +- :ref:`http.tls.key-file ` +- :ref:`http.tls.server ` +- :ref:`http.tls.min-version ` +- :ref:`http.tls.max-version ` +- :ref:`http.tls.curve-preferences ` +- :ref:`http.tls.cipher-suites ` +- :ref:`http.read-timeout ` +- :ref:`http.read-header-timeout ` +- :ref:`http.write-timeout ` +- :ref:`http.idle-timeout ` +- :ref:`http.idle-timeout ` +- :ref:`http.disable-general-options-handler ` +- :ref:`http.max-header-bytes ` +- :ref:`http.api-timeout ` +- :ref:`http.api-update-interval ` +- :ref:`http.frontend-dir ` +- :ref:`http.show-stack-trace ` +- :ref:`http.trace ` +- :ref:`http.max-static-size ` +- :ref:`http.graphql.complexity ` + + +.. _tcm_configuration_reference_http_basic-auth_enabled: + +.. confval:: http.basic_auth.enabled + + Whether to use the `HTTP basic authentication `__. + + | + | Type: bool + | Default: false + | Environment variable: TCM_HTTP_BASIC_AUTH_ENABLED + | Command-line option: ``--http-basic-auth-enabled`` + +.. _tcm_configuration_reference_http_network: + +.. confval:: http.network + + An addressing scheme that |tcm| uses. + + Possible values: + + - ``tcp``: IPv4 address + - ``tcp6``: IPv6 address + - ``unix``: Unix domain socket + + | + | Type: string + | Default: tcp + | Environment variable: TCM_HTTP_NETWORK + | Command-line option: ``--http-network`` + +.. _tcm_configuration_reference_http_host: + +.. confval:: http.host + + A host name on which |tcm| serves. + + | + | Type: string + | Default: 127.0.0.1 + | Environment variable: TCM_HTTP_HOST + | Command-line option: ``--http-host`` + + +.. _tcm_configuration_reference_http_port: + +.. confval:: http.port + + A port on which |tcm| serves. + + | + | Type: int + | Default: 8080 + | Environment variable: TCM_HTTP_PORT + | Command-line option: ``--http-port`` + + +.. _tcm_configuration_reference_http_request-size: + +.. confval:: http.request-size + + The maximum size (in bytes) of a client HTTP request to |tcm|. + + | + | Type: int64 + | Default: 1572864 + | Environment variable: TCM_HTTP_REQUEST_SIZE + | Command-line option: ``--http-request-size`` + +.. _tcm_configuration_reference_http_websocket_read-buffer-size: + +.. confval:: http.websocket.read-buffer-size + + The size (in bytes) of the read buffer for `WebSocket `__ + connections. + + | + | Type: int + | Default: 16384 + | Environment variable: TCM_HTTP_WEBSOCKET_READ_BUFFER_SIZE + | Command-line option: ``--http-websocket-read-buffer-size`` + +.. _tcm_configuration_reference_http_websocket_write-buffer-size: + +.. confval:: http.websocket.write-buffer-size + + The size (in bytes) of the write buffer for `WebSocket `__ + connections. + + | + | Type: int + | Default: 16384 + | Environment variable: TCM_HTTP_WEBSOCKET_WRITE_BUFFER_SIZE + | Command-line option: ``--http-websocket-write-buffer-size`` + +.. _tcm_configuration_reference_http_websocket_keepalive-ping-interval: + +.. confval:: http.websocket.keepalive-ping-interval + + The time interval for sending `WebSocket `__ + keepalive pings. + + | + | Type: time.Duration + | Default: 20s + | Environment variable: TCM_HTTP_WEBSOCKET_KEEPALIVE_PING_INTERVAL + | Command-line option: ``--http-websocket-keepalive-ping-interval`` + +.. _tcm_configuration_reference_http_websocket_handshake-timeout: + +.. confval:: http.websocket.handshake-timeout + + The time limit for completing a `WebSocket `__ + opening handshake with a client. + + | + | Type: time.Duration + | Default: 10s + | Environment variable: TCM_HTTP_WEBSOCKET_HANDSHAKE_TIMEOUT + | Command-line option: ``--http-websocket-handshake-timeout`` + +.. _tcm_configuration_reference_http_websocket_init-timeout: + +.. confval:: http.websocket.init-timeout + + The time limit for establishing a `WebSocket `__ + connection with a client. + + | + | Type: time.Duration + | Default: 15s + | Environment variable: TCM_HTTP_WEBSOCKET_INIT_TIMEOUT + | Command-line option: ``--http-websocket-init-timeout`` + +.. _tcm_configuration_reference_http_websession-cookie_name: + +.. confval:: http.websession-cookie.name + + The name of the cookie that |tcm| sends to clients. + + This value is used as the cookie name in the `Set-Cookie `__ + HTTP response header. + + | + | Type: string + | Default: tcm + | Environment variable: TCM_HTTP_WEBSESSION_COOKIE_NAME + | Command-line option: ``--http-websession-cookie-name`` + +.. _tcm_configuration_reference_http_websession-cookie_path: + +.. confval:: http.websession-cookie.path + + The URL path that must be present in the requested URL in order to send the cookie. + + This value is used in the ``Path`` attribute of the `Set-Cookie `__ + HTTP response header. + + | + | Type: string + | Default: "" + | Environment variable: TCM_HTTP_WEBSESSION_COOKIE_PATH + | Command-line option: ``--http-websession-cookie-path`` + +.. _tcm_configuration_reference_http_websession-cookie_domain: + +.. confval:: http.websession-cookie.domain + + The domain to which the cookie can be sent. + + This value is used in the ``Domain`` attribute of the `Set-Cookie `__ + HTTP response header. + + | + | Type: string + | Default: "" + | Environment variable: TCM_HTTP_WEBSESSION_COOKIE_DOMAIN + | Command-line option: ``--http-websession-cookie-domain`` + +.. _tcm_configuration_reference_http_websession-cookie_ttl: + +.. confval:: http.websession-cookie.ttl + + The maximum lifetime of the |tcm| cookie. + + This value is used in the ``Max-Age`` attribute of the `Set-Cookie `__ + HTTP response header. + + | + | Type: time.Duration + | Default: 2h0m0s + | Environment variable: TCM_HTTP_WEBSESSION_COOKIE_TTL + | Command-line option: ``--http-websession-cookie-ttl`` + +.. _tcm_configuration_reference_http_websession-cookie_secure: + +.. confval:: http.websession-cookie.secure + + Indicates whether the cookie can be sent only over the HTTPS protocol. + In this case, it's never sent over the unencrypted HTTP, therefore preventing + man-in-the-middle attacks. + + When ``true``, the ``Secure`` attribute is added to the `Set-Cookie `__ + HTTP response header. + + | + | Type: bool + | Default: false + | Environment variable: TCM_HTTP_WEBSESSION_COOKIE_SECURE + | Command-line option: ``--http-websession-cookie-secure`` + +.. _tcm_configuration_reference_http_websession-cookie_http-only: + +.. confval:: http.websession-cookie.http-only + + Indicates that the cookie can't be accessed from the JavaScript + `Document.cookie `__ API. + This helps mitigate cross-site scripting attacks. + + When ``true``, the ``HttpOnly`` attribute is added to the `Set-Cookie `__ + HTTP response header. + + | + | Type: bool + | Default: true + | Environment variable: TCM_HTTP_WEBSESSION_COOKIE_HTTP_ONLY + | Command-line option: ``--http-websession-cookie-http-only`` + +.. _tcm_configuration_reference_http_websession-cookie_same-site: + +.. confval:: http.websession-cookie.same-site + + Indicates if it is possible to send the |tcm| cookie along with cross-site + requests. Possible values are the Go's `http.SameSite `__ constants: + + - ``SameSiteDefaultMode`` + - ``SameSiteLaxMode`` + - ``SameSiteStrictMode`` + - ``SameSiteNoneMode`` + + For details on ``SameSite`` modes, see the `Set-Cookie header documentation `__ + in the MDN web docs. + + This value is used in the ``SameSite`` attribute of the `Set-Cookie `__ + HTTP response header. + + | + | Type: http.SameSite + | Default: SameSiteDefaultMode + | Environment variable: TCM_HTTP_WEBSESSION_COOKIE_SAME_SITE + | Command-line option: ``--http-websession-cookie-same-site`` + +.. _tcm_configuration_reference_http_cors_enabled: + +.. confval:: http.cors.enabled + + Indicates whether to use the `Cross-Origin Resource Sharing `__ + (*CORS*). + + | + | Type: bool + | Default: false + | Environment variable: TCM_HTTP_CORS_ENABLED + | Command-line option: ``--http-cors-enabled`` + +.. _tcm_configuration_reference_http_cors_allowed-origins: + +.. confval:: http.cors.allowed-origins + + The `origins `__ + with which the HTTP response can be shared, separated by semicolons. + + The specified values are sent in the `Access-Control-Allow-Origin `__ + HTTP response headers. + + | + | Type: []string + | Default: [] + | Environment variable: TCM_HTTP_CORS_ALLOWED_ORIGINS + | Command-line option: ``--http-cors-allowed-origins`` + +.. _tcm_configuration_reference_http_cors_allowed-methods: + +.. confval:: http.cors.allowed-methods + + HTTP request methods that are allowed when accessing a resource, + separated by semicolons. + + The specified values are sent in the `Access-Control-Allow-Methods `__ + HTTP header of a response to a `CORS preflight request `__. + + | + | Type: []string + | Default: [] + | Environment variable: TCM_HTTP_CORS_ALLOWED_METHODS + | Command-line option: ``--http-cors-allowed-methods`` + +.. _tcm_configuration_reference_http_cors_allowed-headers: + +.. confval:: http.cors.allowed-headers + + HTTP headers that are allowed during the actual request, separated by semicolons. + + The specified values are sent in the `Access-Control-Allow-Headers `__ + HTTP header of a response to a `CORS preflight request `__. + + | + | Type: []string + | Default: [] + | Environment variable: TCM_HTTP_CORS_ALLOWED_HEADERS + | Command-line option: ``--http-cors-allowed-headers`` + +.. _tcm_configuration_reference_http_cors_exposed-headers: + +.. confval:: http.cors.exposed-headers + + Response headers that should be made available to scripts running in the browser, + in response to a cross-origin request, separated by semicolons. + + The specified values are sent in the `Access-Control-Expose-Headers `__ + HTTP response headers. + + | + | Type: []string + | Default: [] + | Environment variable: TCM_HTTP_CORS_EXPOSED_HEADERS + | Command-line option: ``--http-cors-exposed-headers`` + +.. _tcm_configuration_reference_http_cors_allow-credentials: + +.. confval:: http.cors.allow-credentials + + Whether to expose the response to the frontend JavaScript code when the `request's + credentials `__ + mode is ``include``. + + When ``true``, the `Access-Control-Allow-Credentials `__ + HTTP response header is sent. + + | + | Type: bool + | Default: false + | Environment variable: TCM_HTTP_CORS_ALLOW_CREDENTIALS + | Command-line option: ``--http-cors-allow-credentials`` + +.. _tcm_configuration_reference_http_cors_debug: + +.. confval:: http.cors.debug + + For debug purposes. + + | + | Type: bool + | Default: false + +.. _tcm_configuration_reference_http_metrics-endpoint: + +.. confval:: http.metrics-endpoint + + The HTTP endpoint for |tcm| metrics in the `Prometheus `__ format. + + | + | Type: string + | Default: /metrics + | Environment variable: TCM_HTTP_METRICS_ENDPOINT + | Command-line option: ``--http-metrics-endpoint`` + +.. _tcm_configuration_reference_http_tls_enabled: + +.. confval:: http.tls.enabled + + Indicates whether TLS is enabled for client connections to |tcm|. + + | + | Type: bool + | Default: false + | Environment variable: TCM_HTTP_TLS_ENABLED + | Command-line option: ``--http-tls-enabled`` + +.. _tcm_configuration_reference_http_tls_cert-file: + +.. confval:: http.tls.cert-file + + A path to a TLS certificate file. Mandatory when TLS is enabled. + + | + | Type: string + | Default: "" + | Environment variable: TCM_HTTP_TLS_CERT_FILE + | Command-line option: ``--http-tls-cert-file`` + +.. _tcm_configuration_reference_http_tls_key-file: + +.. confval:: http.tls.key-file + + A path to a TLS private key file. Mandatory when TLS is enabled. + + | + | Type: string + | Default: "" + | Environment variable: TCM_HTTP_TLS_KEY_FILE + | Command-line option: ``--http-tls-key-file`` + +.. _tcm_configuration_reference_http_tls_server: + +.. confval:: http.tls.server + + The TSL server. + + | + | Type: string + | Default: "" + | Environment variable: TCM_HTTP_TLS_SERVER + | Command-line option: ``--http-tls-server`` + +.. _tcm_configuration_reference_http_tls_min-version: + +.. confval:: http.tls.min-version + + The minimum version of the TLS protocol. + + | + | Type: uint16 + | Default: 0 + | Environment variable: TCM_HTTP_TLS_MIN_VERSION + | Command-line option: ``--http-tls-min-version`` + +.. _tcm_configuration_reference_http_tls_max-version: + +.. confval:: http.tls.max-version + + The maximum version of the TLS protocol. + + | + | Type: uint16 + | Default: 0 + | Environment variable: TCM_HTTP_TLS_MAX_VERSION + | Command-line option: ``--http-tls-max-version`` + +.. _tcm_configuration_reference_http_tls_curve-preferences: + +.. confval:: http.tls.curve-preferences + + Elliptic curves that are used for TLS connections. + Possible values are the Go's `tls.CurveID `__ constants: + + - ``CurveP256`` + - ``CurveP384`` + - ``CurveP521`` + - ``X25519`` + + | + | Type: []tls.CurveID + | Default: [] + | Environment variable: TCM_HTTP_TLS_CURVE_PREFERENCES + | Command-line option: ``--http-tls-curve-preferences`` + +.. _tcm_configuration_reference_http_tls_cipher-suites: + +.. confval:: http.tls.cipher-suites + + Enabled TLS cipher suites. Possible values are the Golang `tls.TLS_* `__ constants. + + | + | Type: []uint16 + | Default: [] + | Environment variable: TCM_HTTP_TLS_CIPHER_SUITES + | Command-line option: ``--http-tls-cipher-suites`` + +.. _tcm_configuration_reference_http_read-timeout: + +.. confval:: http.read-timeout + + A timeout for reading an incoming request. + + | + | Type: time.Duration + | Default: 30s + | Environment variable: TCM_HTTP_READ_TIMEOUT + | Command-line option: ``--http-read-timeout`` + +.. _tcm_configuration_reference_http_read-header-timeout: + +.. confval:: http.read-header-timeout + + A timeout for reading headers of an incoming request. + + | + | Type: time.Duration + | Default: 30s + | Environment variable: TCM_HTTP_READ_HEADER_TIMEOUT + | Command-line option: ``--http-read-header-timeout`` + +.. _tcm_configuration_reference_http_write-timeout: + +.. confval:: http.write-timeout + + A timeout for writing a response. + + | + | Type: time.Duration + | Default: 30s + | Environment variable: TCM_HTTP_WRITE_TIMEOUT + | Command-line option: ``--http-write-timeout`` + +.. _tcm_configuration_reference_http_idle-timeout: + +.. confval:: http.idle-timeout + + The timeout for idle connections. + + | + | Type: time.Duration + | Default: 30s + | Environment variable: TCM_HTTP_IDLE_TIMEOUT + | Command-line option: ``--http-idle-timeout`` + +.. _tcm_configuration_reference_http_disable-general-options-handler: + +.. confval:: http.disable-general-options-handler + + Whether the client requests with the ``OPTIONS`` HTTP method are allowed. + + | + | Type: bool + | Default: false + | Environment variable: TCM_HTTP_DISABLE_GENERAL_OPTIONS_HANDLER + | Command-line option: ``--http-disable-general-options-handler`` + +.. _tcm_configuration_reference_http_max-header-bytes: + +.. confval:: http.max-header-bytes + + The maximum size (in bytes) of a header in a client's request to |TCM|. + + | + | Type: int + | Default: 0 + | Environment variable: TCM_HTTP_MAX_HEADER_BYTES + | Command-line option: ``--http-max-header-bytes`` + +.. _tcm_configuration_reference_http_api-timeout: + +.. confval:: http.api-timeout + + The stateboard update timeout. + + | + | Type: time.Duration + | Default: 8s + | Environment variable: TCM_HTTP_API_TIMEOUT + | Command-line option: ``--http-api-timeout`` + +.. _tcm_configuration_reference_http_api-update-interval: + +.. confval:: http.api-update-interval + + The stateboard update interval. + + | + | Type: time.Duration + | Default: 5s + | Environment variable: TCM_HTTP_API_UPDATE_INTERVAL + | Command-line option: ``--http-api-update-interval`` + +.. _tcm_configuration_reference_http_frontend-dir: + +.. confval:: http.frontend-dir + + The directory with custom |tcm| frontend files (for development purposes). + + | + | Type: string + | Default: "" + | Environment variable: TCM_HTTP_FRONTEND_DIR + | Command-line option: ``--http-frontend-dir`` + +.. _tcm_configuration_reference_http_show-stack-trace: + +.. confval:: http.show-stack-trace + + Whether error stack traces are shown in the web UI. + + | + | Type: bool + | Default: true + | Environment variable: TCM_HTTP_SHOW_STACK_TRACE + | Command-line option: ``--http-show-stack-trace`` + +.. _tcm_configuration_reference_http_trace: + +.. confval:: http.trace + + Whether all query tracing information is written in logs. + + | + | Type: bool + | Default: false + | Environment variable: TCM_HTTP_TRACE + | Command-line option: ``--http-trace`` + +.. _tcm_configuration_reference_http_max-static-size: + +.. confval:: http.max-static-size + + The maximum size (in bytes) of a static content sent to |TCM|. + + | + | Type: int + | Default: 104857600 + | Environment variable: TCM_HTTP_MAX_STATIC_SIZE + | Command-line option: ``--http-max-static-size`` + +.. _tcm_configuration_reference_http_graphql_complexity: + +.. confval:: http.graphql.complexity + + The maximum `complexity `__ of + GraphQL queries that |tcm| processes. If this value is exceeded, |tcm| + returns an error. + + | + | Type: int + | Default: 40 + | Environment variable: TCM_HTTP_GRAPHQL_COMPLEXITY + | Command-line option: ``--http-graphql-complexity`` + + +.. log configuration + +.. _tcm_configuration_reference_log: + +log +--- + +The ``log`` section defines the |tcm| logging parameters. + +- :ref:`log.default.add-source ` +- :ref:`log.default.show-stack-trace ` +- :ref:`log.default.level ` +- :ref:`log.default.format ` +- :ref:`log.default.output ` +- :ref:`log.default.no-colorized ` +- :ref:`log.default.file.name ` +- :ref:`log.default.file.maxsize ` +- :ref:`log.default.file.maxage ` +- :ref:`log.default.file.maxbackups ` +- :ref:`log.default.file.compress ` +- :ref:`log.default.syslog.protocol ` +- :ref:`log.default.syslog.output ` +- :ref:`log.default.syslog.priority ` +- :ref:`log.default.syslog.facility ` +- :ref:`log.default.syslog.tag ` +- :ref:`log.default.syslog.timeout ` +- :ref:`log.outputs ` + +.. _tcm_configuration_reference_log_default_add-source: + +.. confval:: log.default.add-source + + Whether sources are added to the |tcm| log. + + | + | Type: bool + | Default: false + | Environment variable: TCM_LOG_DEFAULT_ADD_SOURCE + | Command-line option: ``--log-default-add-source`` + +.. _tcm_configuration_reference_log_default_show-stack-trace: + +.. confval:: log.default.show-stack-trace + + Whether stack traces are added to the |tcm| log. + + | + | Type: bool + | Default: false + | Environment variable: TCM_LOG_DEFAULT_SHOW_STACK_TRACE + | Command-line option: ``--log-default-show-stack-trace`` + +.. _tcm_configuration_reference_log_default_level: + +.. confval:: log.default.level + + The default |tcm| logging level. + + Possible values: + + * ``VERBOSE`` + * ``INFO`` + * ``WARN`` + * ``ALARM`` + + | + | Type: string + | Default: INFO + | Environment variable: TCM_LOG_DEFAULT_LEVEL + | Command-line option: ``--log-default-level`` + +.. _tcm_configuration_reference_log_default_format: + +.. confval:: log.default.format + + |tcm| log entries format. + + Possible values: + + * ``struct`` + * ``json`` + + | + | Type: string + | Default: struct + | Environment variable: TCM_LOG_DEFAULT_FORMAT + | Command-line option: ``--log-default-format`` + +.. _tcm_configuration_reference_log_default_output: + +.. confval:: log.default.output + + The output used for |tcm| log. + + Possible values: + + * ``stdout`` + * ``stderr`` + * ``file`` + * ``syslog`` + + | + | Type: string + | Default: stdout + | Environment variable: TCM_LOG_DEFAULT_OUTPUT + | Command-line option: ``--log-default-output`` + +.. _tcm_configuration_reference_log_default_no-colorized: + +.. confval:: log.default.no-colorized + + Whether the stdout log is not colorized. + + | + | Type: bool + | Default: false + | Environment variable: TCM_LOG_DEFAULT_NO_COLORIZED + | Command-line option: ``--log-default-no-colorized`` + +.. _tcm_configuration_reference_log_default_file_name: + +.. confval:: log.default.file.name + + The name of the |tcm| log file. + + | + | Type: string + | Default: "" + | Environment variable: TCM_LOG_DEFAULT_FILE_NAME + | Command-line option: ``--log-default-file-name`` + +.. _tcm_configuration_reference_log_default_file_maxsize: + +.. confval:: log.default.file.maxsize + + The maximum size (in bytes) of the |tcm| log file. + + | + | Type: int + | Default: 0 + | Environment variable: TCM_LOG_DEFAULT_FILE_MAXSIZE + | Command-line option: ``--log-default-file-maxsize`` + +.. _tcm_configuration_reference_log_default_file_maxage: + +.. confval:: log.default.file.maxage + + The maximum age of a |tcm| log file, in days. + + | + | Type: int + | Default: 0 + | Environment variable: TCM_LOG_DEFAULT_FILE_MAXAGE + | Command-line option: ``--log-default-file-maxage`` + +.. _tcm_configuration_reference_log_default_file_maxbackups: + +.. confval:: log.default.file.maxbackups + + The maximum number of users in |tcm|. + + | + | Type: int + | Default: 0 + | Environment variable: TCM_LOG_DEFAULT_FILE_MAXBACKUPS + | Command-line option: ``--log-default-file-maxbackups`` + +.. _tcm_configuration_reference_log_default_file_compress: + +.. confval:: log.default.file.compress + + Indicated that |tcm| compresses log files upon rotation. + + | + | Type: bool + | Default: false + | Environment variable: TCM_LOG_DEFAULT_FILE_COMPRESS + | Command-line option: ``--log-default-file-compress`` + +.. _tcm_configuration_reference_log_default_syslog_protocol: + +.. confval:: log.default.syslog.protocol + + The network protocol used for connecting to the syslog server. Typically, + it's ``tcp``, ``udp``, or ``unix``. All possible values are listed in the Go's + `net.Dial `__ documentation. + + | + | Type: string + | Default: tcp + | Environment variable: TCM_LOG_DEFAULT_SYSLOG_PROTOCOL + | Command-line option: ``--log-default-syslog-protocol`` + +.. _tcm_configuration_reference_log_default_syslog_output: + +.. confval:: log.default.syslog.output + + The syslog server URI. + + | + | Type: string + | Default: 127.0.0.1:5514 + | Environment variable: TCM_LOG_DEFAULT_SYSLOG_OUTPUT + | Command-line option: ``--log-default-syslog-output`` + +.. _tcm_configuration_reference_log_default_syslog_priority: + +.. confval:: log.default.syslog.priority + + The syslog severity level. + + | + | Type: string + | Default: "" + | Environment variable: TCM_LOG_DEFAULT_SYSLOG_PRIORITY + | Command-line option: ``--log-default-syslog-priority`` + +.. _tcm_configuration_reference_log_default_syslog_facility: + +.. confval:: log.default.syslog.facility + + The syslog facility. + + | + | Type: string + | Default: "" + | Environment variable: TCM_LOG_DEFAULT_SYSLOG_FACILITY + | Command-line option: ``--log-default-syslog-facility`` + +.. _tcm_configuration_reference_log_default_syslog_tag: + +.. confval:: log.default.syslog.tag + + The syslog tag. + + | + | Type: string + | Default: "" + | Environment variable: TCM_LOG_DEFAULT_SYSLOG_TAG + | Command-line option: ``--log-default-syslog-tag`` + +.. _tcm_configuration_reference_log_default_syslog_timeout: + +.. confval:: log.default.syslog.timeout + + The timeout for connecting to the syslog server. + + | + | Type: time.Duration + | Default: 10s + | Environment variable: TCM_LOG_DEFAULT_SYSLOG_TIMEOUT + | Command-line option: ``--log-default-syslog-timeout`` + +.. _tcm_configuration_reference_log_outputs: + +.. confval:: log.outputs + + An array of log outputs that |tcm| uses **in addition** to the default one + that is defined by the ``log.default.*`` parameters. Each array item can include + the parameters of the ``log.default`` group. If a parameter is skipped, its + value is taken from ``log.default``. + + | + | Type: []LogOuputConfig + | Default: [] + | Environment variable: TCM_LOG_OUTPUTS + | Command-line option: ``--log-outputs`` + + +.. storage configuration + +.. _tcm_configuration_reference_storage: + +storage +------- + +The ``storage`` section defines the parameters of the configuration storage that +|tcm| uses for connected clusters. + +- :ref:`storage.provider ` + +etcd storage parameters: + +- :ref:`storage.etcd.prefix ` +- :ref:`storage.etcd.endpoints ` +- :ref:`storage.etcd.dial-timeout ` +- :ref:`storage.etcd.auto-sync-interval ` +- :ref:`storage.etcd.dial-keep-alive-time ` +- :ref:`storage.etcd.dial-keep-alive-timeout ` +- :ref:`storage.etcd.bootstrap-timeout ` +- :ref:`storage.etcd.max-call-send-msg-size ` +- :ref:`storage.etcd.username ` +- :ref:`storage.etcd.password ` +- :ref:`storage.etcd.tls.enabled ` +- :ref:`storage.etcd.tls.auto ` +- :ref:`storage.etcd.tls.cert-file ` +- :ref:`storage.etcd.tls.key-file ` +- :ref:`storage.etcd.tls.trusted-ca-file ` +- :ref:`storage.etcd.tls.client-cert-auth ` +- :ref:`storage.etcd.tls.crl-file ` +- :ref:`storage.etcd.tls.insecure-skip-verify ` +- :ref:`storage.etcd.tls.skip-client-san-verify ` +- :ref:`storage.etcd.tls.server-name ` +- :ref:`storage.etcd.tls.cipher-suites ` +- :ref:`storage.etcd.tls.allowed-cn ` +- :ref:`storage.etcd.tls.allowed-hostname ` +- :ref:`storage.etcd.tls.empty-cn ` +- :ref:`storage.etcd.permit-without-stream ` +- :ref:`storage.etcd.embed.enabled ` +- :ref:`storage.etcd.embed.endpoints ` +- :ref:`storage.etcd.embed.advertises ` +- :ref:`storage.etcd.embed.tls.enabled ` +- :ref:`storage.etcd.embed.tls.auto ` +- :ref:`storage.etcd.embed.tls.cert-file ` +- :ref:`storage.etcd.embed.tls.key-file ` +- :ref:`storage.etcd.embed.tls.trusted-ca-file ` +- :ref:`storage.etcd.embed.tls.client-cert-auth ` +- :ref:`storage.etcd.embed.tls.crl-file ` +- :ref:`storage.etcd.embed.tls.insecure-skip-verify ` +- :ref:`storage.etcd.embed.tls.skip-client-san-verify ` +- :ref:`storage.etcd.embed.tls.server-name ` +- :ref:`storage.etcd.embed.tls.cipher-suites ` +- :ref:`storage.etcd.embed.tls.allowed-cn ` +- :ref:`storage.etcd.embed.tls.allowed-hostname ` +- :ref:`storage.etcd.embed.tls.empty-cn ` +- :ref:`storage.etcd.embed.peer-endpoints ` +- :ref:`storage.etcd.embed.peer-advertises ` +- :ref:`storage.etcd.embed.peer-tls.enabled ` +- :ref:`storage.etcd.embed.peer-tls.auto ` +- :ref:`storage.etcd.embed.peer-tls.cert-file ` +- :ref:`storage.etcd.embed.peer-tls.key-file ` +- :ref:`storage.etcd.embed.peer-tls.trusted-ca-file ` +- :ref:`storage.etcd.embed.peer-tls.client-cert-auth ` +- :ref:`storage.etcd.embed.peer-tls.crl-file ` +- :ref:`storage.etcd.embed.peer-tls.insecure-skip-verify ` +- :ref:`storage.etcd.embed.peer-tls.skip-client-san-verify ` +- :ref:`storage.etcd.embed.peer-tls.server-name ` +- :ref:`storage.etcd.embed.peer-tls.cipher-suites ` +- :ref:`storage.etcd.embed.peer-tls.allowed-cn ` +- :ref:`storage.etcd.embed.peer-tls.allowed-hostname ` +- :ref:`storage.etcd.embed.peer-tls.empty-cn ` +- :ref:`storage.etcd.embed.grpc-keep-alive-timeout ` +- :ref:`storage.etcd.embed.grpc-keep-alive-interval ` +- :ref:`storage.etcd.embed.grpc-keep-alive-min-time ` +- :ref:`storage.etcd.embed.workdir ` +- :ref:`storage.etcd.embed.waldir ` +- :ref:`storage.etcd.embed.max-request-bytes ` +- :ref:`storage.etcd.embed.debug ` +- :ref:`storage.etcd.embed.start-timeout ` +- :ref:`storage.etcd.embed.log-level ` +- :ref:`storage.etcd.embed.initial-cluster ` +- :ref:`storage.etcd.embed.initial-cluster-token ` +- :ref:`storage.etcd.embed.name ` +- :ref:`storage.etcd.embed.initial-cluster-state ` +- :ref:`storage.etcd.embed.self-signed-cert-validity ` + +Tarantool storage parameters: + +- :ref:`storage.tarantool.prefix ` +- :ref:`storage.tarantool.addr ` +- :ref:`storage.tarantool.auth ` +- :ref:`storage.tarantool.reconnect ` +- :ref:`storage.tarantool.max-reconnects ` +- :ref:`storage.tarantool.user ` +- :ref:`storage.tarantool.pass ` +- :ref:`storage.tarantool.rate-limit ` +- :ref:`storage.tarantool.rate-limit-action ` +- :ref:`storage.tarantool.concurrency ` +- :ref:`storage.tarantool.skip-schema ` +- :ref:`storage.tarantool.transport ` +- :ref:`storage.tarantool.ssl.key-file ` +- :ref:`storage.tarantool.ssl.cert-file ` +- :ref:`storage.tarantool.ssl.ca-file ` +- :ref:`storage.tarantool.ssl.ciphers ` +- :ref:`storage.tarantool.ssl.password ` +- :ref:`storage.tarantool.required-protocol-info.auth ` +- :ref:`storage.tarantool.required-protocol-info.version ` +- :ref:`storage.tarantool.required-protocol-info.features ` +- :ref:`storage.tarantool.embed.enabled ` +- :ref:`storage.tarantool.embed.workdir ` +- :ref:`storage.tarantool.embed.executable ` +- :ref:`storage.tarantool.embed.config-filename ` +- :ref:`storage.tarantool.embed.config ` +- :ref:`storage.tarantool.embed.args ` +- :ref:`storage.tarantool.embed.env ` + + +.. _tcm_configuration_reference_storage_provider: + + +.. confval:: storage.provider + + The type of the storage used for storing |tcm| configuration. + + Possible values: + + - ``etcd`` + - ``tarantool`` + + | + | Type: string + | Default: etcd + | Environment variable: TCM_STORAGE_PROVIDER + | Command-line option: ``--storage-provider`` + +.. _tcm_configuration_reference_storage_etcd_prefix: + +.. confval:: storage.etcd.prefix + + A prefix for the |tcm| configuration parameters in etcd. + + | + | Type: string + | Default: "/tcm" + | Environment variable: TCM_STORAGE_ETCD_PREFIX + | Command-line option: ``--storage-etcd-prefix`` + + +.. _tcm_configuration_reference_storage_etcd_endpoints: + +.. confval:: storage.etcd.endpoints + + An array of node URIs of the etcd cluster where the |tcm| configuration is stored, + separated by semicolons (``;``). + + | + | Type: []string + | Default: ["http://127.0.0.1:2379"] + | Environment variable: TCM_STORAGE_ETCD_ENDPOINTS + | Command-line option: ``--storage-etcd-endpoints`` + + +.. _tcm_configuration_reference_storage_etcd_dial-timeout: + +.. confval:: storage.etcd.dial-timeout + + An etcd dial timeout. + + | + | Type: time.Duration + | Default: 10s + | Environment variable: TCM_STORAGE_ETCD_DIAL_TIMEOUT + | Command-line option: ``--storage-etcd-dial-timeout`` + +.. _tcm_configuration_reference_storage_etcd_auto-sync-interval: + +.. confval:: storage.etcd.auto-sync-interval + + An automated sync interval. + + | + | Type: time.Duration + | Default: 0s + | Environment variable: TCM_STORAGE_ETCD_AUTO_SYNC_INTERVAL + | Command-line option: ``--storage-etcd-auto-sync-interval`` + +.. _tcm_configuration_reference_storage_etcd_dial-keep-alive-time: + +.. confval:: storage.etcd.dial-keep-alive-time + + A dial keep-alive time. + + | + | Type: time.Duration + | Default: 30s + | Environment variable: TCM_STORAGE_ETCD_DIAL_KEEP_ALIVE_TIME + | Command-line option: ``--storage-etcd-dial-keep-alive-time`` + +.. _tcm_configuration_reference_storage_etcd_dial-keep-alive-timeout: + +.. confval:: storage.etcd.dial-keep-alive-timeout + + A dial keep-alive timeout. + + | + | Type: time.Duration + | Default: 30s + | Environment variable: TCM_STORAGE_ETCD_DIAL_KEEP_ALIVE_TIMEOUT + | Command-line option: ``--storage-etcd-dial-keep-alive-timeout`` + +.. _tcm_configuration_reference_storage_etcd_bootstrap-timeout: + +.. confval:: storage.etcd.bootstrap-timeout + + A bootstrap timeout. + + | + | Type: time.Duration + | Default: 30s + | Environment variable: TCM_STORAGE_ETCD_BOOTSTRAP_TIMEOUT + | Command-line option: ``--storage-etcd-bootstrap-timeout`` + +.. _tcm_configuration_reference_storage_etcd_max-call-send-msg-size: + +.. confval:: storage.etcd.max-call-send-msg-size + + The maximum size (in bytes) of a transaction between |tcm| and etcd. + + | + | Type: int + | Default: 2097152 + | Environment variable: TCM_STORAGE_ETCD_MAX_CALL_SEND_MSG_SIZE + | Command-line option: ``--storage-etcd-max-call-send-msg-size`` + +.. _tcm_configuration_reference_storage_etcd_username: + +.. confval:: storage.etcd.username + + A username for accessing the etcd storage. + + | + | Type: string + | Default: "" + | Environment variable: TCM_STORAGE_ETCD_USERNAME + | Command-line option: ``--storage-etcd-username`` + +.. _tcm_configuration_reference_storage_etcd_password: + +.. confval:: storage.etcd.password + + A password for accessing the etcd storage. + + | + | Type: string + | Default: "" + | Environment variable: TCM_STORAGE_ETCD_PASSWORD + | Command-line option: ``--storage-etcd-password`` + +.. _tcm_configuration_reference_storage_etcd_tls_enabled: + +.. confval:: storage.etcd.tls.enabled + + Indicates whether TLS is enabled for etcd connections. + + | + | Type: bool + | Default: false + | Environment variable: TCM_STORAGE_ETCD_TLS_ENABLED + | Command-line option: ``--storage-etcd-tls-enabled`` + +.. _tcm_configuration_reference_storage_etcd_tls_auto: + +.. confval:: storage.etcd.tls.auto + + Use generated certificates for etcd connections. + + | + | Type: bool + | Default: false + | Environment variable: TCM_STORAGE_ETCD_TLS_AUTO + | Command-line option: ``--storage-etcd-tls-auto`` + +.. _tcm_configuration_reference_storage_etcd_tls_cert-file: + +.. confval:: storage.etcd.tls.cert-file + + A path to a TLS certificate file to use for etcd connections. + + | + | Type: string + | Default: "" + | Environment variable: TCM_STORAGE_ETCD_TLS_CERT_FILE + | Command-line option: ``--storage-etcd-tls-cert-file`` + +.. _tcm_configuration_reference_storage_etcd_tls_key-file: + +.. confval:: storage.etcd.tls.key-file + + A path to a TLS private key file to use for etcd connections. + + | + | Type: string + | Default: "" + | Environment variable: TCM_STORAGE_ETCD_TLS_KEY_FILE + | Command-line option: ``--storage-etcd-tls-key-file`` + +.. _tcm_configuration_reference_storage_etcd_tls_trusted-ca-file: + +.. confval:: storage.etcd.tls.trusted-ca-file + + A path to a trusted CA certificate file to use for etcd connections. + + | + | Type: string + | Default: "" + | Environment variable: TCM_STORAGE_ETCD_TLS_TRUSTED_CA_FILE + | Command-line option: ``--storage-etcd-tls-trusted-ca-file`` + +.. _tcm_configuration_reference_storage_etcd_tls_client-cert-auth: + +.. confval:: storage.etcd.tls.client-cert-auth + + Indicates whether client cert authentication is enabled. + + | + | Type: bool + | Default: false + | Environment variable: TCM_STORAGE_ETCD_TLS_CLIENT_CERT_AUTH + | Command-line option: ``--storage-etcd-tls-client-cert-auth`` + +.. _tcm_configuration_reference_storage_etcd_tls_crl-file: + +.. confval:: storage.etcd.tls.crl-file + + A path to the client certificate revocation list file. + + | + | Type: string + | Default: "" + | Environment variable: TCM_STORAGE_ETCD_TLS_CRL_FILE + | Command-line option: ``--storage-etcd-tls-crl-file`` + +.. _tcm_configuration_reference_storage_etcd_tls_insecure-skip-verify: + +.. confval:: storage.etcd.tls.insecure-skip-verify + + Skip checking client certificate in etcd connections. + + | + | Type: bool + | Default: false + | Environment variable: TCM_STORAGE_ETCD_TLS_INSECURE_SKIP_VERIFY + | Command-line option: ``--storage-etcd-tls-insecure-skip-verify`` + +.. _tcm_configuration_reference_storage_etcd_tls_skip-client-san-verify: + +.. confval:: storage.etcd.tls.skip-client-san-verify + + Skip verification of SAN field in client certificate for etcd connections. + + | + | Type: bool + | Default: false + | Environment variable: TCM_STORAGE_ETCD_TLS_SKIP_CLIENT_SAN_VERIFY + | Command-line option: ``--storage-etcd-tls-skip-client-san-verify`` + +.. _tcm_configuration_reference_storage_etcd_tls_server-name: + +.. confval:: storage.etcd.tls.server-name + + Name of the TLS server for etcd connections. + + | + | Type: string + | Default: "" + | Environment variable: TCM_STORAGE_ETCD_TLS_SERVER_NAME + | Command-line option: ``--storage-etcd-tls-server-name`` + +.. _tcm_configuration_reference_storage_etcd_tls_cipher-suites: + +.. confval:: storage.etcd.tls.cipher-suites + + TLS cipher suites for etcd connections. Possible values are the Golang `tls.TLS_* `__ constants. + + | + | Type: []uint16 + | Default: [] + | Environment variable: TCM_STORAGE_ETCD_TLS_CIPHER_SUITES + | Command-line option: ``--storage-etcd-tls-cipher-suites`` + +.. _tcm_configuration_reference_storage_etcd_tls_allowed-cn: + +.. confval:: storage.etcd.tls.allowed-cn + + An allowed common name for authentication in etcd connections. + + | + | Type: string + | Default: "" + | Environment variable: TCM_STORAGE_ETCD_TLS_ALLOWED_CN + | Command-line option: ``--storage-etcd-tls-allowed-cn`` + +.. _tcm_configuration_reference_storage_etcd_tls_allowed-hostname: + +.. confval:: storage.etcd.tls.allowed-hostname + + An allowed TLS certificate name for authentication in etcd connections. + + | + | Type: string + | Default: "" + | Environment variable: TCM_STORAGE_ETCD_TLS_ALLOWED_HOSTNAME + | Command-line option: ``--storage-etcd-tls-allowed-hostname`` + +.. _tcm_configuration_reference_storage_etcd_tls_empty-cn: + +.. confval:: storage.etcd.tls.empty-cn + + Whether the empty common name is allowed in etcd connections. + + | + | Type: bool + | Default: false + | Environment variable: TCM_STORAGE_ETCD_TLS_EMPTY_CN + | Command-line option: ``--storage-etcd-tls-empty-cn`` + +.. _tcm_configuration_reference_storage_etcd_permit-without-stream: + +.. confval:: storage.etcd.permit-without-stream + + Whether keepalive pings can be send to the etcd server without active streams. + + | + | Type: bool + | Default: false + | Environment variable: TCM_STORAGE_ETCD_PERMIT_WITHOUT_STREAM + | Command-line option: ``--storage-etcd-permit-without-stream`` + +.. _tcm_configuration_reference_storage_etcd_embed: + +storage.etcd.embed.* +~~~~~~~~~~~~~~~~~~~~ + +The ``storage.etcd.embed`` group defines the configuration of the embedded etcd +cluster that can used as a |tcm| configuration storage. +This cluster can be used for development purposes when the production or testing +etcd cluster is not available or not needed. + + +.. _tcm_configuration_reference_storage_tarantool_prefix: + +.. confval:: storage.tarantool.prefix + + A prefix for the TCM configuration parameters in the Tarantool |tcm| configuration storage. + + | + | Type: string + | Default: "_tcm: + | Environment variable: TCM_STORAGE_TARANTOOL_PREFIX + | Command-line option: ``--storage-tarantool-prefix`` + + +.. _tcm_configuration_reference_storage_tarantool_addr: + +.. confval:: storage.tarantool.addr + + The URI for connecting to the Tarantool |tcm| configuration storage. + + | + | Type: string + | Default: "unix/:/tmp/tnt_config_instance.sock" + | Environment variable: TCM_STORAGE_TARANTOOL_ADDR + | Command-line option: ``--storage-tarantool-ADDR`` + + +.. _tcm_configuration_reference_storage_tarantool_auth: + +.. confval:: storage.tarantool.auth + + An authentication method for the Tarantool |tcm| configuration storage. + + Possible values are the Go's `go-tarantool/Auth `__ constants: + + - ``AutoAuth`` (0) + - ``ChapSha1Auth`` + - ``PapSha256Auth`` + + | + | Type: int + | Default: 0 + | Environment variable: TCM_STORAGE_TARANTOOL_AUTH + | Command-line option: ``--storage-tarantool-auth`` + + +.. _tcm_configuration_reference_storage_tarantool_timeout: + +.. confval:: storage.tarantool.timeout + + A request timeout for the Tarantool |tcm| configuration storage. + + See also `go-tarantool.Opts `__. + + | + | Type: time.Duration + | Default: 0s + | Environment variable: TCM_STORAGE_TARANTOOL_TIMEOUT + | Command-line option: ``--storage-tarantool-timeout`` + +.. _tcm_configuration_reference_storage_tarantool_reconnect: + +.. confval:: storage.tarantool.reconnect + + A timeout between reconnect attempts for the Tarantool |tcm| configuration storage. + + See also `go-tarantool.Opts `__. + + | + | Type: time.Duration + | Default: 0s + | Environment variable: TCM_STORAGE_TARANTOOL_RECONNECT + | Command-line option: ``--storage-tarantool-reconnect`` + +.. _tcm_configuration_reference_storage_tarantool_max-reconnects: + +.. confval:: storage.tarantool.max-reconnects + + The maximum number of reconnect attempts for the Tarantool |tcm| configuration storage. + + See also `go-tarantool.Opts `__. + + | + | Type: int + | Default: 0 + | Environment variable: TCM_STORAGE_TARANTOOL_MAX_RECONNECTS + | Command-line option: ``--storage-tarantool-max-reconnects`` + +.. _tcm_configuration_reference_storage_tarantool_user: + +.. confval:: storage.tarantool.user + + A username for connecting to the Tarantool |tcm| configuration storage. + + See also `go-tarantool.Opts `__. + + | + | Type: string + | Default: "" + | Environment variable: TCM_STORAGE_TARANTOOL_USER + | Command-line option: ``--storage-tarantool-user`` + +.. _tcm_configuration_reference_storage_tarantool_pass: + +.. confval:: storage.tarantool.pass + + A password for connecting to the Tarantool |tcm| configuration storage. + + See also `go-tarantool.Opts `__. + + | + | Type: string + | Default: "" + | Environment variable: TCM_STORAGE_TARANTOOL_PASS + | Command-line option: ``--storage-tarantool-pass`` + +.. _tcm_configuration_reference_storage_tarantool_rate-limit: + +.. confval:: storage.tarantool.rate-limit + + A rate limit for connecting to the Tarantool |tcm| configuration storage. + + See also `go-tarantool.Opts `__. + + | + | Type: int + | Default: 0 + | Environment variable: TCM_STORAGE_TARANTOOL_RATE_LIMIT + | Command-line option: ``--storage-tarantool-rate-limit`` + +.. _tcm_configuration_reference_storage_tarantool_rate-limit-action: + +.. confval:: storage.tarantool.rate-limit-action + + An action to perform when the :ref:`tcm_configuration_reference_storage_tarantool_rate-limit` is reached. + + See also `go-tarantool.Opts `__. + + | + | Type: int + | Default: 0 + | Environment variable: TCM_STORAGE_TARANTOOL_RATE_LIMIT_ACTION + | Command-line option: ``--storage-tarantool-rate-limit-action`` + + +.. _tcm_configuration_reference_storage_tarantool_concurrency: + +.. confval:: storage.tarantool.concurrency + + An amount of separate mutexes for request queues and buffers inside of a connection + to the Tarantool |tcm| configuration storage. + + See also `go-tarantool.Opts `__. + + | + | Type: int + | Default: 0 + | Environment variable: TCM_STORAGE_TARANTOOL_CONCURRENCY + | Command-line option: ``--storage-tarantool-concurrency`` + +.. _tcm_configuration_reference_storage_tarantool_skip-schema: + +.. confval:: storage.tarantool.skip-schema + + Whether the schema is loaded from the Tarantool |tcm| configuration storage. + + See also `go-tarantool.Opts `__. + + | + | Type: bool + | Default: true + | Environment variable: TCM_STORAGE_TARANTOOL_SKIP_SCHEMA + | Command-line option: ``--storage-tarantool-skip-schema`` + +.. _tcm_configuration_reference_storage_tarantool_transport: + +.. confval:: storage.tarantool.transport + + The connection type for the Tarantool |tcm| configuration storage. + + See also `go-tarantool.Opts `__. + + | + | Type: string + | Default: "" + | Environment variable: TCM_STORAGE_TARANTOOL_TRANSPORT + | Command-line option: ``--storage-tarantool-transport`` + +.. _tcm_configuration_reference_storage_tarantool_ssl_key-file: + +.. confval:: storage.tarantool.ssl.key-file + + A path to a TLS private key file to use for connecting to the Tarantool |tcm| + configuration storage. + + See also: :ref:`Traffic encryption `. + + | + | Type: string + | Default: "" + | Environment variable: TCM_STORAGE_TARANTOOL_SSL_KEY_FILE + | Command-line option: ``--storage-tarantool-ssl-key-file`` + +.. _tcm_configuration_reference_storage_tarantool_ssl_cert-file: + +.. confval:: storage.tarantool.ssl.cert-file + + A path to an SSL certificate to use for connecting to the Tarantool |tcm| + configuration storage. + + See also: :ref:`Traffic encryption `. + + | + | Type: string + | Default: "" + | Environment variable: TCM_STORAGE_TARANTOOL_SSL_CERT_FILE + | Command-line option: ``--storage-tarantool-ssl-cert-file`` + +.. _tcm_configuration_reference_storage_tarantool_ssl_ca-file: + +.. confval:: storage.tarantool.ssl.ca-file + + A path to a trusted CA certificate to use for connecting to the Tarantool |tcm| + configuration storage. + + See also: :ref:`Traffic encryption `. + + | + | Type: string + | Default: "" + | Environment variable: TCM_STORAGE_TARANTOOL_SSL_CA_FILE + | Command-line option: ``--storage-tarantool-ssl-ca-file`` + +.. _tcm_configuration_reference_storage_tarantool_ssl_ciphers: + +.. confval:: storage.tarantool.ssl.ciphers + + A list of SSL cipher suites that can be used for connecting to the Tarantool |tcm| + configuration storage. Possible values are listed in :ref:`Supported ciphers `. + + See also: :ref:`Traffic encryption `. + + | + | Type: string + | Default: "" + | Environment variable: TCM_STORAGE_TARANTOOL_SSL_CIPHERS + | Command-line option: ``--storage-tarantool-ssl-ciphers`` + +.. _tcm_configuration_reference_storage_tarantool_ssl_password: + +.. confval:: storage.tarantool.ssl.password + + A password for an encrypted private SSL key to use for connecting to the Tarantool |tcm| + configuration storage. + + See also: :ref:`Traffic encryption `. + + | + | Type: string + | Default: "" + | Environment variable: TCM_STORAGE_TARANTOOL_SSL_PASSWORD + | Command-line option: ``--storage-tarantool-ssl-password`` + +.. _tcm_configuration_reference_storage_tarantool_ssl_password-file: + +.. confval:: storage.tarantool.ssl.password-file + + A text file with passwords for encrypted private SSL keys to use + for connecting to the Tarantool |tcm| configuration storage. + + | + | Type: string + | Default: "" + | Environment variable: TCM_STORAGE_TARANTOOL_SSL_PASSWORD_FILE + | Command-line option: ``--storage-tarantool-ssl-password-file`` + +.. _tcm_configuration_reference_storage_tarantool_required-protocol-info_auth: + +.. confval:: storage.tarantool.required-protocol-info.auth + + An authentication method for the Tarantool |tcm| configuration storage. + + Possible values are the Go's `go-tarantool/Auth `__ constants: + + - ``AutoAuth`` (0) + - ``ChapSha1Auth`` + - ``PapSha256Auth`` + + See also `go-tarantool.ProtocolInfo `__. + + | + | Type: int + | Default: 0 + | Environment variable: TCM_STORAGE_TARANTOOL_SSL_REQUIRED_PROTOCOL_INFO_AUTH + | Command-line option: ``--storage-tarantool-required-protocol-info-auth`` + +.. _tcm_configuration_reference_storage_tarantool_required-protocol-info_version: + +.. confval:: storage.tarantool.required-protocol-info.version + + A Tarantool protocol version. + + See also `go-tarantool.ProtocolInfo `__. + + | + | Type: uint64 + | Default: 0 + | Environment variable: TCM_STORAGE_TARANTOOL_SSL_REQUIRED_PROTOCOL_INFO_VERSION + | Command-line option: ``--storage-tarantool-required-protocol-info-version`` + +.. _tcm_configuration_reference_storage_tarantool_required-protocol-info_features: + +.. confval:: storage.tarantool.required-protocol-info.features + + An array of Tarantool protocol features. + + See also `go-tarantool.ProtocolInfo `__. + + | + | Type: []int + | Default: [] + | Environment variable: TCM_STORAGE_TARANTOOL_SSL_REQUIRED_PROTOCOL_INFO_FEATURES + | Command-line option: ``--storage-tarantool-required-protocol-info-features`` + +.. _tcm_configuration_reference_storage_tarantool_embed: + +storage.tarantool.embed.* +~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``storage.tarantool.embed`` group parameters define the configuration of the +embedded Tarantool cluster that can used as a |tcm| configuration storage. +This cluster can be used for development purposes when the production or testing +cluster is not available or not needed. + + +.. _tcm_configuration_reference_addon: + +addon +----- + +The ``addon`` section defines settings related to |tcm| add-ons. + +- :ref:`addon.enabled ` +- :ref:`addon.addons-dir ` +- :ref:`addon.max-upload-size ` +- :ref:`addon.dev-addons-dir ` + +.. _tcm_configuration_reference_addon_enabled: + +.. confval:: addon.enabled + + Whether to enable the add-on functionality in |tcm|. + + | + | Type: bool + | Default: false + | Environment variable: TCM_ADDON_ENABLED + | Command-line option: ``--addon-enabled`` + +.. _tcm_configuration_reference_addon_addons-dir: + +.. confval:: addon.addons-dir + + The directory from which |tcm| takes add-ons. + + | + | Type: string + | Default: addons + | Environment variable: TCM_ADDON_ADDONS_DIR + | Command-line option: ``--addon-addons-dir`` + +.. _tcm_configuration_reference_addon_max-upload-size: + +.. confval:: addon.max-upload-size + + The maximum size (in bytes) of addon to upload to |tcm|. + + | + | Type: int64 + | Default: 104857600 + | Environment variable: TCM_ADDON_MAX_UPLOAD_SIZE + | Command-line option: ``--addon-max-upload-size`` + +.. _tcm_configuration_reference_addon_dev-addons-dir: + +.. confval:: addon.dev-addons-dir + + Additional add-on directories for development purposes, separated by semicolons (``;``). + + | + | Type: []string + | Default: [] + | Environment variable: TCM_ADDON_DEV_ADDONS_DIR + | Command-line option: ``--addon-dev-addons-dir`` + +.. limits configuration + +.. _tcm_configuration_reference_limits: + +limits +------ + +The ``limits`` section defines limits on various |tcm| objects and relations +between them. + +- :ref:`limits.users-count ` +- :ref:`limits.clusters-count ` +- :ref:`limits.roles-count ` +- :ref:`limits.user-secrets-count ` +- :ref:`limits.user-websessions-count ` +- :ref:`limits.linked-cluster-users ` + +.. _tcm_configuration_reference_limits_users-count: + +.. confval:: limits.users-count + + The maximum number of users in |tcm|. + + | + | Type: int + | Default: 1000 + | Environment variable: TCM_LIMITS_USERS_COUNT + | Command-line option: ``--limits-users-count`` + +.. _tcm_configuration_reference_limits_clusters-count: + +.. confval:: limits.clusters-count + + The maximum number of clusters in |tcm|. + + | + | Type: int + | Default: 10 + | Environment variable: TCM_LIMITS_CLUSTERS_COUNT + | Command-line option: ``--limits-clusters-count`` + +.. _tcm_configuration_reference_limits_roles-count: + +.. confval:: limits.roles-count + + The maximum number of roles in |tcm|. + + | + | Type: int + | Default: 100 + | Environment variable: TCM_LIMITS_ROLES_COUNT + | Command-line option: ``--limits-roles-count`` + +.. _tcm_configuration_reference_limits_user-secrets-count: + +.. confval:: limits.user-secrets-count + + The maximum number secrets that a |tcm| user can have. + + | + | Type: int + | Default: 10 + | Environment variable: TCM_LIMITS_USER_SECRETS_COUNT + | Command-line option: ``--limits-user-secrets-count`` + +.. _tcm_configuration_reference_limits_user-websessions-count: + +.. confval:: limits.user-websessions-count + + The maximum number of open sessions that a |tcm| user can have. + + | + | Type: int + | Default: 10 + | Environment variable: TCM_LIMITS_USER_WEBSESSIONS_COUNT + | Command-line option: ``--limits-user-websessions-count`` + +.. _tcm_configuration_reference_limits_linked-cluster-users: + +.. confval:: limits.linked-cluster-users + + The maximum number of clusters to which a single user can have access. + + | + | Type: int + | Default: 10 + | Environment variable: TCM_LIMITS_LINKED_CLUSTER_USERS + | Command-line option: ``--limits-linked-cluster-users`` + + +.. security parameters + +.. _tcm_configuration_reference_security: + +security +-------- + +The ``security`` section defines the security parameters of |tcm|. + +- :ref:`security.auth ` +- :ref:`security.hash-cost ` +- :ref:`security.encryption-key ` +- :ref:`security.encryption-key-file ` +- :ref:`security.bootstrap-password ` +- :ref:`security.integrity-check ` +- :ref:`security.signature-private-key-file ` + +.. _tcm_configuration_reference_security_auth: + +.. confval:: security.auth + + Ways to log into |tcm|. + + Possible values: + + - ``local`` + - ``ldap`` + + | + | Type: []string + | Default: [local] + | Environment variable: TCM_SECURITY_AUTH + | Command-line option: ``--security-auth`` + +.. _tcm_configuration_reference_security_hash-cost: + +.. confval:: security.hash-cost + + A hash cost for hashing users' passwords. + + | + | Type: int + | Default: 12 + | Environment variable: TCM_SECURITY_HASH_COST + | Command-line option: ``--security-hash-cost`` + +.. _tcm_configuration_reference_security_encryption-key: + +.. confval:: security.encryption-key + + An encryption key for passwords used by |tcm| for accessing Tarantool + and etcd clusters. + + | + | Type: string + | Default: "" + | Environment variable: TCM_SECURITY_ENCRYPTION_KEY + | Command-line option: ``--security-encryption-key`` + +.. _tcm_configuration_reference_security_encryption-key-file: + +.. confval:: security.encryption-key-file + + A path to the file with the encryption key for passwords used by |tcm| for accessing Tarantool + and etcd clusters. + + | + | Type: string + | Default: "" + | Environment variable: TCM_SECURITY_ENCRYPTION_KEY_FILE + | Command-line option: ``--security-encryption-key-file`` + +.. _tcm_configuration_reference_security_bootstrap-password: + +.. confval:: security.bootstrap-password + + A password for the first login of the ``admin`` user. Must be changed after the + successful login. Only for testing purposes. + + | + | Type: string + | Default: "" + | Environment variable: TCM_SECURITY_BOOTSTRAP_PASSWORD + | Command-line option: ``--security-bootstrap-password`` + +.. _tcm_configuration_security_signature-private-key-file: + +.. confval:: security.signature-private-key-file + + A path to a file with the private key to sign |tcm| data. + + | + | Type: string + | Default: "" + | Environment variable: TCM_SECURITY_SIGNATURE_PRIVATE_KEY_FILE + | Command-line option: ``--security-signature-private-key-file`` + +.. _tcm_configuration_security_integrity-check: + +.. confval:: security.integrity-check + + Whether to check the digital signature. If ``true``, the error is raised + in case an incorrect signature is detected. + + | + | Type: bool + | Default: false + | Environment variable: TCM_SECURITY_INTEGRITY_CHECK + | Command-line option: ``--security-integrity-check`` + +.. mode + +.. _tcm_configuration_reference_mode: + +mode +---- + +.. confval:: mode + + The |tcm| mode: ``production``, ``development``, or ``test``. + + | + | Type: string + | Default: production + | Environment variable: TCM_MODE + | Command-line option: ``--mode`` + diff --git a/doc/reference/tooling/tcm/tcm_connect_clusters.rst b/doc/reference/tooling/tcm/tcm_connect_clusters.rst new file mode 100644 index 0000000000..5f2c3e83e7 --- /dev/null +++ b/doc/reference/tooling/tcm/tcm_connect_clusters.rst @@ -0,0 +1,163 @@ +.. _tcm_connect_clusters: + +Сonnecting clusters +=================== + +.. include:: index.rst + :start-after: ee_note_tcm_start + :end-before: ee_note_tcm_end + +|tcm_full_name| works with clusters that: + +* run on Tarantool EE 3.0 or later +* use :ref:`centralized configuration ` stored in etcd or another Tarantool cluster. + +A single |tcm| installation can have multiple connected clusters. A connection to +|tcm| doesn't affect the cluster's functioning. You can connect clusters to |tcm| +and disconnect them on the fly. + +There are two ways to add a cluster to |tcm|: + +- Connect an existing cluster. +- Add a new cluster and :ref:`write its configuration ` from scratch in the |tcm| web UI. + +In both cases, you need to deploy Tarantool and start the cluster instances using +the :ref:`tt-cli` or another suitable way. + +.. _tcm_connect_clusters_parameters: + +Connection parameters +--------------------- + +When connecting a cluster to |tcm|, you need to provide two sets of connection parameters: +for the cluster instances and for the centralized configuration storage. + +Configuration storage connection +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The cluster configuration can be stored in either an :ref:`etcd ` +cluster or a separate Tarantool-based storage. In both cases, the following connection +parameters are required: + +* A key prefix used to identify the cluster in the configuration storage. + A prefix must be unique for each cluster in storage. +* URIs of all instances of the configuration storage. +* The credentials for accessing the configuration storage: an `etcd user `__ + or a :ref:`Tarantool user `. + +Additionally, if SSL or TLS encryption is enabled for the configuration storage, +provide the corresponding encryption configuration: keys, certificates, and other +parameters. For the complete list of parameters, consult the `etcd documentation `__ +or Tarantool :ref:`enterprise-iproto-encryption`. + +Cluster connection +~~~~~~~~~~~~~~~~~~ + +For interaction with the cluster instances, |tcm| needs the following access parameters: + +* A :ref:`Tarantool user ` that exists in the cluster and their password. + |tcm| connects to the cluster on behalf of this user. +* An :ref:`SSL configuration ` if the traffic encryption + is enabled on the cluster. + +Managing connected clusters +--------------------------- + +Administrators can add new clusters, edit, and remove existing ones from |tcm|. + +Connected clusters are listed on the **Clusters** page. + +.. _tcm_connect_clusters_connect_preconf: + +Connecting a pre-configured cluster +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you already have a cluster and want to connect it to |tcm|, +follow these steps: + +#. Go to **Clusters** and click **Add**. +#. Fill in the general cluster information: + + * Specify an arbitrary name. + * Optionally, provide a description and select a color to mark this cluster in |tcm|. + * Optionally, enter the URLs of additional services for the cluster. For example, + a Grafana dashboard that monitors the cluster metrics, or a syslog server + for viewing the cluster logs. |tcm| provides quick access to these URLs on + the cluster **Stateboard** page. + +3. Provide the details of the cluster configuration storage: + + * Storage type: **etcd** or **tarantool**. + * The **Prefix** specified in the cluster configuration. + * The URIs of the configuration storage instances. + * The credentials for accessing the configuration storage. + * The SSL/TLS parameters if the connection encryption is enabled on the storage. + +4. Provide the credentials for accessing the cluster: a Tarantool user's name, their password, + and SSL parameters in case :ref:`traffic encryption ` + is enabled on the cluster. + +.. _tcm_connect_clusters_connect_new: + +Adding a new cluster +~~~~~~~~~~~~~~~~~~~~ + +If you don't have a cluster yet, you can add one in |tcm| and write its configuration +from scratch using the :ref:`built-in configuration editor `. + +.. important:: + + When adding a new cluster, you need to have a storage for its configuration up + and running so that |tcm| can connect to it. Cluster instances can be deployed later. + +To add a new cluster: + +#. Go to **Clusters** and click **Add**. +#. Fill in the general cluster information: + + * Specify an arbitrary name. + * Optionally, provide a description and select a color to mark this cluster in |tcm|. + * Optionally, enter the URLs of additional services for the cluster. For example, + a Grafana dashboard that monitors the cluster metrics, or a syslog server + for viewing the cluster logs. |tcm| provides quick access to these URLs on + the cluster **Stateboard** page. + +#. Select the type of the cluster configuration storage: **etcd** or **tarantool**. +#. Define a unique **Prefix** for identifying this cluster in the configuration storage. +#. Provide the connection details for the cluster configuration storage: + + * The URIs of configuration storage instances. + * The credentials for accessing the configuration storage. + * The SSL/TLS parameters if the connection encryption is enabled on the storage. + +#. Provide the cluster credentials: a username, a password, and SSL parameters in + case :ref:`traffic encryption ` is enabled on + the cluster. + +Once you add the cluster: + +* Set up the cluster configuration using the |tcm| :ref:`configuration editor `. +* Deploy Tarantool on the cluster nodes using the :ref:`tt-cli` or other suitable tools. +* Start the cluster using the :ref:`tt-cli` or other suitable tools. + +.. _tcm_connect_clusters_edit: + +Editing a connected cluster +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To edit a connected cluster, go to **Clusters** and click **Edit** in the **Actions** +menu of the corresponding table row. + +.. _tcm_connect_clusters_disconnect: + +Disconnecting a cluster +~~~~~~~~~~~~~~~~~~~~~~~ + +To disconnect a cluster from |tcm|, go to **Clusters** and click **Disconnect** +in the **Actions** menu of the corresponding table row. + +.. note:: + + Disconnecting a cluster does not affect its functioning. The only + thing that changes is that it's no longer shown in |tcm|. + You can connect this cluster again at any time. \ No newline at end of file diff --git a/doc/reference/tooling/tt_cli/_includes/cartridge_deprecation_note.rst b/doc/reference/tooling/tt_cli/_includes/cartridge_deprecation_note.rst new file mode 100644 index 0000000000..2d7242f791 --- /dev/null +++ b/doc/reference/tooling/tt_cli/_includes/cartridge_deprecation_note.rst @@ -0,0 +1,5 @@ +.. important:: + + The Tarantool Cartridge framework is deprecated and is not compatible with + Tarantool 3.0 and later. This command is added for backward compatibility with + earlier versions. \ No newline at end of file diff --git a/doc/reference/tooling/tt_cli/build.rst b/doc/reference/tooling/tt_cli/build.rst index 03a101225e..25d5e3948e 100644 --- a/doc/reference/tooling/tt_cli/build.rst +++ b/doc/reference/tooling/tt_cli/build.rst @@ -46,16 +46,34 @@ and located in the application directory. the pre-build and post-build scripts can also have names ``cartridge.pre-build`` and ``cartridge.post-build``. -If your application depends on closed-source rocks, or if the build should contain -rocks from a project added as a submodule, **install** these -dependencies using the pre-build script **before** building. -For example, add the following line: +``tt.pre-build`` is helpful when your application depends on closed-source rocks, +or if the build should contain rocks from a project added as a submodule. +You can **install** these dependencies using the pre-build script **before** building. +Example: .. code-block:: bash + #!/bin/sh + + # The main purpose of this script is to build non-standard rocks modules. + # The script will run before `tt rocks make` during application build. + tt rocks make --chdir ./third_party/proj -Learn more about :doc:`pre-build and post-build scripts `. +``tt.post.build`` is a script that runs after ``tt rocks make``. The main purpose +of this script is to remove build artifacts from the final package. Example: + +.. code-block:: bash + + #!/bin/sh + + # The main purpose of this script is to remove build artifacts from the resulting package. + # The script will run after `tt rocks make` during application build. + + rm -rf third_party + rm -rf node_modules + rm -rf doc + Examples -------- diff --git a/doc/reference/tooling/tt_cli/cartridge.rst b/doc/reference/tooling/tt_cli/cartridge.rst index 101bb07b7d..6366ab433f 100644 --- a/doc/reference/tooling/tt_cli/cartridge.rst +++ b/doc/reference/tooling/tt_cli/cartridge.rst @@ -3,6 +3,8 @@ Managing a Cartridge application ================================ +.. include:: _includes/cartridge_deprecation_note.rst + .. code-block:: console $ tt cartridge COMMAND {[OPTION ...]|SUBCOMMAND} diff --git a/doc/reference/tooling/tt_cli/cluster.rst b/doc/reference/tooling/tt_cli/cluster.rst new file mode 100644 index 0000000000..0236893038 --- /dev/null +++ b/doc/reference/tooling/tt_cli/cluster.rst @@ -0,0 +1,10 @@ +.. _tt-cluster: + +Managing a cluster's configuration +================================== + +.. code-block:: console + + $ tt cluster + +.. TODO: https://github.com/tarantool/doc/issues/3725 diff --git a/doc/reference/tooling/tt_cli/commands.rst b/doc/reference/tooling/tt_cli/commands.rst index 5c68092f1b..61fc3506c0 100644 --- a/doc/reference/tooling/tt_cli/commands.rst +++ b/doc/reference/tooling/tt_cli/commands.rst @@ -26,6 +26,8 @@ help for the given command. - Check an application file for syntax errors * - :doc:`clean ` - Clean instance files + * - :doc:`cluster ` + - Manage a cluster's configuration * - :doc:`completion ` - Generate completion for a specified shell * - :doc:`connect ` @@ -83,6 +85,7 @@ help for the given command. cfg check clean + cluster completion connect coredump diff --git a/doc/reference/tooling/tt_cli/index.rst b/doc/reference/tooling/tt_cli/index.rst index c74ec52596..50d6e4db09 100644 --- a/doc/reference/tooling/tt_cli/index.rst +++ b/doc/reference/tooling/tt_cli/index.rst @@ -59,9 +59,10 @@ Replacement for tarantooctl and Cartridge CLI --------------------------------------------- A multi-purpose tool for working with Tarantool from the command line, ``tt`` has -come to replace :ref:`tarantoolctl ` -and :doc:`Cartridge CLI ` command-line utilities. -The instructions on migration to ``tt`` are provided on the corresponding documentation -pages: :ref:`tarantoolctl ` and :doc:`Cartridge CLI `. +come to replace the deprecated utilities :ref:`tarantoolctl ` +and `Cartridge CLI `_ command-line utilities. +The instructions on migration to ``tt`` are provided in the `tt GitHub reposirory `_. + +.. TODO: change the link to the migration guide when it's ready. diff --git a/doc/reference/tooling/tt_cli/init.rst b/doc/reference/tooling/tt_cli/init.rst index a4a9cee48c..ec022654dc 100644 --- a/doc/reference/tooling/tt_cli/init.rst +++ b/doc/reference/tooling/tt_cli/init.rst @@ -15,6 +15,8 @@ Creating a tt environment Details ------- +.. include:: _includes/cartridge_deprecation_note.rst + ``tt init`` checks the existence of configuration files for Cartridge (``cartridge.yml``) or the ``tarantoolctl`` utility (``.tarantoolctl``) in the current directory. If such files are found, ``tt`` generates an environment that uses the same diff --git a/doc/reference/tooling/tt_cli/pack.rst b/doc/reference/tooling/tt_cli/pack.rst index 8d1b62b705..6084ef4c4e 100644 --- a/doc/reference/tooling/tt_cli/pack.rst +++ b/doc/reference/tooling/tt_cli/pack.rst @@ -49,6 +49,8 @@ Options Package a Cartridge CLI-compatible archive. + .. include:: _includes/cartridge_deprecation_note.rst + .. option:: --deps STRINGS **Applicable to:** ``deb``, ``rpm`` diff --git a/doc/toctree.rst b/doc/toctree.rst index 353ccd2047..e85d81075d 100644 --- a/doc/toctree.rst +++ b/doc/toctree.rst @@ -10,7 +10,6 @@ how-to/index concepts/index CRUD operations - Cluster on Cartridge book/admin/index book/connectors enterprise/index diff --git a/locale/en/_panels_static/panels-bootstrap.5fd3999ee7762ccc51105388f4a9d115.css b/locale/en/_panels_static/panels-bootstrap.5fd3999ee7762ccc51105388f4a9d115.css new file mode 100644 index 0000000000..1b057df2f2 --- /dev/null +++ b/locale/en/_panels_static/panels-bootstrap.5fd3999ee7762ccc51105388f4a9d115.css @@ -0,0 +1 @@ +.badge{border-radius:.25rem;display:inline-block;font-size:75%;font-weight:700;line-height:1;padding:.25em .4em;text-align:center;vertical-align:baseline;white-space:nowrap}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{border-radius:10rem;padding-left:.6em;padding-right:.6em}.badge-primary{background-color:#007bff;color:#fff}.badge-primary[href]:focus,.badge-primary[href]:hover{background-color:#0062cc;color:#fff;text-decoration:none}.badge-secondary{background-color:#6c757d;color:#fff}.badge-secondary[href]:focus,.badge-secondary[href]:hover{background-color:#545b62;color:#fff;text-decoration:none}.badge-success{background-color:#28a745;color:#fff}.badge-success[href]:focus,.badge-success[href]:hover{background-color:#1e7e34;color:#fff;text-decoration:none}.badge-info{background-color:#17a2b8;color:#fff}.badge-info[href]:focus,.badge-info[href]:hover{background-color:#117a8b;color:#fff;text-decoration:none}.badge-warning{background-color:#ffc107;color:#212529}.badge-warning[href]:focus,.badge-warning[href]:hover{background-color:#d39e00;color:#212529;text-decoration:none}.badge-danger{background-color:#dc3545;color:#fff}.badge-danger[href]:focus,.badge-danger[href]:hover{background-color:#bd2130;color:#fff;text-decoration:none}.badge-light{background-color:#f8f9fa;color:#212529}.badge-light[href]:focus,.badge-light[href]:hover{background-color:#dae0e5;color:#212529;text-decoration:none}.badge-dark{background-color:#343a40;color:#fff}.badge-dark[href]:focus,.badge-dark[href]:hover{background-color:#1d2124;color:#fff;text-decoration:none}.border-0{border:0 !important}.border-top-0{border-top:0 !important}.border-right-0{border-right:0 !important}.border-bottom-0{border-bottom:0 !important}.border-left-0{border-left:0 !important}.p-0{padding:0 !important}.pt-0,.py-0{padding-top:0 !important}.pr-0,.px-0{padding-right:0 !important}.pb-0,.py-0{padding-bottom:0 !important}.pl-0,.px-0{padding-left:0 !important}.p-1{padding:.25rem !important}.pt-1,.py-1{padding-top:.25rem !important}.pr-1,.px-1{padding-right:.25rem !important}.pb-1,.py-1{padding-bottom:.25rem !important}.pl-1,.px-1{padding-left:.25rem !important}.p-2{padding:.5rem !important}.pt-2,.py-2{padding-top:.5rem !important}.pr-2,.px-2{padding-right:.5rem !important}.pb-2,.py-2{padding-bottom:.5rem !important}.pl-2,.px-2{padding-left:.5rem !important}.p-3{padding:1rem !important}.pt-3,.py-3{padding-top:1rem !important}.pr-3,.px-3{padding-right:1rem !important}.pb-3,.py-3{padding-bottom:1rem !important}.pl-3,.px-3{padding-left:1rem !important}.p-4{padding:1.5rem !important}.pt-4,.py-4{padding-top:1.5rem !important}.pr-4,.px-4{padding-right:1.5rem !important}.pb-4,.py-4{padding-bottom:1.5rem !important}.pl-4,.px-4{padding-left:1.5rem !important}.p-5{padding:3rem !important}.pt-5,.py-5{padding-top:3rem !important}.pr-5,.px-5{padding-right:3rem !important}.pb-5,.py-5{padding-bottom:3rem !important}.pl-5,.px-5{padding-left:3rem !important}.m-0{margin:0 !important}.mt-0,.my-0{margin-top:0 !important}.mr-0,.mx-0{margin-right:0 !important}.mb-0,.my-0{margin-bottom:0 !important}.ml-0,.mx-0{margin-left:0 !important}.m-1{margin:.25rem !important}.mt-1,.my-1{margin-top:.25rem !important}.mr-1,.mx-1{margin-right:.25rem !important}.mb-1,.my-1{margin-bottom:.25rem !important}.ml-1,.mx-1{margin-left:.25rem !important}.m-2{margin:.5rem !important}.mt-2,.my-2{margin-top:.5rem !important}.mr-2,.mx-2{margin-right:.5rem !important}.mb-2,.my-2{margin-bottom:.5rem !important}.ml-2,.mx-2{margin-left:.5rem !important}.m-3{margin:1rem !important}.mt-3,.my-3{margin-top:1rem !important}.mr-3,.mx-3{margin-right:1rem !important}.mb-3,.my-3{margin-bottom:1rem !important}.ml-3,.mx-3{margin-left:1rem !important}.m-4{margin:1.5rem !important}.mt-4,.my-4{margin-top:1.5rem !important}.mr-4,.mx-4{margin-right:1.5rem !important}.mb-4,.my-4{margin-bottom:1.5rem !important}.ml-4,.mx-4{margin-left:1.5rem !important}.m-5{margin:3rem !important}.mt-5,.my-5{margin-top:3rem !important}.mr-5,.mx-5{margin-right:3rem !important}.mb-5,.my-5{margin-bottom:3rem !important}.ml-5,.mx-5{margin-left:3rem !important}.btn{background-color:transparent;border:1px solid transparent;border-radius:.25rem;color:#212529;cursor:pointer;display:inline-block;font-size:1rem;font-weight:400;line-height:1.5;padding:.375rem .75rem;text-align:center;transition:color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none;vertical-align:middle}.btn:hover{color:#212529;text-decoration:none}.btn:visited{color:#212529}.btn.focus,.btn:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,0.25);outline:0}.btn.disabled,.btn:disabled{opacity:.65}@media (prefers-reduced-motion: reduce){.btn{transition:none}}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{background-color:#007bff;border-color:#007bff;color:#fff}.btn-primary:visited{color:#fff}.btn-primary:hover{background-color:#0069d9;border-color:#0062cc;color:#fff}.btn-primary.focus,.btn-primary:focus{background-color:#0069d9;border-color:#0062cc;box-shadow:0 0 0 .2rem rgba(0,123,255,0.5);color:#fff}.btn-primary.disabled,.btn-primary:disabled{background-color:#007bff;border-color:#007bff;color:#fff}.btn-primary.active:not(:disabled):not(.disabled),.btn-primary:not(:disabled):not(.disabled):active,.show>.btn-primary.dropdown-toggle{background-color:#0062cc;border-color:#005cbf;color:#fff}.btn-primary.active:not(:disabled):not(.disabled):focus,.btn-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,0.5)}.btn-secondary{background-color:#6c757d;border-color:#6c757d;color:#fff}.btn-secondary:visited{color:#fff}.btn-secondary:hover{background-color:#5a6268;border-color:#545b62;color:#fff}.btn-secondary.focus,.btn-secondary:focus{background-color:#5a6268;border-color:#545b62;box-shadow:0 0 0 .2rem rgba(108,117,125,0.5);color:#fff}.btn-secondary.disabled,.btn-secondary:disabled{background-color:#6c757d;border-color:#6c757d;color:#fff}.btn-secondary.active:not(:disabled):not(.disabled),.btn-secondary:not(:disabled):not(.disabled):active,.show>.btn-secondary.dropdown-toggle{background-color:#545b62;border-color:#4e555b;color:#fff}.btn-secondary.active:not(:disabled):not(.disabled):focus,.btn-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,0.5)}.btn-success{background-color:#28a745;border-color:#28a745;color:#fff}.btn-success:visited{color:#fff}.btn-success:hover{background-color:#218838;border-color:#1e7e34;color:#fff}.btn-success.focus,.btn-success:focus{background-color:#218838;border-color:#1e7e34;box-shadow:0 0 0 .2rem rgba(40,167,69,0.5);color:#fff}.btn-success.disabled,.btn-success:disabled{background-color:#28a745;border-color:#28a745;color:#fff}.btn-success.active:not(:disabled):not(.disabled),.btn-success:not(:disabled):not(.disabled):active,.show>.btn-success.dropdown-toggle{background-color:#1e7e34;border-color:#1c7430;color:#fff}.btn-success.active:not(:disabled):not(.disabled):focus,.btn-success:not(:disabled):not(.disabled):active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,0.5)}.btn-info{background-color:#17a2b8;border-color:#17a2b8;color:#fff}.btn-info:visited{color:#fff}.btn-info:hover{background-color:#138496;border-color:#117a8b;color:#fff}.btn-info.focus,.btn-info:focus{background-color:#138496;border-color:#117a8b;box-shadow:0 0 0 .2rem rgba(23,162,184,0.5);color:#fff}.btn-info.disabled,.btn-info:disabled{background-color:#17a2b8;border-color:#17a2b8;color:#fff}.btn-info.active:not(:disabled):not(.disabled),.btn-info:not(:disabled):not(.disabled):active,.show>.btn-info.dropdown-toggle{background-color:#117a8b;border-color:#10707f;color:#fff}.btn-info.active:not(:disabled):not(.disabled):focus,.btn-info:not(:disabled):not(.disabled):active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,0.5)}.btn-warning{background-color:#ffc107;border-color:#ffc107;color:#212529}.btn-warning:visited{color:#212529}.btn-warning:hover{background-color:#e0a800;border-color:#d39e00;color:#212529}.btn-warning.focus,.btn-warning:focus{background-color:#e0a800;border-color:#d39e00;box-shadow:0 0 0 .2rem rgba(255,193,7,0.5);color:#212529}.btn-warning.disabled,.btn-warning:disabled{background-color:#ffc107;border-color:#ffc107;color:#212529}.btn-warning.active:not(:disabled):not(.disabled),.btn-warning:not(:disabled):not(.disabled):active,.show>.btn-warning.dropdown-toggle{background-color:#d39e00;border-color:#c69500;color:#212529}.btn-warning.active:not(:disabled):not(.disabled):focus,.btn-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,0.5)}.btn-danger{background-color:#dc3545;border-color:#dc3545;color:#fff}.btn-danger:visited{color:#fff}.btn-danger:hover{background-color:#c82333;border-color:#bd2130;color:#fff}.btn-danger.focus,.btn-danger:focus{background-color:#c82333;border-color:#bd2130;box-shadow:0 0 0 .2rem rgba(220,53,69,0.5);color:#fff}.btn-danger.disabled,.btn-danger:disabled{background-color:#dc3545;border-color:#dc3545;color:#fff}.btn-danger.active:not(:disabled):not(.disabled),.btn-danger:not(:disabled):not(.disabled):active,.show>.btn-danger.dropdown-toggle{background-color:#bd2130;border-color:#b21f2d;color:#fff}.btn-danger.active:not(:disabled):not(.disabled):focus,.btn-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,0.5)}.btn-light{background-color:#f8f9fa;border-color:#f8f9fa;color:#212529}.btn-light:visited{color:#212529}.btn-light:hover{background-color:#e2e6ea;border-color:#dae0e5;color:#212529}.btn-light.focus,.btn-light:focus{background-color:#e2e6ea;border-color:#dae0e5;box-shadow:0 0 0 .2rem rgba(248,249,250,0.5);color:#212529}.btn-light.disabled,.btn-light:disabled{background-color:#f8f9fa;border-color:#f8f9fa;color:#212529}.btn-light.active:not(:disabled):not(.disabled),.btn-light:not(:disabled):not(.disabled):active,.show>.btn-light.dropdown-toggle{background-color:#dae0e5;border-color:#d3d9df;color:#212529}.btn-light.active:not(:disabled):not(.disabled):focus,.btn-light:not(:disabled):not(.disabled):active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,0.5)}.btn-dark{background-color:#343a40;border-color:#343a40;color:#fff}.btn-dark:visited{color:#fff}.btn-dark:hover{background-color:#23272b;border-color:#1d2124;color:#fff}.btn-dark.focus,.btn-dark:focus{background-color:#23272b;border-color:#1d2124;box-shadow:0 0 0 .2rem rgba(52,58,64,0.5);color:#fff}.btn-dark.disabled,.btn-dark:disabled{background-color:#343a40;border-color:#343a40;color:#fff}.btn-dark.active:not(:disabled):not(.disabled),.btn-dark:not(:disabled):not(.disabled):active,.show>.btn-dark.dropdown-toggle{background-color:#1d2124;border-color:#171a1d;color:#fff}.btn-dark.active:not(:disabled):not(.disabled):focus,.btn-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,0.5)}.btn-outline-primary{border-color:#007bff;color:#007bff}.btn-outline-primary:visited{color:#007bff}.btn-outline-primary:hover{background-color:#007bff;border-color:#007bff;color:#fff}.btn-outline-primary.focus,.btn-outline-primary:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,0.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{background-color:transparent;color:#007bff}.btn-outline-primary.active:not(:disabled):not(.disabled),.btn-outline-primary:not(:disabled):not(.disabled):active,.show>.btn-outline-primary.dropdown-toggle{background-color:#007bff;border-color:#007bff;color:#fff}.btn-outline-primary.active:not(:disabled):not(.disabled):focus,.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,0.5)}.btn-outline-secondary{border-color:#6c757d;color:#6c757d}.btn-outline-secondary:visited{color:#6c757d}.btn-outline-secondary:hover{background-color:#6c757d;border-color:#6c757d;color:#fff}.btn-outline-secondary.focus,.btn-outline-secondary:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,0.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{background-color:transparent;color:#6c757d}.btn-outline-secondary.active:not(:disabled):not(.disabled),.btn-outline-secondary:not(:disabled):not(.disabled):active,.show>.btn-outline-secondary.dropdown-toggle{background-color:#6c757d;border-color:#6c757d;color:#fff}.btn-outline-secondary.active:not(:disabled):not(.disabled):focus,.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,0.5)}.btn-outline-success{border-color:#28a745;color:#28a745}.btn-outline-success:visited{color:#28a745}.btn-outline-success:hover{background-color:#28a745;border-color:#28a745;color:#fff}.btn-outline-success.focus,.btn-outline-success:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,0.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{background-color:transparent;color:#28a745}.btn-outline-success.active:not(:disabled):not(.disabled),.btn-outline-success:not(:disabled):not(.disabled):active,.show>.btn-outline-success.dropdown-toggle{background-color:#28a745;border-color:#28a745;color:#fff}.btn-outline-success.active:not(:disabled):not(.disabled):focus,.btn-outline-success:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,0.5)}.btn-outline-info{border-color:#17a2b8;color:#17a2b8}.btn-outline-info:visited{color:#17a2b8}.btn-outline-info:hover{background-color:#17a2b8;border-color:#17a2b8;color:#fff}.btn-outline-info.focus,.btn-outline-info:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,0.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{background-color:transparent;color:#17a2b8}.btn-outline-info.active:not(:disabled):not(.disabled),.btn-outline-info:not(:disabled):not(.disabled):active,.show>.btn-outline-info.dropdown-toggle{background-color:#17a2b8;border-color:#17a2b8;color:#fff}.btn-outline-info.active:not(:disabled):not(.disabled):focus,.btn-outline-info:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,0.5)}.btn-outline-warning{border-color:#ffc107;color:#ffc107}.btn-outline-warning:visited{color:#ffc107}.btn-outline-warning:hover{background-color:#ffc107;border-color:#ffc107;color:#212529}.btn-outline-warning.focus,.btn-outline-warning:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,0.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{background-color:transparent;color:#ffc107}.btn-outline-warning.active:not(:disabled):not(.disabled),.btn-outline-warning:not(:disabled):not(.disabled):active,.show>.btn-outline-warning.dropdown-toggle{background-color:#ffc107;border-color:#ffc107;color:#212529}.btn-outline-warning.active:not(:disabled):not(.disabled):focus,.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,0.5)}.btn-outline-danger{border-color:#dc3545;color:#dc3545}.btn-outline-danger:visited{color:#dc3545}.btn-outline-danger:hover{background-color:#dc3545;border-color:#dc3545;color:#fff}.btn-outline-danger.focus,.btn-outline-danger:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,0.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{background-color:transparent;color:#dc3545}.btn-outline-danger.active:not(:disabled):not(.disabled),.btn-outline-danger:not(:disabled):not(.disabled):active,.show>.btn-outline-danger.dropdown-toggle{background-color:#dc3545;border-color:#dc3545;color:#fff}.btn-outline-danger.active:not(:disabled):not(.disabled):focus,.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,0.5)}.btn-outline-light{border-color:#f8f9fa;color:#f8f9fa}.btn-outline-light:visited{color:#f8f9fa}.btn-outline-light:hover{background-color:#f8f9fa;border-color:#f8f9fa;color:#212529}.btn-outline-light.focus,.btn-outline-light:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,0.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{background-color:transparent;color:#f8f9fa}.btn-outline-light.active:not(:disabled):not(.disabled),.btn-outline-light:not(:disabled):not(.disabled):active,.show>.btn-outline-light.dropdown-toggle{background-color:#f8f9fa;border-color:#f8f9fa;color:#212529}.btn-outline-light.active:not(:disabled):not(.disabled):focus,.btn-outline-light:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,0.5)}.btn-outline-dark{border-color:#343a40;color:#343a40}.btn-outline-dark:visited{color:#343a40}.btn-outline-dark:hover{background-color:#343a40;border-color:#343a40;color:#fff}.btn-outline-dark.focus,.btn-outline-dark:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,0.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{background-color:transparent;color:#343a40}.btn-outline-dark.active:not(:disabled):not(.disabled),.btn-outline-dark:not(:disabled):not(.disabled):active,.show>.btn-outline-dark.dropdown-toggle{background-color:#343a40;border-color:#343a40;color:#fff}.btn-outline-dark.active:not(:disabled):not(.disabled):focus,.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,0.5)}.btn-link{color:#007bff;font-weight:400;text-decoration:none}.btn-link:hover{color:#0056b3;text-decoration:underline}.btn-link.focus,.btn-link:focus{box-shadow:none;text-decoration:underline}.btn-link.disabled,.btn-link:disabled{color:#6c757d;pointer-events:none}.btn-group-lg>.btn,.btn-lg{border-radius:.3rem;font-size:1.25rem;line-height:1.5;padding:.5rem 1rem}.btn-group-sm>.btn,.btn-sm{border-radius:.2rem;font-size:.875rem;line-height:1.5;padding:.25rem .5rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input.btn-block[type=button],input.btn-block[type=reset],input.btn-block[type=submit]{width:100%}.stretched-link::after{background-color:rgba(0,0,0,0);bottom:0;content:'';left:0;pointer-events:auto;position:absolute;right:0;top:0;z-index:1}.text-wrap{white-space:normal !important}.card{background-clip:border-box;background-color:#fff;border:1px solid rgba(0,0,0,0.125);border-radius:.25rem;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0;position:relative;word-wrap:break-word}.card>hr{margin-left:0;margin-right:0}.card>.list-group:first-child .list-group-item:first-child{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.card>.list-group:last-child .list-group-item:last-child{border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem}.card-body{-ms-flex:1 1 auto;flex:1 1 auto;min-height:1px;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-bottom:0;margin-top:-.375rem}.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{background-color:rgba(0,0,0,0.03);border-bottom:1px solid rgba(0,0,0,0.125);margin-bottom:0;padding:.75rem 1.25rem}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-header+.list-group .list-group-item:first-child{border-top:0}.card-footer{background-color:rgba(0,0,0,0.03);border-top:1px solid rgba(0,0,0,0.125);padding:.75rem 1.25rem}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{border-bottom:0;margin-bottom:-.75rem;margin-left:-.625rem;margin-right:-.625rem}.card-header-pills{margin-left:-.625rem;margin-right:-.625rem}.card-img-overlay{bottom:0;left:0;padding:1.25rem;position:absolute;right:0;top:0}.card-img,.card-img-bottom,.card-img-top{-ms-flex-negative:0;flex-shrink:0;width:100%}.card-img,.card-img-top{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom{border-bottom-left-radius:calc(.25rem - 1px);border-bottom-right-radius:calc(.25rem - 1px)}.w-100{width:100% !important}.shadow{box-shadow:0 0.5rem 1rem rgba(0,0,0,0.15) !important}.bg-primary{background-color:#007bff !important}button.bg-primary:focus,button.bg-primary:hover{background-color:#0062cc !important}a.bg-primary:focus,a.bg-primary:hover{background-color:#0062cc !important}a.text-primary:focus,a.text-primary:hover{color:#121416 !important}.bg-secondary{background-color:#6c757d !important}button.bg-secondary:focus,button.bg-secondary:hover{background-color:#545b62 !important}a.bg-secondary:focus,a.bg-secondary:hover{background-color:#545b62 !important}a.text-secondary:focus,a.text-secondary:hover{color:#121416 !important}.bg-success{background-color:#28a745 !important}button.bg-success:focus,button.bg-success:hover{background-color:#1e7e34 !important}a.bg-success:focus,a.bg-success:hover{background-color:#1e7e34 !important}a.text-success:focus,a.text-success:hover{color:#121416 !important}.bg-info{background-color:#17a2b8 !important}button.bg-info:focus,button.bg-info:hover{background-color:#117a8b !important}a.bg-info:focus,a.bg-info:hover{background-color:#117a8b !important}a.text-info:focus,a.text-info:hover{color:#121416 !important}.bg-warning{background-color:#ffc107 !important}button.bg-warning:focus,button.bg-warning:hover{background-color:#d39e00 !important}a.bg-warning:focus,a.bg-warning:hover{background-color:#d39e00 !important}a.text-warning:focus,a.text-warning:hover{color:#121416 !important}.bg-danger{background-color:#dc3545 !important}button.bg-danger:focus,button.bg-danger:hover{background-color:#bd2130 !important}a.bg-danger:focus,a.bg-danger:hover{background-color:#bd2130 !important}a.text-danger:focus,a.text-danger:hover{color:#121416 !important}.bg-light{background-color:#f8f9fa !important}button.bg-light:focus,button.bg-light:hover{background-color:#dae0e5 !important}a.bg-light:focus,a.bg-light:hover{background-color:#dae0e5 !important}a.text-light:focus,a.text-light:hover{color:#121416 !important}.bg-dark{background-color:#343a40 !important}button.bg-dark:focus,button.bg-dark:hover{background-color:#1d2124 !important}a.bg-dark:focus,a.bg-dark:hover{background-color:#1d2124 !important}a.text-dark:focus,a.text-dark:hover{color:#121416 !important}.bg-white{background-color:#fff !important}button.bg-white:focus,button.bg-white:hover{background-color:#e6e6e6 !important}a.bg-white:focus,a.bg-white:hover{background-color:#e6e6e6 !important}a.text-white:focus,a.text-white:hover{color:#121416 !important}.text-primary{color:#007bff !important}.text-secondary{color:#6c757d !important}.text-success{color:#28a745 !important}.text-info{color:#17a2b8 !important}.text-warning{color:#ffc107 !important}.text-danger{color:#dc3545 !important}.text-light{color:#f8f9fa !important}.text-dark{color:#343a40 !important}.text-white{color:#fff !important}.text-body{color:#212529 !important}.text-muted{color:#6c757d !important}.text-black-50{color:rgba(0,0,0,0.5) !important}.text-white-50{color:rgba(255,255,255,0.5) !important}.bg-transparent{background-color:transparent !important}.text-justify{text-align:justify !important}.text-left{text-align:left !important}.text-right{text-align:right !important}.text-center{text-align:center !important}.font-weight-light{font-weight:300 !important}.font-weight-lighter{font-weight:lighter !important}.font-weight-normal{font-weight:400 !important}.font-weight-bold{font-weight:700 !important}.font-weight-bolder{font-weight:bolder !important}.font-italic{font-style:italic !important}.container{margin-left:auto;margin-right:auto;padding-left:15px;padding-right:15px;width:100%}@media (min-width: 576px){.container{max-width:540px}}@media (min-width: 768px){.container{max-width:720px}}@media (min-width: 992px){.container{max-width:960px}}@media (min-width: 1200px){.container{max-width:1140px}}.container-fluid,.container-lg,.container-md,.container-sm,.container-xl{margin-left:auto;margin-right:auto;padding-left:15px;padding-right:15px;width:100%}@media (min-width: 576px){.container,.container-sm{max-width:540px}}@media (min-width: 768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width: 992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width: 1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}.row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:-15px;margin-right:-15px}.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-auto,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-auto,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-auto{padding-left:15px;padding-right:15px;position:relative;width:100%}@media (min-width: 576px){.col-sm{flex-basis:0;flex-grow:1;-ms-flex-positive:1;-ms-flex-preferred-size:0;max-width:100%}.col-sm-auto{-ms-flex:0 0 auto;flex:0 0 auto;max-width:100%;width:auto}.col-sm-1{-ms-flex:0 0 8.33333%;flex:0 0 8.33333%;max-width:8.33333%}.col-sm-2{-ms-flex:0 0 16.66667%;flex:0 0 16.66667%;max-width:16.66667%}.col-sm-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-sm-4{-ms-flex:0 0 33.33333%;flex:0 0 33.33333%;max-width:33.33333%}.col-sm-5{-ms-flex:0 0 41.66667%;flex:0 0 41.66667%;max-width:41.66667%}.col-sm-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-sm-7{-ms-flex:0 0 58.33333%;flex:0 0 58.33333%;max-width:58.33333%}.col-sm-8{-ms-flex:0 0 66.66667%;flex:0 0 66.66667%;max-width:66.66667%}.col-sm-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-sm-10{-ms-flex:0 0 83.33333%;flex:0 0 83.33333%;max-width:83.33333%}.col-sm-11{-ms-flex:0 0 91.66667%;flex:0 0 91.66667%;max-width:91.66667%}.col-sm-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}}@media (min-width: 768px){.col-md{flex-basis:0;flex-grow:1;-ms-flex-positive:1;-ms-flex-preferred-size:0;max-width:100%}.col-md-auto{-ms-flex:0 0 auto;flex:0 0 auto;max-width:100%;width:auto}.col-md-1{-ms-flex:0 0 8.33333%;flex:0 0 8.33333%;max-width:8.33333%}.col-md-2{-ms-flex:0 0 16.66667%;flex:0 0 16.66667%;max-width:16.66667%}.col-md-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-md-4{-ms-flex:0 0 33.33333%;flex:0 0 33.33333%;max-width:33.33333%}.col-md-5{-ms-flex:0 0 41.66667%;flex:0 0 41.66667%;max-width:41.66667%}.col-md-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-md-7{-ms-flex:0 0 58.33333%;flex:0 0 58.33333%;max-width:58.33333%}.col-md-8{-ms-flex:0 0 66.66667%;flex:0 0 66.66667%;max-width:66.66667%}.col-md-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-md-10{-ms-flex:0 0 83.33333%;flex:0 0 83.33333%;max-width:83.33333%}.col-md-11{-ms-flex:0 0 91.66667%;flex:0 0 91.66667%;max-width:91.66667%}.col-md-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}}@media (min-width: 992px){.col-lg{flex-basis:0;flex-grow:1;-ms-flex-positive:1;-ms-flex-preferred-size:0;max-width:100%}.col-lg-auto{-ms-flex:0 0 auto;flex:0 0 auto;max-width:100%;width:auto}.col-lg-1{-ms-flex:0 0 8.33333%;flex:0 0 8.33333%;max-width:8.33333%}.col-lg-2{-ms-flex:0 0 16.66667%;flex:0 0 16.66667%;max-width:16.66667%}.col-lg-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-lg-4{-ms-flex:0 0 33.33333%;flex:0 0 33.33333%;max-width:33.33333%}.col-lg-5{-ms-flex:0 0 41.66667%;flex:0 0 41.66667%;max-width:41.66667%}.col-lg-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-lg-7{-ms-flex:0 0 58.33333%;flex:0 0 58.33333%;max-width:58.33333%}.col-lg-8{-ms-flex:0 0 66.66667%;flex:0 0 66.66667%;max-width:66.66667%}.col-lg-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-lg-10{-ms-flex:0 0 83.33333%;flex:0 0 83.33333%;max-width:83.33333%}.col-lg-11{-ms-flex:0 0 91.66667%;flex:0 0 91.66667%;max-width:91.66667%}.col-lg-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}}@media (min-width: 1200px){.col-xl{flex-basis:0;flex-grow:1;-ms-flex-positive:1;-ms-flex-preferred-size:0;max-width:100%}.col-xl-auto{-ms-flex:0 0 auto;flex:0 0 auto;max-width:100%;width:auto}.col-xl-1{-ms-flex:0 0 8.33333%;flex:0 0 8.33333%;max-width:8.33333%}.col-xl-2{-ms-flex:0 0 16.66667%;flex:0 0 16.66667%;max-width:16.66667%}.col-xl-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-xl-4{-ms-flex:0 0 33.33333%;flex:0 0 33.33333%;max-width:33.33333%}.col-xl-5{-ms-flex:0 0 41.66667%;flex:0 0 41.66667%;max-width:41.66667%}.col-xl-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-xl-7{-ms-flex:0 0 58.33333%;flex:0 0 58.33333%;max-width:58.33333%}.col-xl-8{-ms-flex:0 0 66.66667%;flex:0 0 66.66667%;max-width:66.66667%}.col-xl-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-xl-10{-ms-flex:0 0 83.33333%;flex:0 0 83.33333%;max-width:83.33333%}.col-xl-11{-ms-flex:0 0 91.66667%;flex:0 0 91.66667%;max-width:91.66667%}.col-xl-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}}.d-flex{display:-ms-flexbox !important;display:flex !important}.sphinx-bs,.sphinx-bs *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.sphinx-bs p{margin-top:0} diff --git a/locale/en/_panels_static/panels-main.c949a650a448cc0ae9fd3441c0e17fb0.css b/locale/en/_panels_static/panels-main.c949a650a448cc0ae9fd3441c0e17fb0.css new file mode 100644 index 0000000000..fc14abc85d --- /dev/null +++ b/locale/en/_panels_static/panels-main.c949a650a448cc0ae9fd3441c0e17fb0.css @@ -0,0 +1 @@ +details.dropdown .summary-title{padding-right:3em !important;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none}details.dropdown:hover{cursor:pointer}details.dropdown .summary-content{cursor:default}details.dropdown summary{list-style:none;padding:1em}details.dropdown summary .octicon.no-title{vertical-align:middle}details.dropdown[open] summary .octicon.no-title{visibility:hidden}details.dropdown summary::-webkit-details-marker{display:none}details.dropdown summary:focus{outline:none}details.dropdown summary:hover .summary-up svg,details.dropdown summary:hover .summary-down svg{opacity:1}details.dropdown .summary-up svg,details.dropdown .summary-down svg{display:block;opacity:.6}details.dropdown .summary-up,details.dropdown .summary-down{pointer-events:none;position:absolute;right:1em;top:.75em}details.dropdown[open] .summary-down{visibility:hidden}details.dropdown:not([open]) .summary-up{visibility:hidden}details.dropdown.fade-in[open] summary~*{-moz-animation:panels-fade-in .5s ease-in-out;-webkit-animation:panels-fade-in .5s ease-in-out;animation:panels-fade-in .5s ease-in-out}details.dropdown.fade-in-slide-down[open] summary~*{-moz-animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out;-webkit-animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out;animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out}@keyframes panels-fade-in{0%{opacity:0}100%{opacity:1}}@keyframes panels-slide-down{0%{transform:translate(0, -10px)}100%{transform:translate(0, 0)}}.octicon{display:inline-block;fill:currentColor;vertical-align:text-top}.tabbed-content{box-shadow:0 -.0625rem var(--tabs-color-overline),0 .0625rem var(--tabs-color-underline);display:none;order:99;padding-bottom:.75rem;padding-top:.75rem;width:100%}.tabbed-content>:first-child{margin-top:0 !important}.tabbed-content>:last-child{margin-bottom:0 !important}.tabbed-content>.tabbed-set{margin:0}.tabbed-set{border-radius:.125rem;display:flex;flex-wrap:wrap;margin:1em 0;position:relative}.tabbed-set>input{opacity:0;position:absolute}.tabbed-set>input:checked+label{border-color:var(--tabs-color-label-active);color:var(--tabs-color-label-active)}.tabbed-set>input:checked+label+.tabbed-content{display:block}.tabbed-set>input:focus+label{outline-style:auto}.tabbed-set>input:not(.focus-visible)+label{outline:none;-webkit-tap-highlight-color:transparent}.tabbed-set>label{border-bottom:.125rem solid transparent;color:var(--tabs-color-label-inactive);cursor:pointer;font-size:var(--tabs-size-label);font-weight:700;padding:1em 1.25em .5em;transition:color 250ms;width:auto;z-index:1}html .tabbed-set>label:hover{color:var(--tabs-color-label-active)} diff --git a/locale/en/_panels_static/panels-variables.06eb56fa6e07937060861dad626602ad.css b/locale/en/_panels_static/panels-variables.06eb56fa6e07937060861dad626602ad.css new file mode 100644 index 0000000000..adc6166222 --- /dev/null +++ b/locale/en/_panels_static/panels-variables.06eb56fa6e07937060861dad626602ad.css @@ -0,0 +1,7 @@ +:root { +--tabs-color-label-active: hsla(231, 99%, 66%, 1); +--tabs-color-label-inactive: rgba(178, 206, 245, 0.62); +--tabs-color-overline: rgb(207, 236, 238); +--tabs-color-underline: rgb(207, 236, 238); +--tabs-size-label: 1rem; +} \ No newline at end of file diff --git a/locale/en/alternate_build_master.pot b/locale/en/alternate_build_master.pot new file mode 100644 index 0000000000..de520e6462 --- /dev/null +++ b/locale/en/alternate_build_master.pot @@ -0,0 +1,21 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-06 10:08+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/alternate_build_master.rst:9 +msgid "CRUD operations" +msgstr "" diff --git a/locale/en/book/admin/access_control.pot b/locale/en/book/admin/access_control.pot new file mode 100644 index 0000000000..c346ef0024 --- /dev/null +++ b/locale/en/book/admin/access_control.pot @@ -0,0 +1,431 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/book/admin/access_control.rst:5 +msgid "Access control" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:7 +msgid "This section explains how Tarantool makes it possible for administrators to prevent unauthorized access to the database and to certain functions." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:10 +msgid "Briefly:" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:12 +msgid "There is a method to guarantee with password checks that users really are who they say they are (“authentication”)." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:15 +msgid "There is a :ref:`_user ` system space, where usernames and password-hashes are stored." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:18 +msgid "There are functions for saying that certain users are allowed to do certain things (“privileges”)." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:21 +msgid "There is a :ref:`_priv ` system space, where privileges are stored. Whenever a user tries to do an operation, there is a check whether the user has the privilege to do the operation (“access control”)." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:25 +msgid "Details follow." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:31 +msgid "Users" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:33 +msgid "There is a **current user** for any program working with Tarantool, local or remote. If a remote connection is using a :ref:`binary port `, the current user, by default, is '**guest**'. If the connection is using an :ref:`admin-console port `, the current user is '**admin**'. When executing a :ref:`Lua initialization script `, the current user is also ‘**admin**’." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:42 +msgid "The current user name can be found with :doc:`/reference/reference_lua/box_session/user`." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:45 +msgid "The current user can be changed:" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:47 +msgid "For a binary port connection -- with the :ref:`AUTH protocol command `, supported by most clients;" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:51 +msgid "For an admin-console connection and in a Lua initialization script -- with :doc:`/reference/reference_lua/box_session/su`;" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:54 +msgid "For a binary-port connection invoking a stored function with the CALL command -- if the :doc:`SETUID ` property is enabled for the function, Tarantool temporarily replaces the current user with the function’s creator, with all the creator's privileges, during function execution." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:64 +msgid "Passwords" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:66 +msgid "Each user (except 'guest') may have a **password**. The password is any alphanumeric string." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:69 +msgid "Tarantool passwords are stored in the :ref:`_user ` system space with a `cryptographic hash function `_ so that, if the password is ‘x’, the stored hash-password is a long string like ‘lL3OvhkIPOKh+Vn9Avlkx69M/Ck=‘. Tarantool supports two protocols for authenticating users:" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:76 +msgid "`CHAP `_ with ``SHA-1`` hashing" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:78 +msgid "In this case, password hashes are stored in the ``_user`` space `unsalted `_. If an attacker gains access to the database, they may crack a password using, for example, a `rainbow table `_." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:81 +msgid "`PAP `_ with ``SHA256`` hashing (Enterprise Edition)" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:83 +msgid "For PAP, a password is salted with a user-unique salt before saving it in the ``_user`` space. This keeps the database protected from cracking using a rainbow table. Note that PAP sends a password as plain text, so you need to configure SSL/TLS for a connection." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:87 +msgid "There are two functions for managing passwords in Tarantool:" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:89 +msgid ":doc:`/reference/reference_lua/box_schema/user_passwd` allows you to change a user's password." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:91 +msgid ":doc:`/reference/reference_lua/box_schema/user_password` returns a hash of a user's password." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:93 +msgid "Tarantool Enterprise Edition also allows you to improve database security by enforcing the use of strong passwords, setting up a maximum password age, and so on. Learn more from the :ref:`Access control ` section." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:101 +msgid "Owners and privileges" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:103 +msgid "Tarantool has one database. It may be called \"box.schema\" or \"universe\". The database contains database objects, including spaces, indexes, users, roles, sequences, and functions." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:107 +msgid "The **owner** of a database object is the user who created it. The owner of the database itself, and the owner of objects that are created initially (the system spaces and the default users) is '**admin**'." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:112 +msgid "Owners automatically have **privileges** for what they create. They can share these privileges with other users or with roles, using :doc:`/reference/reference_lua/box_schema/user_grant` requests. The following privileges can be granted:" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:117 +msgid "'read', e.g. allow select from a space" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:118 +msgid "'write', e.g. allow update on a space" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:119 +msgid "'execute', e.g. allow call of a function, or (less commonly) allow use of a role" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:120 +msgid "'create', e.g. allow :doc:`box.schema.space.create ` (access to certain system spaces is also necessary)" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:123 +msgid "'alter', e.g. allow :doc:`box.space.x.index.y:alter ` (access to certain system spaces is also necessary)" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:126 +msgid "'drop', e.g. allow :doc:`box.sequence.x:drop ` (access to certain system spaces is also necessary)" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:129 +msgid "'usage', e.g. whether any action is allowable regardless of other privileges (sometimes revoking 'usage' is a convenient way to block a user temporarily without dropping the user)" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:132 +msgid "'session', e.g. whether the user can 'connect'." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:134 +msgid "To **create** objects, users need the 'create' privilege and at least 'read' and 'write' privileges on the system space with a similar name (for example, on the :ref:`_space ` if the user needs to create spaces)." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:139 +msgid "To **access** objects, users need an appropriate privilege on the object (for example, the 'execute' privilege on function F if the users need to execute function F). See below some :ref:`examples for granting specific privileges ` that a grantor -- that is, 'admin' or the object creator -- can make." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:145 +msgid "To drop an object, a user must be an 'admin' or have the 'super' role. Some objects may also be dropped by their creators. As the owner of the entire database, any 'admin' can drop any object, including other users." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:150 +msgid "To grant privileges to a user, the object owner says :doc:`/reference/reference_lua/box_schema/user_grant`. To revoke privileges from a user, the object owner says :doc:`/reference/reference_lua/box_schema/user_revoke`. In either case, there are up to five parameters:" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:156 +msgid "(user-name, privilege, object-type [, object-name [, options]])" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:160 +msgid "``user-name`` is the user (or role) that will receive or lose the privilege;" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:161 +msgid "``privilege`` is any of 'read', 'write', 'execute', 'create', 'alter', 'drop', 'usage', or 'session' (or a comma-separated list);" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:163 +msgid "``object-type`` is any of 'space', 'index', 'sequence', 'function', 'user', 'role', or 'universe';" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:165 +msgid "``object-name`` is what the privilege is for (omitted if ``object-type`` is 'universe') (may be omitted or ``nil`` if the intent is to grant for all objects of the same type);" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:168 +msgid "``options`` is a list inside braces, for example ``{if_not_exists=true|false}`` (usually omitted because the default is acceptable)." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:171 +msgid "All updates of user privileges are reflected immediately in the existing sessions and objects, e.g. functions." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:174 +msgid "**Example for granting many privileges at once**" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:176 +msgid "In this example an 'admin' user grants many privileges on many objects to user 'U', using a single request." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:179 +msgid "box.schema.user.grant('U','read,write,execute,create,drop','universe')" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:185 +msgid "**Examples for granting privileges for specific operations**" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:187 +msgid "In these examples an administrator grants strictly the minimal privileges necessary for particular operations, to user 'U'." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:191 +msgid "-- So that 'U' can create spaces:\n" +" box.schema.user.grant('U','create','space')\n" +" box.schema.user.grant('U','write', 'space', '_schema')\n" +" box.schema.user.grant('U','write', 'space', '_space')\n" +"-- So that 'U' can create indexes on space T\n" +" box.schema.user.grant('U','create,read','space','T')\n" +" box.schema.user.grant('U','read,write','space','_space_sequence')\n" +" box.schema.user.grant('U','write', 'space', '_index')\n" +"-- So that 'U' can alter indexes on space T (assuming 'U' did not create the index)\n" +" box.schema.user.grant('U','alter','space','T')\n" +" box.schema.user.grant('U','read','space','_space')\n" +" box.schema.user.grant('U','read','space','_index')\n" +" box.schema.user.grant('U','read','space','_space_sequence')\n" +" box.schema.user.grant('U','write','space','_index')\n" +"-- So that 'U' can alter indexes on space T (assuming 'U' created the index)\n" +" box.schema.user.grant('U','read','space','_space_sequence')\n" +" box.schema.user.grant('U','read,write','space','_index')\n" +"-- So that 'U' can create users:\n" +" box.schema.user.grant('U','create','user')\n" +" box.schema.user.grant('U', 'read,write', 'space', '_user')\n" +" box.schema.user.grant('U', 'write', 'space', '_priv')\n" +"-- So that 'U' can create roles:\n" +" box.schema.user.grant('U','create','role')\n" +" box.schema.user.grant('U', 'read,write', 'space', '_user')\n" +" box.schema.user.grant('U', 'write', 'space', '_priv')\n" +"-- So that 'U' can create sequence generators:\n" +" box.schema.user.grant('U','create','sequence')\n" +" box.schema.user.grant('U', 'read,write', 'space', '_sequence')\n" +"-- So that 'U' can create functions:\n" +" box.schema.user.grant('U','create','function')\n" +" box.schema.user.grant('U','read,write','space','_func')\n" +"-- So that 'U' can create any object of any type\n" +" box.schema.user.grant('U','read,write,create','universe')\n" +"-- So that 'U' can grant access on objects that 'U' created\n" +" box.schema.user.grant('U','write','space','_priv')\n" +"-- So that 'U' can select or get from a space named 'T'\n" +" box.schema.user.grant('U','read','space','T')\n" +"-- So that 'U' can update or insert or delete or truncate a space named 'T'\n" +" box.schema.user.grant('U','write','space','T')\n" +"-- So that 'U' can execute a function named 'F'\n" +" box.schema.user.grant('U','execute','function','F')\n" +"-- So that 'U' can use the \"S:next()\" function with a sequence named S\n" +" box.schema.user.grant('U','read,write','sequence','S')\n" +"-- So that 'U' can use the \"S:set()\" or \"S:reset() function with a sequence named S\n" +" box.schema.user.grant('U','write','sequence','S')\n" +"-- So that 'U' can drop a sequence (assuming 'U' did not create it)\n" +" box.schema.user.grant('U','drop','sequence')\n" +" box.schema.user.grant('U','write','space','_sequence_data')\n" +" box.schema.user.grant('U','write','space','_sequence')\n" +"-- So that 'U' can drop a function (assuming 'U' did not create it)\n" +" box.schema.user.grant('U','drop','function')\n" +" box.schema.user.grant('U','write','space','_func')\n" +"-- So that 'U' can drop a space that has some associated objects\n" +" box.schema.user.grant('U','create,drop','space')\n" +" box.schema.user.grant('U','write','space','_schema')\n" +" box.schema.user.grant('U','write','space','_space')\n" +" box.schema.user.grant('U','write','space','_space_sequence')\n" +" box.schema.user.grant('U','read','space','_trigger')\n" +" box.schema.user.grant('U','read','space','_fk_constraint')\n" +" box.schema.user.grant('U','read','space','_ck_constraint')\n" +" box.schema.user.grant('U','read','space','_func_index')\n" +"-- So that 'U' can drop any space (ignore if the privilege exists already)\n" +" box.schema.user.grant('U','drop','space',nil,{if_not_exists=true})" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:257 +msgid "**Example for creating users and objects then granting privileges**" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:259 +msgid "Here a Lua function is created that will be executed under the user ID of its creator, even if called by another user." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:262 +msgid "First, the two spaces ('u' and 'i') are created, and a no-password user ('internal') is granted full access to them. Then a ('read_and_modify') is defined and the no-password user becomes this function's creator. Finally, another user ('public_user') is granted access to execute Lua functions created by the no-password user." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:267 +msgid "box.schema.space.create('u')\n" +"box.schema.space.create('i')\n" +"box.space.u:create_index('pk')\n" +"box.space.i:create_index('pk')\n" +"\n" +"box.schema.user.create('internal')\n" +"\n" +"box.schema.user.grant('internal', 'read,write', 'space', 'u')\n" +"box.schema.user.grant('internal', 'read,write', 'space', 'i')\n" +"box.schema.user.grant('internal', 'create', 'universe')\n" +"box.schema.user.grant('internal', 'read,write', 'space', '_func')\n" +"\n" +"function read_and_modify(key)\n" +" local u = box.space.u\n" +" local i = box.space.i\n" +" local fiber = require('fiber')\n" +" local t = u:get{key}\n" +" if t ~= nil then\n" +" u:put{key, box.session.uid()}\n" +" i:put{key, fiber.time()}\n" +" end\n" +"end\n" +"\n" +"box.session.su('internal')\n" +"box.schema.func.create('read_and_modify', {setuid= true})\n" +"box.session.su('admin')\n" +"box.schema.user.create('public_user', {password = 'secret'})\n" +"box.schema.user.grant('public_user', 'execute', 'function', 'read_and_modify')" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:302 +msgid "Roles" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:304 +msgid "A **role** is a container for privileges which can be granted to regular users. Instead of granting or revoking individual privileges, you can put all the privileges in a role and then grant or revoke the role." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:308 +msgid "Role information is stored in the :ref:`_user ` space, but the third field in the tuple -- the type field -- is ‘role’ rather than ‘user’." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:311 +msgid "An important feature in role management is that roles can be **nested**. For example, role R1 can be granted a privileged \"role R2\", so users with the role R1 will subsequently get all privileges from both roles R1 and R2. In other words, a user gets all the privileges granted to a user’s roles, directly or indirectly." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:317 +msgid "There are actually two ways to grant or revoke a role: :samp:`box.schema.user.grant-or-revoke({user-name-or-role-name},'execute', 'role',{role-name}...)` or :samp:`box.schema.user.grant-or-revoke({user-name-or-role-name},{role-name}...)`. The second way is preferable." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:323 +msgid "The 'usage' and 'session' privileges cannot be granted to roles." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:325 +msgid "**Example**" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:327 +msgid "-- This example will work for a user with many privileges, such as 'admin'\n" +"-- or a user with the pre-defined 'super' role\n" +"-- Create space T with a primary index\n" +"box.schema.space.create('T')\n" +"box.space.T:create_index('primary', {})\n" +"-- Create the user U1 so that later the current user can be changed to U1\n" +"box.schema.user.create('U1')\n" +"-- Create two roles, R1 and R2\n" +"box.schema.role.create('R1')\n" +"box.schema.role.create('R2')\n" +"-- Grant role R2 to role R1 and role R1 to user U1 (order doesn't matter)\n" +"-- There are two ways to grant a role; here the shorter way is used\n" +"box.schema.role.grant('R1', 'R2')\n" +"box.schema.user.grant('U1', 'R1')\n" +"-- Grant read/write privileges for space T to role R2\n" +"-- (but not to role R1, and not to user U1)\n" +"box.schema.role.grant('R2', 'read,write', 'space', 'T')\n" +"-- Change the current user to user U1\n" +"box.session.su('U1')\n" +"-- An insertion to space T will now succeed because (due to nested roles)\n" +"-- user U1 has write privilege on space T\n" +"box.space.T:insert{1}" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:352 +msgid "More details are to be found in :doc:`/reference/reference_lua/box_schema/user_grant` and :doc:`/reference/reference_lua/box_schema/role_grant` in the built-in modules reference." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:361 +msgid "Sessions and security" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:363 +msgid "A **session** is the state of a connection to Tarantool. It contains:" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:365 +msgid "An integer ID identifying the connection," +msgstr "" + +#: ../../doc/book/admin/access_control.rst:366 +msgid "the :ref:`current user ` associated with the connection," +msgstr "" + +#: ../../doc/book/admin/access_control.rst:367 +msgid "text description of the connected peer, and" +msgstr "" + +#: ../../doc/book/admin/access_control.rst:368 +msgid "session local state, such as Lua variables and functions." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:370 +msgid "In Tarantool, a single session can execute multiple concurrent transactions. Each transaction is identified by a unique integer ID, which can be queried at start of the transaction using :doc:`/reference/reference_lua/box_session/sync`." +msgstr "" + +#: ../../doc/book/admin/access_control.rst:376 +msgid "To track all connects and disconnects, you can use :ref:`connection and authentication triggers `." +msgstr "" diff --git a/locale/en/book/admin/backups.pot b/locale/en/book/admin/backups.pot new file mode 100644 index 0000000000..a68a30d5c9 --- /dev/null +++ b/locale/en/book/admin/backups.pot @@ -0,0 +1,117 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/book/admin/backups.rst:5 +msgid "Backups" +msgstr "" + +#: ../../doc/book/admin/backups.rst:7 +msgid "Tarantool has an append-only storage architecture: it appends data to files but it never overwrites earlier data. The :ref:`Tarantool garbage collector ` removes old files after a checkpoint. You can prevent or delay the garbage collector's action by configuring the :ref:`checkpoint daemon `. Backups can be taken at any time, with minimal overhead on database performance." +msgstr "" + +#: ../../doc/book/admin/backups.rst:16 +msgid "Two functions are helpful for backups in certain situations:" +msgstr "" + +#: ../../doc/book/admin/backups.rst:18 +msgid ":doc:`/reference/reference_lua/box_backup/start` informs the server that activities related to the removal of outdated backups must be suspended and returns a table with the names of snapshot and vinyl files that should be copied." +msgstr "" + +#: ../../doc/book/admin/backups.rst:23 +msgid ":doc:`/reference/reference_lua/box_backup/stop` later informs the server that normal operations may resume." +msgstr "" + +#: ../../doc/book/admin/backups.rst:30 +msgid "Hot backup (memtx)" +msgstr "" + +#: ../../doc/book/admin/backups.rst:32 +msgid "This is a special case when there are only in-memory tables." +msgstr "" + +#: ../../doc/book/admin/backups.rst:34 +msgid "The last :ref:`snapshot file ` is a backup of the entire database; and the :ref:`WAL ` files that are made after the last snapshot are incremental backups. Therefore taking a backup is a matter of copying the snapshot and WAL files." +msgstr "" + +#: ../../doc/book/admin/backups.rst:39 +msgid "Use ``tar`` to make a (possibly compressed) copy of the latest .snap and .xlog files on the :ref:`memtx_dir ` and :ref:`wal_dir ` directories." +msgstr "" + +#: ../../doc/book/admin/backups.rst:43 +msgid "If there is a security policy, encrypt the .tar file." +msgstr "" + +#: ../../doc/book/admin/backups.rst:45 +msgid "Copy the .tar file to a safe place." +msgstr "" + +#: ../../doc/book/admin/backups.rst:47 +msgid "Later, restoring the database is a matter of taking the .tar file and putting its contents back in the ``memtx_dir`` and ``wal_dir`` directories." +msgstr "" + +#: ../../doc/book/admin/backups.rst:54 +msgid "Hot backup (vinyl/memtx)" +msgstr "" + +#: ../../doc/book/admin/backups.rst:56 +msgid "Vinyl stores its files in :ref:`vinyl_dir `, and creates a folder for each database space. Dump and compaction processes are append-only and create new files. The Tarantool garbage collector may remove old files after each checkpoint." +msgstr "" + +#: ../../doc/book/admin/backups.rst:61 +msgid "To take a mixed backup:" +msgstr "" + +#: ../../doc/book/admin/backups.rst:63 +msgid "Issue :doc:`/reference/reference_lua/box_backup/start` on the :ref:`administrative console `. This will return a list of files to back up and suspend garbage collection for them till the next ``box.backup.stop()``." +msgstr "" + +#: ../../doc/book/admin/backups.rst:68 +msgid "Copy the files from the list to a safe location. This will include memtx snapshot files, vinyl run and index files, at a state consistent with the last checkpoint." +msgstr "" + +#: ../../doc/book/admin/backups.rst:72 +msgid "Issue :doc:`/reference/reference_lua/box_backup/stop` so the garbage collector can continue as usual." +msgstr "" + +#: ../../doc/book/admin/backups.rst:79 +msgid "Continuous remote backup (memtx)" +msgstr "" + +#: ../../doc/book/admin/backups.rst:81 +msgid "The :ref:`replication ` feature is useful for backup as well as for load balancing." +msgstr "" + +#: ../../doc/book/admin/backups.rst:84 +msgid "Therefore taking a backup is a matter of ensuring that any given replica is up to date, and doing a cold backup on it. Since all the other replicas continue to operate, this is not a cold backup from the end user’s point of view. This could be done on a regular basis, with a ``cron`` job or with a Tarantool fiber." +msgstr "" + +#: ../../doc/book/admin/backups.rst:93 +msgid "Continuous backup (memtx)" +msgstr "" + +#: ../../doc/book/admin/backups.rst:95 +msgid "The logged changes done since the last cold backup must be secured, while the system is running." +msgstr "" + +#: ../../doc/book/admin/backups.rst:98 +msgid "For this purpose, you need a file copy utility that will do the copying remotely and continuously, copying only the parts of a write ahead log file that are changing. One such utility is `rsync `_." +msgstr "" + +#: ../../doc/book/admin/backups.rst:103 +msgid "Alternatively, you need an ordinary file copy utility, but there should be frequent production of new snapshot files or new WAL files as changes occur, so that only the new files need to be copied." +msgstr "" diff --git a/locale/en/book/admin/bug_reports.pot b/locale/en/book/admin/bug_reports.pot new file mode 100644 index 0000000000..8cd6346564 --- /dev/null +++ b/locale/en/book/admin/bug_reports.pot @@ -0,0 +1,49 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/book/admin/bug_reports.rst:5 +msgid "Bug reports" +msgstr "" + +#: ../../doc/book/admin/bug_reports.rst:7 +msgid "If you found a bug in Tarantool, you’re doing us a favor by taking the time to tell us about it." +msgstr "" + +#: ../../doc/book/admin/bug_reports.rst:10 +msgid "Please create an issue at Tarantool repository at GitHub. We encourage you to include the following information:" +msgstr "" + +#: ../../doc/book/admin/bug_reports.rst:13 +msgid "Steps needed to reproduce the bug, and an explanation why this differs from the expected behavior according to our manual. Please provide specific unique information. For example, instead of \"I can’t get certain information\", say \"box.space.x:delete() didn’t report what was deleted\"." +msgstr "" + +#: ../../doc/book/admin/bug_reports.rst:18 +msgid "Your operating system name and version, the Tarantool name and version, and any unusual details about your machine and its configuration." +msgstr "" + +#: ../../doc/book/admin/bug_reports.rst:21 +msgid "Related files like a :ref:`stack trace ` or a Tarantool :ref:`log file `." +msgstr "" + +#: ../../doc/book/admin/bug_reports.rst:24 +msgid "If this is a feature request or if it affects a special category of users, be sure to mention that." +msgstr "" + +#: ../../doc/book/admin/bug_reports.rst:27 +msgid "Usually within one or two workdays a Tarantool team member will write an acknowledgment, or some questions, or suggestions for a workaround." +msgstr "" diff --git a/locale/en/book/admin/daemon_supervision.pot b/locale/en/book/admin/daemon_supervision.pot new file mode 100644 index 0000000000..21ac0a3c56 --- /dev/null +++ b/locale/en/book/admin/daemon_supervision.pot @@ -0,0 +1,318 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/book/admin/daemon_supervision.rst:5 +msgid "Daemon supervision" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:11 +msgid "Server signals" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:13 +msgid "Tarantool processes these signals during the event loop in the transaction processor thread:" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:22 +msgid "Signal" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:22 +msgid "Effect" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:24 +msgid "SIGHUP" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:24 +msgid "May cause log file rotation. See the :ref:`example ` in reference on Tarantool logging parameters." +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:28 +msgid "SIGUSR1" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:28 +msgid "May cause a database checkpoint. See :doc:`/reference/reference_lua/box_snapshot`." +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:31 +msgid "SIGTERM" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:31 +msgid "May cause graceful shutdown (information will be saved first)." +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:34 +msgid "SIGINT (also known as keyboard interrupt)" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:34 +msgid "May cause graceful shutdown." +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:38 +msgid "SIGKILL" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:38 +msgid "Causes an immediate shutdown." +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:41 +msgid "Other signals will result in behavior defined by the operating system. Signals other than SIGKILL may be ignored, especially if Tarantool is executing a long-running procedure which prevents return to the event loop in the transaction processor thread." +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:50 +msgid "Automatic instance restart" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:52 +msgid "On ``systemd``-enabled platforms, ``systemd`` automatically restarts all Tarantool instances in case of failure. To demonstrate it, let’s try to destroy an instance:" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:56 +msgid "$ systemctl status tarantool@my_app|grep PID\n" +"Main PID: 5885 (tarantool)\n" +"$ tt connect my_app\n" +" • Connecting to the instance...\n" +" • Connected to /var/run/tarantool/my_app.control\n" +"/var/run/tarantool/my_app.control> os.exit(-1)\n" +" ⨯ Connection was closed. Probably instance process isn't running anymore" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:66 +msgid "Now let’s make sure that ``systemd`` has restarted the instance:" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:68 +msgid "$ systemctl status tarantool@my_app|grep PID\n" +"Main PID: 5914 (tarantool)" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:73 +msgid "Additionally, you can find the information about the instance restart in the boot logs:" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:75 +msgid "$ journalctl -u tarantool@my_app -n 8" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:83 +msgid "Core dumps" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:85 +msgid "Tarantool makes a core dump if it receives any of the following signals: SIGSEGV, SIGFPE, SIGABRT or SIGQUIT. This is automatic if Tarantool crashes." +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:88 +msgid "On ``systemd``-enabled platforms, ``coredumpctl`` automatically saves core dumps and stack traces in case of a crash. Here is a general \"how to\" for how to enable core dumps on a Unix system:" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:92 +msgid "Ensure session limits are configured to enable core dumps, i.e. say ``ulimit -c unlimited``. Check \"man 5 core\" for other reasons why a core dump may not be produced." +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:96 +msgid "Set a directory for writing core dumps to, and make sure that the directory is writable. On Linux, the directory path is set in a kernel parameter configurable via ``/proc/sys/kernel/core_pattern``." +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:100 +msgid "Make sure that core dumps include stack trace information. If you use a binary Tarantool distribution, this is automatic. If you build Tarantool from source, you will not get detailed information if you pass ``-DCMAKE_BUILD_TYPE=Release`` to CMake." +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:105 +msgid "To simulate a crash, you can execute an illegal command against a Tarantool instance:" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:108 +msgid "$ # !!! please never do this on a production system !!!\n" +"$ tt connect my_app\n" +" • Connecting to the instance...\n" +" • Connected to /var/run/tarantool/my_app.control\n" +"/var/run/tarantool/my_app.control> require('ffi').cast('char *', 0)[0] = 48\n" +" ⨯ Connection was closed. Probably instance process isn't running anymore" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:117 +msgid "Alternatively, if you know the process ID of the instance (here we refer to it as $PID), you can abort a Tarantool instance by running ``gdb`` debugger:" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:120 +msgid "$ gdb -batch -ex \"generate-core-file\" -p $PID" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:124 +msgid "or manually sending a SIGABRT signal:" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:126 +msgid "$ kill -SIGABRT $PID" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:132 +msgid "To find out the process id of the instance ($PID), you can:" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:134 +msgid "look it up in the instance's :ref:`box.info.pid `," +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:136 +msgid "find it with ``ps -A | grep tarantool``, or" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:138 +msgid "say ``systemctl status tarantool@my_app|grep PID``." +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:140 +msgid "On a ``systemd-enabled`` system, to see the latest crashes of the Tarantool daemon, say:" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:143 +msgid "$ coredumpctl list /usr/bin/tarantool\n" +"MTIME PID UID GID SIG PRESENT EXE\n" +"Sat 2016-01-23 15:21:24 MSK 20681 1000 1000 6 /usr/bin/tarantool\n" +"Sat 2016-01-23 15:51:56 MSK 21035 995 992 6 /usr/bin/tarantool" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:150 +msgid "To save a core dump into a file, say:" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:152 +msgid "$ coredumpctl -o filename.core info " +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:160 +msgid "Stack traces" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:162 +msgid "Since Tarantool stores tuples in memory, core files may be large. For investigation, you normally don't need the whole file, but only a \"stack trace\" or \"backtrace\"." +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:166 +msgid "To save a stack trace into a file, say:" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:168 +msgid "$ gdb -se \"tarantool\" -ex \"bt full\" -ex \"thread apply all bt\" --batch -c core> /tmp/tarantool_trace.txt" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:172 +msgid "where:" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:174 +msgid "\"tarantool\" is the path to the Tarantool executable," +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:175 +msgid "\"core\" is the path to the core file, and" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:176 +msgid "\"/tmp/tarantool_trace.txt\" is a sample path to a file for saving the stack trace." +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:180 +msgid "Occasionally, you may find that the trace file contains output without debug symbols – the lines will contain ”??” instead of names. If this happens, check the instructions on these Tarantool wiki pages: `How to debug core dump of stripped tarantool `_ and `How to debug core from different OS `_." +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:187 +msgid "To see the stack trace and other useful information in console, say:" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:189 +msgid "$ coredumpctl info 21035\n" +" PID: 21035 (tarantool)\n" +" UID: 995 (tarantool)\n" +" GID: 992 (tarantool)\n" +" Signal: 6 (ABRT)\n" +" Timestamp: Sat 2016-01-23 15:51:42 MSK (4h 36min ago)\n" +" Command Line: tarantool my_app.lua \n" +" Executable: /usr/bin/tarantool\n" +"Control Group: /system.slice/system-tarantool.slice/tarantool@my_app.service\n" +" Unit: tarantool@my_app.service\n" +" Slice: system-tarantool.slice\n" +" Boot ID: 7c686e2ef4dc4e3ea59122757e3067e2\n" +" Machine ID: a4a878729c654c7093dc6693f6a8e5ee\n" +" Hostname: localhost.localdomain\n" +" Message: Process 21035 (tarantool) of user 995 dumped core.\n" +"\n" +" Stack trace of thread 21035:\n" +" #0 0x00007f84993aa618 raise (libc.so.6)\n" +" #1 0x00007f84993ac21a abort (libc.so.6)\n" +" #2 0x0000560d0a9e9233 _ZL12sig_fatal_cbi (tarantool)\n" +" #3 0x00007f849a211220 __restore_rt (libpthread.so.0)\n" +" #4 0x0000560d0aaa5d9d lj_cconv_ct_ct (tarantool)\n" +" #5 0x0000560d0aaa687f lj_cconv_ct_tv (tarantool)\n" +" #6 0x0000560d0aaabe33 lj_cf_ffi_meta___newindex (tarantool)\n" +" #7 0x0000560d0aaae2f7 lj_BC_FUNCC (tarantool)\n" +" #8 0x0000560d0aa9aabd lua_pcall (tarantool)\n" +" #9 0x0000560d0aa71400 lbox_call (tarantool)\n" +" #10 0x0000560d0aa6ce36 lua_fiber_run_f (tarantool)\n" +" #11 0x0000560d0a9e8d0c _ZL16fiber_cxx_invokePFiP13__va_list_tagES0_ (tarantool)\n" +" #12 0x0000560d0aa7b255 fiber_loop (tarantool)\n" +" #13 0x0000560d0ab38ed1 coro_init (tarantool)\n" +" ..." +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:228 +msgid "Debugger" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:230 +msgid "To start ``gdb`` debugger on the core dump, say:" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:232 +msgid "$ coredumpctl gdb " +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:236 +msgid "It is highly recommended to install ``tarantool-debuginfo`` package to improve ``gdb`` experience, for example:" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:239 +msgid "$ dnf debuginfo-install tarantool" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:243 +msgid "``gdb`` also provides information about the debuginfo packages you need to install:" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:246 +msgid "$ gdb -p \n" +"...\n" +"Missing separate debuginfos, use: dnf debuginfo-install\n" +"glibc-2.22.90-26.fc24.x86_64 krb5-libs-1.14-12.fc24.x86_64\n" +"libgcc-5.3.1-3.fc24.x86_64 libgomp-5.3.1-3.fc24.x86_64\n" +"libselinux-2.4-6.fc24.x86_64 libstdc++-5.3.1-3.fc24.x86_64\n" +"libyaml-0.1.6-7.fc23.x86_64 ncurses-libs-6.0-1.20150810.fc24.x86_64\n" +"openssl-libs-1.0.2e-3.fc24.x86_64" +msgstr "" + +#: ../../doc/book/admin/daemon_supervision.rst:257 +msgid "Symbolic names are present in stack traces even if you don’t have ``tarantool-debuginfo`` package installed." +msgstr "" diff --git a/locale/en/book/admin/disaster_recovery.pot b/locale/en/book/admin/disaster_recovery.pot new file mode 100644 index 0000000000..3c6e443028 --- /dev/null +++ b/locale/en/book/admin/disaster_recovery.pot @@ -0,0 +1,165 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/book/admin/disaster_recovery.rst:5 +msgid "Disaster recovery" +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:7 +msgid "The minimal fault-tolerant Tarantool configuration would be a :ref:`replication cluster` that includes a master and a replica, or two masters." +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:11 +msgid "The basic recommendation is to configure all Tarantool instances in a cluster to create :ref:`snapshot files ` at a regular basis." +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:14 +msgid "Here follow action plans for typical crash scenarios." +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:20 +msgid "Master-replica" +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:22 +msgid "Configuration: One master and one replica." +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:24 +msgid "Problem: The master has crashed." +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:26 +#: ../../doc/book/admin/disaster_recovery.rst:93 +msgid "Your actions:" +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:28 +msgid "Ensure the master is stopped for good. For example, log in to the master machine and use ``systemctl stop tarantool@``." +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:31 +msgid "Switch the replica to master mode by setting :ref:`box.cfg.read_only ` parameter to *false* and let the load be handled by the replica (effective master)." +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:35 +msgid "Set up a replacement for the crashed master on a spare host, with :ref:`replication ` parameter set to replica (effective master), so it begins to catch up with the new master’s state. The new instance should have :ref:`box.cfg.read_only ` parameter set to *true*." +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:41 +msgid "You lose the few transactions in the master :ref:`write ahead log file `, which it may have not transferred to the replica before crash. If you were able to salvage the master .xlog file, you may be able to recover these. In order to do it:" +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:46 +msgid "Find out the position of the crashed master, as reflected on the new master." +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:48 +msgid "Find out instance UUID from the crashed master :ref:`xlog `:" +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:50 +msgid "$ head -5 *.xlog | grep Instance\n" +"Instance: ed607cad-8b6d-48d8-ba0b-dae371b79155" +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:55 +msgid "On the new master, use the UUID to find the position:" +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:57 +msgid "tarantool> box.info.vclock[box.space._cluster.index.uuid:select{'ed607cad-8b6d-48d8-ba0b-dae371b79155'}[1][1]]\n" +"---\n" +"- 23425\n" +"<...>" +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:64 +msgid "Play the records from the crashed .xlog to the new master, starting from the new master position:" +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:67 +msgid "Issue this request locally at the new master's machine to find out instance ID of the new master:" +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:70 +msgid "tarantool> box.space._cluster:select{}\n" +"---\n" +"- - [1, '88580b5c-4474-43ab-bd2b-2409a9af80d2']\n" +"..." +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:77 +msgid "Play the records to the new master:" +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:79 +msgid "$ tt play --from 23425 --replica 1" +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:87 +msgid "Master-master" +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:89 +msgid "Configuration: Two masters." +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:91 +msgid "Problem: Master#1 has crashed." +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:95 +msgid "Let the load be handled by master#2 (effective master) alone." +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:97 +msgid "2. Follow the same steps as in the :ref:`master-replica ` recovery scenario to create a new master and salvage lost data." +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:105 +msgid "Data loss" +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:107 +msgid "Configuration: Master-master or master-replica." +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:109 +msgid "Problem: Data was deleted at one master and this data loss was propagated to the other node (master or replica)." +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:112 +msgid "The following steps are applicable only to data in memtx storage engine. Your actions:" +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:115 +msgid "Put all nodes in :ref:`read-only mode ` and disable deletion of expired checkpoints with :doc:`/reference/reference_lua/box_backup/start`. This will prevent the Tarantool garbage collector from removing files made with older checkpoints until :doc:`/reference/reference_lua/box_backup/stop` is called." +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:120 +msgid "Get the latest valid :ref:`.snap file ` and use ``tt cat`` command to calculate at which lsn the data loss occurred." +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:123 +msgid "Start a new instance (instance#1) and use ``tt play`` command to play to it the contents of .snap/.xlog files up to the calculated lsn." +msgstr "" + +#: ../../doc/book/admin/disaster_recovery.rst:126 +msgid "Bootstrap a new replica from the recovered master (instance#1)." +msgstr "" diff --git a/locale/en/book/admin/index.pot b/locale/en/book/admin/index.pot new file mode 100644 index 0000000000..f03492e0e8 --- /dev/null +++ b/locale/en/book/admin/index.pot @@ -0,0 +1,49 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/book/admin/index.rst:7 +msgid "Administration" +msgstr "" + +#: ../../doc/book/admin/index.rst:9 +msgid "Tarantool is designed to have multiple running instances on the same host." +msgstr "" + +#: ../../doc/book/admin/index.rst:11 +msgid "Here we show how to administer Tarantool instances using any of the following utilities:" +msgstr "" + +#: ../../doc/book/admin/index.rst:14 +msgid "``systemd`` native utilities, or" +msgstr "" + +#: ../../doc/book/admin/index.rst:15 +msgid ":ref:`tt `, a command-line utility for managing Tarantool-based applications." +msgstr "" + +#: ../../doc/book/admin/index.rst:19 +msgid "Unlike the rest of this manual, here we use system-wide paths." +msgstr "" + +#: ../../doc/book/admin/index.rst:20 +msgid "Console examples here are for Fedora." +msgstr "" + +#: ../../doc/book/admin/index.rst:22 +msgid "This chapter includes the following sections:" +msgstr "" diff --git a/locale/en/book/admin/instance_config.pot b/locale/en/book/admin/instance_config.pot new file mode 100644 index 0000000000..446c6e43dd --- /dev/null +++ b/locale/en/book/admin/instance_config.pot @@ -0,0 +1,263 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-20 07:42+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/book/admin/instance_config.rst:6 +msgid "Application environment" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:8 +msgid "This section provides a high-level overview on how to prepare a Tarantool application for deployment and how the application's environment and layout might look. This information is helpful for understanding how to administer Tarantool instances using :ref:`tt CLI ` in both development and production environments." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:12 +msgid "The main steps of creating and preparing the application for deployment are:" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:14 +msgid ":ref:`admin-instance_config-init-environment`." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:16 +msgid ":ref:`admin-instance_config-develop-app`." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:18 +msgid ":ref:`admin-instance_config-package-app`." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:20 +msgid "In this section, a `sharded_cluster `_ application is used as an example. This cluster includes 5 instances: one router and 4 storages, which constitute two replica sets." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:None +#: ../../doc/book/admin/instance_config.rst:0 +#: ../../doc/book/admin/instance_config.rst:0 +msgid "Cluster topology" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:34 +msgid "Initializing a local environment" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:36 +msgid "Before creating an application, you need to set up a local environment for ``tt``:" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:38 +msgid "Create a home directory for the environment." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:40 +msgid "Run ``tt init`` in this directory:" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:42 +msgid "~/myapp$ tt init\n" +" • Environment config is written to 'tt.yaml'" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:47 +msgid "This command creates a default ``tt`` configuration file ``tt.yaml`` for a local environment and the directories for applications, control sockets, logs, and other artifacts:" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:51 +msgid "~/myapp$ ls\n" +"bin distfiles include instances.enabled modules templates tt.yaml" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:56 +msgid "Find detailed information about the ``tt`` configuration parameters and launch modes on the :ref:`tt configuration page `." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:66 +msgid "Creating and developing an application" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:68 +msgid "You can create an application in two ways:" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:70 +msgid "Manually by preparing its layout in a directory inside ``instances_enabled``. The directory name is used as the application identifier." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:73 +msgid "From a template by using the :ref:`tt create ` command." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:75 +msgid "In this example, the application's layout is prepared manually and looks as follows." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:77 +msgid "~/myapp$ tree\n" +".\n" +"├── bin\n" +"├── distfiles\n" +"├── include\n" +"├── instances.enabled\n" +"│ └── sharded_cluster\n" +"│ ├── config.yaml\n" +"│ ├── instances.yaml\n" +"│ ├── router.lua\n" +"│ ├── sharded_cluster-scm-1.rockspec\n" +"│ └── storage.lua\n" +"├── modules\n" +"├── templates\n" +"└── tt.yaml" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:96 +msgid "The ``sharded_cluster`` directory contains the following files:" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:98 +msgid "``config.yaml``: contains the :ref:`configuration ` of the cluster. This file might include the entire cluster topology or provide connection settings to a centralized configuration storage." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:99 +msgid "``instances.yml``: specifies instances to run in the current environment. For example, on the developer’s machine, this file might include all the instances defined in the cluster configuration. In the production environment, this file includes :ref:`instances to run on the specific machine `." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:100 +msgid "``router.lua``: includes code specific for a :ref:`router `." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:101 +msgid "``sharded_cluster-scm-1.rockspec``: specifies the required external dependencies (for example, ``vshard``)." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:102 +msgid "``storage.lua``: includes code specific for :ref:`storages `." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:104 +msgid "You can find the full example here: `sharded_cluster `_." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:114 +msgid "Packaging the application" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:116 +msgid "To package the ready application, use the :ref:`tt pack ` command. This command can create an installable DEB/RPM package or generate ``.tgz`` archive." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:119 +msgid "The structure below reflects the content of the packed ``.tgz`` archive for the `sharded_cluster `_ application:" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:121 +msgid "~/myapp$ tree -a\n" +".\n" +"├── bin\n" +"│ ├── tarantool\n" +"│ └── tt\n" +"├── include\n" +"├── instances.enabled\n" +"│ └── sharded_cluster -> ../sharded_cluster\n" +"├── modules\n" +"├── sharded_cluster\n" +"│ ├── .rocks\n" +"│ │ └── share\n" +"│ │ └── ...\n" +"│ ├── config.yaml\n" +"│ ├── instances.yaml\n" +"│ ├── router.lua\n" +"│ ├── sharded_cluster-scm-1.rockspec\n" +"│ └── storage.lua\n" +"└── tt.yaml" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:144 +msgid "The application's layout looks similar to the one defined when :ref:`developing the application ` with some differences:" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:146 +msgid "``bin``: contains the ``tarantool`` and ``tt`` binaries packed with the application bundle." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:148 +msgid "``instances.enabled``: contains a symlink to the packed ``sharded_cluster`` application." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:150 +msgid "``sharded_cluster``: a packed application. In addition to files created during the application development, includes the ``.rocks`` directory containing application dependencies (for example, ``vshard``)." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:152 +msgid "``tt.yaml``: a ``tt`` configuration file." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:159 +msgid "Instances to run" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:161 +msgid "One more difference for a deployed application is the content of the ``instances.yaml`` file that specifies instances to run in the current environment." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:163 +msgid "On the developer's machine, this file might include all the instances defined in the cluster configuration." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:170 +msgid "``instances.yaml``:" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:172 +msgid "storage-a-001:\n" +"storage-a-002:\n" +"storage-b-001:\n" +"storage-b-002:\n" +"router-a-001:" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:176 +msgid "In the production environment, this file includes instances to run on the specific machine." +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:183 +msgid "``instances.yaml`` (Server-001):" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:185 +msgid "router-a-001:" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:189 +msgid "``instances.yaml`` (Server-002):" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:191 +msgid "storage-a-001:\n" +"storage-b-001:" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:196 +msgid "``instances.yaml`` (Server-003):" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:198 +msgid "storage-a-002:\n" +"storage-b-002:" +msgstr "" + +#: ../../doc/book/admin/instance_config.rst:204 +msgid "The :ref:`Starting and stopping instances ` section describes how to start and stop Tarantool instances." +msgstr "" diff --git a/locale/en/book/admin/logs.pot b/locale/en/book/admin/logs.pot new file mode 100644 index 0000000000..19b11fa018 --- /dev/null +++ b/locale/en/book/admin/logs.pot @@ -0,0 +1,107 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/book/admin/logs.rst:4 +msgid "Logs" +msgstr "" + +#: ../../doc/book/admin/logs.rst:6 +msgid "Each Tarantool instance logs important events to its own log file ``.log``. For instances started with :ref:`tt `, the log location is defined by the ``log_dir`` parameter in the :ref:`tt configuration `. By default, it's ``/var/log/tarantool`` in the ``tt`` :ref:`system mode `, and the ``var/log/`` subdirectory of the ``tt`` working directory in the :ref:`local mode `. In the specified location, ``tt`` creates separate directories for each instance's logs." +msgstr "" + +#: ../../doc/book/admin/logs.rst:13 +msgid "To check how logging works, write something to the log using the :ref:`log ` module:" +msgstr "" + +#: ../../doc/book/admin/logs.rst:15 +msgid "$ tt connect my_app\n" +" • Connecting to the instance...\n" +" • Connected to /var/run/tarantool/my_app.control\n" +"\n" +"/var/run/tarantool/my_app.control> require('log').info(\"Hello for the manual readers\")" +msgstr "" + +#: ../../doc/book/admin/logs.rst:23 +msgid "Then check the logs:" +msgstr "" + +#: ../../doc/book/admin/logs.rst:25 +msgid "$ tail /var/log/tarantool/my_app.log\n" +"2023-09-12 18:13:00.396 [67173] main/111/guard of feedback_daemon/box.feedback_daemon V> metrics_collector restarted\n" +"2023-09-12 18:13:00.396 [67173] main/103/-/box.feedback_daemon V> feedback_daemon started\n" +"2023-09-12 18:13:00.396 [67173] main/103/- D> memtx_tuple_new_raw_impl(14) = 0x1090077b4\n" +"2023-09-12 18:13:00.396 [67173] main/103/- D> memtx_tuple_new_raw_impl(26) = 0x1090077ec\n" +"2023-09-12 18:13:00.396 [67173] main/103/- D> memtx_tuple_new_raw_impl(39) = 0x109007824\n" +"2023-09-12 18:13:00.396 [67173] main/103/- D> memtx_tuple_new_raw_impl(24) = 0x10900785c\n" +"2023-09-12 18:13:00.396 [67173] main/103/- D> memtx_tuple_new_raw_impl(39) = 0x109007894\n" +"2023-09-12 18:13:00.396 [67173] main/106/checkpoint_daemon I> scheduled next checkpoint for Tue Sep 12 19:44:34 2023\n" +"2023-09-12 18:13:00.396 [67173] main I> entering the event loop\n" +"2023-09-12 18:13:11.656 [67173] main/114/console/unix/:/tarantool I> Hello for the manual readers" +msgstr "" + +#: ../../doc/book/admin/logs.rst:42 +msgid "Log rotation" +msgstr "" + +#: ../../doc/book/admin/logs.rst:44 +msgid "When :ref:`logging to a file `, the system administrator must ensure logs are rotated timely and do not take up all the available disk space. To prevent log files from growing infinitely, ``tt`` automatically rotates instance logs. The following ``tt`` configuration parameters define the log rotation: ``log_maxsize`` (in megabytes) and ``log_maxage`` (in days). When any of these limits is reached, the log is rotated. Additionally, there is the ``log_maxbackups`` parameter (the number of stored log files for an instance), which enables automatic removal of old log files." +msgstr "" + +#: ../../doc/book/admin/logs.rst:53 +msgid "# tt.yaml\n" +"tt:\n" +" app:\n" +" log_maxsize: 100\n" +" log_maxage: 3\n" +" log_maxbackups: 50\n" +" # ..." +msgstr "" + +#: ../../doc/book/admin/logs.rst:63 +msgid "There is also the :ref:`tt logrotate ` command that performs log rotation on demand." +msgstr "" + +#: ../../doc/book/admin/logs.rst:66 +msgid "tt logrotate my_app" +msgstr "" + +#: ../../doc/book/admin/logs.rst:70 +msgid "To learn about log rotation in the deprecated ``tarantoolctl`` utility, check its :ref:`documentation `." +msgstr "" + +#: ../../doc/book/admin/logs.rst:77 +msgid "Log formats" +msgstr "" + +#: ../../doc/book/admin/logs.rst:79 +msgid "Tarantool can write its logs to a log file, to ``syslog``, or to a specified program through a pipe." +msgstr "" + +#: ../../doc/book/admin/logs.rst:82 +msgid "File is the default log format for ``tt``. To send logs to a pipe or ``syslog``, specify the :ref:`box.cfg.log ` parameter, for example:" +msgstr "" + +#: ../../doc/book/admin/logs.rst:85 +msgid "box.cfg{log = '| cronolog tarantool.log'}\n" +"-- or\n" +"box.cfg{log = 'syslog:identity=tarantool,facility=user'}" +msgstr "" + +#: ../../doc/book/admin/logs.rst:91 +msgid "In such configurations, log rotation is usually handled by the external program used for logging." +msgstr "" diff --git a/locale/en/book/admin/modules.pot b/locale/en/book/admin/modules.pot new file mode 100644 index 0000000000..1768dc2fe8 --- /dev/null +++ b/locale/en/book/admin/modules.pot @@ -0,0 +1,254 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/book/admin/modules.rst:4 +msgid "Managing modules" +msgstr "" + +#: ../../doc/book/admin/modules.rst:6 +msgid "This section covers the installation and reloading of Tarantool modules. To learn about writing your own module and contributing it, check the :ref:`Contributing a module ` section." +msgstr "" + +#: ../../doc/book/admin/modules.rst:13 +msgid "Installing a module" +msgstr "" + +#: ../../doc/book/admin/modules.rst:15 +msgid "Modules in Lua and C that come from Tarantool developers and community contributors are available in the following locations:" +msgstr "" + +#: ../../doc/book/admin/modules.rst:18 +msgid "Tarantool modules repository (see :ref:`below `)" +msgstr "" + +#: ../../doc/book/admin/modules.rst:19 +msgid "Tarantool deb/rpm repositories (see :ref:`below `)" +msgstr "" + +#: ../../doc/book/admin/modules.rst:24 +msgid "Installing a module from a repository" +msgstr "" + +#: ../../doc/book/admin/modules.rst:26 +msgid "See `README in tarantool/rocks repository `_ for detailed instructions." +msgstr "" + +#: ../../doc/book/admin/modules.rst:33 +msgid "Installing a module from deb/rpm" +msgstr "" + +#: ../../doc/book/admin/modules.rst:35 +msgid "Follow these steps:" +msgstr "" + +#: ../../doc/book/admin/modules.rst:37 +msgid "Install Tarantool as recommended on the `download page `_." +msgstr "" + +#: ../../doc/book/admin/modules.rst:40 +msgid "Install the module you need. Look up the module's name on `Tarantool rocks page `_ and put the prefix \"tarantool-\" before the module name to avoid ambiguity:" +msgstr "" + +#: ../../doc/book/admin/modules.rst:44 +msgid "$ # for Ubuntu/Debian:\n" +"$ sudo apt-get install tarantool-\n" +"\n" +"$ # for RHEL/CentOS/Amazon:\n" +"$ sudo yum install tarantool-" +msgstr "" + +#: ../../doc/book/admin/modules.rst:52 +msgid "For example, to install the module `vshard `_ on Ubuntu, say:" +msgstr "" + +#: ../../doc/book/admin/modules.rst:55 +msgid "$ sudo apt-get install tarantool-vshard" +msgstr "" + +#: ../../doc/book/admin/modules.rst:59 +msgid "Once these steps are complete, you can:" +msgstr "" + +#: ../../doc/book/admin/modules.rst:61 +msgid "load any module with" +msgstr "" + +#: ../../doc/book/admin/modules.rst:63 +msgid "tarantool> name = require('module-name')" +msgstr "" + +#: ../../doc/book/admin/modules.rst:67 +msgid "for example:" +msgstr "" + +#: ../../doc/book/admin/modules.rst:69 +msgid "tarantool> vshard = require('vshard')" +msgstr "" + +#: ../../doc/book/admin/modules.rst:73 +msgid "search locally for installed modules using ``package.path`` (Lua) or ``package.cpath`` (C):" +msgstr "" + +#: ../../doc/book/admin/modules.rst:76 +msgid "tarantool> package.path\n" +"---\n" +"- ./?.lua;./?/init.lua; /usr/local/share/tarantool/?.lua;/usr/local/share/\n" +"tarantool/?/init.lua;/usr/share/tarantool/?.lua;/usr/share/tarantool/?/ini\n" +"t.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/\n" +"usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua;\n" +"...\n" +"\n" +"tarantool> package.cpath\n" +"---\n" +"- ./?.so;/usr/local/lib/x86_64-linux-gnu/tarantool/?.so;/usr/lib/x86_64-li\n" +"nux-gnu/tarantool/?.so;/usr/local/lib/tarantool/?.so;/usr/local/lib/x86_64\n" +"-linux-gnu/lua/5.1/?.so;/usr/lib/x86_64-linux-gnu/lua/5.1/?.so;/usr/local/\n" +"lib/lua/5.1/?.so;\n" +"..." +msgstr "" + +#: ../../doc/book/admin/modules.rst:96 +msgid "Question-marks stand for the module name that was specified earlier when saying ``require('module-name')``." +msgstr "" + +#: ../../doc/book/admin/modules.rst:102 +msgid "Reloading a module" +msgstr "" + +#: ../../doc/book/admin/modules.rst:104 +msgid "You can reload any Tarantool application or module with zero downtime." +msgstr "" + +#: ../../doc/book/admin/modules.rst:109 +msgid "Reloading a module in Lua" +msgstr "" + +#: ../../doc/book/admin/modules.rst:111 +msgid "Here's an example that illustrates the most typical case -- \"update and reload\"." +msgstr "" + +#: ../../doc/book/admin/modules.rst:115 +msgid "In this example, we use recommended :ref:`administration practices ` based on :ref:`instance files ` and :ref:`tt ` utility." +msgstr "" + +#: ../../doc/book/admin/modules.rst:119 +msgid "Update the application file." +msgstr "" + +#: ../../doc/book/admin/modules.rst:121 +msgid "For example, a module in ``/usr/share/tarantool/app.lua``:" +msgstr "" + +#: ../../doc/book/admin/modules.rst:123 +msgid "local function start()\n" +" -- initial version\n" +" box.once(\"myapp:v1.0\", function()\n" +" box.schema.space.create(\"somedata\")\n" +" box.space.somedata:create_index(\"primary\")\n" +" ...\n" +" end)\n" +"\n" +" -- migration code from 1.0 to 1.1\n" +" box.once(\"myapp:v1.1\", function()\n" +" box.space.somedata.index.primary:alter(...)\n" +" ...\n" +" end)\n" +"\n" +" -- migration code from 1.1 to 1.2\n" +" box.once(\"myapp:v1.2\", function()\n" +" box.space.somedata.index.primary:alter(...)\n" +" box.space.somedata:insert(...)\n" +" ...\n" +" end)\n" +"end\n" +"\n" +"-- start some background fibers if you need\n" +"\n" +"local function stop()\n" +" -- stop all background fibers and clean up resources\n" +"end\n" +"\n" +"local function api_for_call(xxx)\n" +" -- do some business\n" +"end\n" +"\n" +"return {\n" +" start = start,\n" +" stop = stop,\n" +" api_for_call = api_for_call\n" +"}" +msgstr "" + +#: ../../doc/book/admin/modules.rst:163 +msgid "Update the :ref:`instance file `." +msgstr "" + +#: ../../doc/book/admin/modules.rst:165 +msgid "For example, ``/etc/tarantool/instances.enabled/my_app.lua``:" +msgstr "" + +#: ../../doc/book/admin/modules.rst:167 +msgid "#!/usr/bin/env tarantool\n" +"--\n" +"-- hot code reload example\n" +"--\n" +"\n" +"box.cfg({listen = 3302})\n" +"\n" +"-- ATTENTION: unload it all properly!\n" +"local app = package.loaded['app']\n" +"if app ~= nil then\n" +" -- stop the old application version\n" +" app.stop()\n" +" -- unload the application\n" +" package.loaded['app'] = nil\n" +" -- unload all dependencies\n" +" package.loaded['somedep'] = nil\n" +"end\n" +"\n" +"-- load the application\n" +"log.info('require app')\n" +"app = require('app')\n" +"\n" +"-- start the application\n" +"app.start({some app options controlled by sysadmins})" +msgstr "" + +#: ../../doc/book/admin/modules.rst:194 +msgid "The important thing here is to properly unload the application and its dependencies." +msgstr "" + +#: ../../doc/book/admin/modules.rst:197 +msgid "Manually reload the application file." +msgstr "" + +#: ../../doc/book/admin/modules.rst:199 +msgid "For example, using ``tt``:" +msgstr "" + +#: ../../doc/book/admin/modules.rst:201 +msgid "$ tt connect my_app -f /etc/tarantool/instances.enabled/my_app.lua" +msgstr "" + +#: ../../doc/book/admin/modules.rst:208 +msgid "Reloading a module in C" +msgstr "" + +#: ../../doc/book/admin/modules.rst:210 +msgid "After you compiled a new version of a C module (``*.so`` shared library), call :doc:`box.schema.func.reload('module-name') ` from your Lua script to reload the module." +msgstr "" diff --git a/locale/en/book/admin/os_notes.pot b/locale/en/book/admin/os_notes.pot new file mode 100644 index 0000000000..77a64c9d8f --- /dev/null +++ b/locale/en/book/admin/os_notes.pot @@ -0,0 +1,68 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/book/admin/os_notes.rst:5 +msgid "Notes for operating systems" +msgstr "" + +#: ../../doc/book/admin/os_notes.rst:10 +msgid "macOS" +msgstr "" + +#: ../../doc/book/admin/os_notes.rst:12 +msgid "On macOS, no native system tools for administering Tarantool are supported. The recommended way to administer Tarantool instances is using :ref:`tt CLI `." +msgstr "" + +#: ../../doc/book/admin/os_notes.rst:18 +msgid "Gentoo Linux" +msgstr "" + +#: ../../doc/book/admin/os_notes.rst:20 +msgid "The section below is about a dev-db/tarantool package installed from the official layman overlay (named ``tarantool``)." +msgstr "" + +#: ../../doc/book/admin/os_notes.rst:23 +msgid "The default instance directory is ``/etc/tarantool/instances.available``, can be redefined in ``/etc/default/tarantool``." +msgstr "" + +#: ../../doc/book/admin/os_notes.rst:26 +msgid "Tarantool instances can be managed (start/stop/reload/status/...) using OpenRC. Consider the example how to create an OpenRC-managed instance:" +msgstr "" + +#: ../../doc/book/admin/os_notes.rst:29 +msgid "$ cd /etc/init.d\n" +"$ ln -s tarantool your_service_name\n" +"$ ln -s /usr/share/tarantool/your_service_name.lua /etc/tarantool/instances.available/your_service_name.lua" +msgstr "" + +#: ../../doc/book/admin/os_notes.rst:35 +msgid "Checking that it works:" +msgstr "" + +#: ../../doc/book/admin/os_notes.rst:37 +msgid "$ /etc/init.d/your_service_name start\n" +"$ tail -f -n 100 /var/log/tarantool/your_service_name.log" +msgstr "" + +#: ../../doc/book/admin/os_notes.rst:46 +msgid "FreeBSD" +msgstr "" + +#: ../../doc/book/admin/os_notes.rst:48 +msgid "To learn about specifics of using the deprecated ``tarantoolctl`` utility on FreeBSD, check its :ref:`documentation `." +msgstr "" diff --git a/locale/en/book/admin/replication/index.pot b/locale/en/book/admin/replication/index.pot new file mode 100644 index 0000000000..078bb59566 --- /dev/null +++ b/locale/en/book/admin/replication/index.pot @@ -0,0 +1,21 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/book/admin/replication/index.rst:2 +msgid "Replication administration" +msgstr "" diff --git a/locale/en/book/admin/replication/repl_monitoring.pot b/locale/en/book/admin/replication/repl_monitoring.pot new file mode 100644 index 0000000000..2517870c24 --- /dev/null +++ b/locale/en/book/admin/replication/repl_monitoring.pot @@ -0,0 +1,98 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/book/admin/replication/repl_monitoring.rst:4 +msgid "Monitoring a replica set" +msgstr "" + +#: ../../doc/book/admin/replication/repl_monitoring.rst:6 +msgid "To learn what instances belong to the replica set and obtain statistics for all these instances, issue a :doc:`/reference/reference_lua/box_info/replication` request:" +msgstr "" + +#: ../../doc/book/admin/replication/repl_monitoring.rst:9 +msgid "tarantool> box.info.replication\n" +"---\n" +" replication:\n" +" 1:\n" +" id: 1\n" +" uuid: b8a7db60-745f-41b3-bf68-5fcce7a1e019\n" +" lsn: 88\n" +" 2:\n" +" id: 2\n" +" uuid: cd3c7da2-a638-4c5d-ae63-e7767c3a6896\n" +" lsn: 31\n" +" upstream:\n" +" status: follow\n" +" idle: 43.187747001648\n" +" peer: replicator@192.168.0.102:3301\n" +" lag: 0\n" +" downstream:\n" +" vclock: {1: 31}\n" +" 3:\n" +" id: 3\n" +" uuid: e38ef895-5804-43b9-81ac-9f2cd872b9c4\n" +" lsn: 54\n" +" upstream:\n" +" status: follow\n" +" idle: 43.187621831894\n" +" peer: replicator@192.168.0.103:3301\n" +" lag: 2\n" +" downstream:\n" +" vclock: {1: 54}\n" +"..." +msgstr "" + +#: ../../doc/book/admin/replication/repl_monitoring.rst:42 +msgid "This report is for a master-master replica set of three instances, each having its own instance id, UUID and log sequence number." +msgstr "" + +#: ../../doc/book/admin/replication/repl_monitoring.rst:48 +msgid "The request was issued at master #1, and the reply includes statistics for the other two masters, given in regard to master #1." +msgstr "" + +#: ../../doc/book/admin/replication/repl_monitoring.rst:51 +msgid "The primary indicators of replication health are:" +msgstr "" + +#: ../../doc/book/admin/replication/repl_monitoring.rst:55 +msgid ":ref:`idle `: the time (in seconds) since the instance received the last event from a master." +msgstr "" + +#: ../../doc/book/admin/replication/repl_monitoring.rst:58 +msgid "If the master has no updates to send to the replicas, it sends heartbeat messages every :ref:`replication_timeout ` seconds. The master is programmed to disconnect if it does not see acknowledgments of the heartbeat messages within ``replication_timeout`` * 4 seconds." +msgstr "" + +#: ../../doc/book/admin/replication/repl_monitoring.rst:63 +msgid "Therefore, in a healthy replication setup, ``idle`` should never exceed ``replication_timeout``: if it does, either the replication is lagging seriously behind, because the master is running ahead of the replica, or the network link between the instances is down." +msgstr "" + +#: ../../doc/book/admin/replication/repl_monitoring.rst:68 +msgid ":ref:`lag `: the time difference between the local time at the instance, recorded when the event was received, and the local time at another master recorded when the event was written to the :ref:`write ahead log ` on that master." +msgstr "" + +#: ../../doc/book/admin/replication/repl_monitoring.rst:73 +msgid "Since the ``lag`` calculation uses the operating system clocks from two different machines, do not be surprised if it’s negative: a time drift may lead to the remote master clock being consistently behind the local instance's clock." +msgstr "" + +#: ../../doc/book/admin/replication/repl_monitoring.rst:77 +msgid "For multi-master configurations, ``lag`` is the maximal lag." +msgstr "" + +#: ../../doc/book/admin/replication/repl_monitoring.rst:79 +msgid "For better understanding, see the following diagram illustrating the ``upstream`` and ``downstream`` connections within the replica set of three instances:" +msgstr "" diff --git a/locale/en/book/admin/replication/repl_problem_solving.pot b/locale/en/book/admin/replication/repl_problem_solving.pot new file mode 100644 index 0000000000..128085369e --- /dev/null +++ b/locale/en/book/admin/replication/repl_problem_solving.pot @@ -0,0 +1,278 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:5 +msgid "Resolving replication conflicts" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:9 +msgid "Solving problems with master-master replication" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:11 +msgid "Tarantool guarantees that every update is applied only once on every replica. However, due to the asynchronous nature of replication, the order of updates is not guaranteed. We now analyze this problem with more details, provide examples of replication going out of sync, and suggest solutions." +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:18 +msgid "Replacing the same primary key" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:20 +msgid "**Case 1:** You have two instances of Tarantool. For example, you try to make a ``replace`` operation with the same primary key on both instances in the same time. This will cause a conflict over which tuple to save and which one to discard." +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:24 +msgid "Tarantool :ref:`trigger functions ` can help here to implement the rules of conflict resolution on some condition. For example, if you have a timestamp, you can declare saving the tuple with the bigger one." +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:28 +msgid "First, you need a :ref:`before_replace() ` trigger on the space which may have conflicts. In this trigger you can compare the old and new replica records and choose which one to use (or skip the update entirely, or merge two records together)." +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:33 +msgid "Then you need to set the trigger at the right time, before the space starts to receive any updates. The way you usually set the ``before_replace`` trigger is right when the space is created, so you need a trigger to set another trigger on the system space ``_space``, to capture the moment when your space is created and set the trigger there. This can be an :ref:`on_replace() ` trigger." +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:40 +msgid "The difference between ``before_replace`` and ``on_replace`` is that ``on_replace`` is called after a row is inserted into the space, and ``before_replace`` is called before that." +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:44 +msgid "To set a ``_space:on_replace()`` trigger correctly, you also need the right timing. The best timing to use it is when ``_space`` is just created, which is the :ref:`box.ctl.on_schema_init() ` trigger." +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:48 +msgid "You will also need to utilize ``box.on_commit`` to get access to the space being created. The resulting snippet would be the following:" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:51 +msgid "local my_space_name = 'my_space'\n" +"local my_trigger = function(old, new) ... end -- your function resolving a conflict\n" +"box.ctl.on_schema_init(function()\n" +" box.space._space:on_replace(function(old_space, new_space)\n" +" if not old_space and new_space and new_space.name == my_space_name then\n" +" box.on_commit(function()\n" +" box.space[my_space_name]:before_replace(my_trigger)\n" +" end\n" +" end\n" +" end)\n" +"end)" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:69 +msgid "Preventing duplicate insert" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:73 +msgid "**Case 2:** In a replica set of two masters, suppose master #1 tries to ``insert`` a tuple with the same unique key:" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:76 +msgid "tarantool> box.space.tester:insert{1, 'data'}" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:80 +msgid "This would cause an error saying ``Duplicate key exists in unique index 'primary' in space 'tester'`` and the replication would be stopped. (This is the behavior when the :ref:`replication_skip_conflict ` configuration parameter has its default recommended value, ``false``.)" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:86 +msgid "$ # error messages from master #1\n" +"2017-06-26 21:17:03.233 [30444] main/104/applier/rep_user@100.96.166.1 I> can't read row\n" +"2017-06-26 21:17:03.233 [30444] main/104/applier/rep_user@100.96.166.1 memtx_hash.cc:226 E> ER_TUPLE_FOUND:\n" +"Duplicate key exists in unique index 'primary' in space 'tester'\n" +"2017-06-26 21:17:03.233 [30444] relay/[::ffff:100.96.166.178]/101/main I> the replica has closed its socket, exiting\n" +"2017-06-26 21:17:03.233 [30444] relay/[::ffff:100.96.166.178]/101/main C> exiting the relay loop\n" +"\n" +"$ # error messages from master #2\n" +"2017-06-26 21:17:03.233 [30445] main/104/applier/rep_user@100.96.166.1 I> can't read row\n" +"2017-06-26 21:17:03.233 [30445] main/104/applier/rep_user@100.96.166.1 memtx_hash.cc:226 E> ER_TUPLE_FOUND:\n" +"Duplicate key exists in unique index 'primary' in space 'tester'\n" +"2017-06-26 21:17:03.234 [30445] relay/[::ffff:100.96.166.178]/101/main I> the replica has closed its socket, exiting\n" +"2017-06-26 21:17:03.234 [30445] relay/[::ffff:100.96.166.178]/101/main C> exiting the relay loop" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:102 +msgid "If we check replication statuses with ``box.info``, we will see that replication at master #1 is stopped (``1.upstream.status = stopped``). Additionally, no data is replicated from that master (section ``1.downstream`` is missing in the report), because the downstream has encountered the same error:" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:107 +msgid "# replication statuses (report from master #3)\n" +"tarantool> box.info\n" +"---\n" +"- version: 1.7.4-52-g980d30092\n" +" id: 3\n" +" ro: false\n" +" vclock: {1: 9, 2: 1000000, 3: 3}\n" +" uptime: 557\n" +" lsn: 3\n" +" vinyl: []\n" +" cluster:\n" +" uuid: 34d13b1a-f851-45bb-8f57-57489d3b3c8b\n" +" pid: 30445\n" +" status: running\n" +" signature: 1000012\n" +" replication:\n" +" 1:\n" +" id: 1\n" +" uuid: 7ab6dee7-dc0f-4477-af2b-0e63452573cf\n" +" lsn: 9\n" +" upstream:\n" +" peer: replicator@192.168.0.101:3301\n" +" lag: 0.00050592422485352\n" +" status: stopped\n" +" idle: 445.8626639843\n" +" message: Duplicate key exists in unique index 'primary' in space 'tester'\n" +" 2:\n" +" id: 2\n" +" uuid: 9afbe2d9-db84-4d05-9a7b-e0cbbf861e28\n" +" lsn: 1000000\n" +" upstream:\n" +" status: follow\n" +" idle: 201.99915885925\n" +" peer: replicator@192.168.0.102:3301\n" +" lag: 0.0015020370483398\n" +" downstream:\n" +" vclock: {1: 8, 2: 1000000, 3: 3}\n" +" 3:\n" +" id: 3\n" +" uuid: e826a667-eed7-48d5-a290-64299b159571\n" +" lsn: 3\n" +" uuid: e826a667-eed7-48d5-a290-64299b159571\n" +"..." +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:153 +msgid "When replication is later manually resumed:" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:155 +msgid "# resuming stopped replication (at all masters)\n" +"tarantool> original_value = box.cfg.replication\n" +"tarantool> box.cfg{replication={}}\n" +"tarantool> box.cfg{replication=original_value}" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:162 +msgid "... the faulty row in the write-ahead-log files is skipped." +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:166 +msgid "**Solution #1: replication runs out of sync**" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:168 +msgid "In a master-master cluster of two instances, suppose we make the following operation:" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:171 +msgid "tarantool> box.space.tester:upsert({1}, {{'=', 2, box.info.uuid}})" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:175 +msgid "When this operation is applied on both instances in the replica set:" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:177 +msgid "# at master #1\n" +"tarantool> box.space.tester:upsert({1}, {{'=', 2, box.info.uuid}})\n" +"# at master #2\n" +"tarantool> box.space.tester:upsert({1}, {{'=', 2, box.info.uuid}})" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:184 +msgid "... we can have the following results, depending on the order of execution:" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:186 +msgid "each master’s row contains the UUID from master #1," +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:187 +msgid "each master’s row contains the UUID from master #2," +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:188 +msgid "master #1 has the UUID of master #2, and vice versa." +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:192 +msgid "**Solution #2: commutative changes**" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:194 +msgid "The cases described in the previous paragraphs represent examples of **non-commutative** operations, i.e. operations whose result depends on the execution order. On the contrary, for **commutative operations**, the execution order does not matter." +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:199 +msgid "Consider for example the following command:" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:201 +msgid "tarantool> box.space.tester:upsert{{1, 0}, {{'+', 2, 1)}" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:205 +msgid "This operation is commutative: we get the same result no matter in which order the update is applied on the other masters." +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:208 +msgid "**Solution #3: trigger usage**" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:210 +msgid "The logic and the snippet setting a trigger will be the same here as in case 1. But the trigger function will differ:" +msgstr "" + +#: ../../doc/book/admin/replication/repl_problem_solving.rst:213 +msgid "local my_space_name = 'test'\n" +"local my_trigger = function(old, new, sp, op)\n" +" -- op: ‘INSERT’, ‘DELETE’, ‘UPDATE’, or ‘REPLACE’\n" +" if new == nil then\n" +" print(\"No new during \"..op, old)\n" +" return -- deletes are ok\n" +" end\n" +" if old == nil then\n" +" print(\"Insert new, no old\", new)\n" +" return new -- insert without old value: ok\n" +" end\n" +" print(op..\" duplicate\", old, new)\n" +" if op == 'INSERT' then\n" +" if new[2] > old[2] then\n" +" -- Creating new tuple will change op to ‘REPLACE’\n" +" return box.tuple.new(new)\n" +" end\n" +" return old\n" +" end\n" +" if new[2] > old[2] then\n" +" return new\n" +" else\n" +" return old\n" +" end\n" +" return\n" +"end\n" +"\n" +"box.ctl.on_schema_init(function()\n" +" box.space._space:on_replace(function(old_space, new_space)\n" +" if not old_space and new_space and new_space.name == my_space_name then\n" +" box.on_commit(function()\n" +" box.space[my_space_name]:before_replace(my_trigger)\n" +" end)\n" +" end\n" +" end)\n" +"end)" +msgstr "" diff --git a/locale/en/book/admin/replication/repl_recover.pot b/locale/en/book/admin/replication/repl_recover.pot new file mode 100644 index 0000000000..ef89da0a31 --- /dev/null +++ b/locale/en/book/admin/replication/repl_recover.pot @@ -0,0 +1,133 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/book/admin/replication/repl_recover.rst:5 +msgid "Recovering from a degraded state" +msgstr "" + +#: ../../doc/book/admin/replication/repl_recover.rst:7 +msgid "\"Degraded state\" is a situation when the master becomes unavailable -- due to hardware or network failure, or due to a programming bug." +msgstr "" + +#: ../../doc/book/admin/replication/repl_recover.rst:13 +msgid "In a master-replica set, if a master disappears, error messages appear on the replicas stating that the connection is lost:" +msgstr "" + +#: ../../doc/book/admin/replication/repl_recover.rst:16 +msgid "$ # messages from a replica's log\n" +"2017-06-14 16:23:10.993 [19153] main/105/applier/replicator@192.168.0. I> can't read row\n" +"2017-06-14 16:23:10.993 [19153] main/105/applier/replicator@192.168.0. coio.cc:349 !> SystemError\n" +"unexpected EOF when reading from socket, called on fd 17, aka 192.168.0.101:57815,\n" +"peer of 192.168.0.101:3301: Broken pipe\n" +"2017-06-14 16:23:10.993 [19153] main/105/applier/replicator@192.168.0. I> will retry every 1 second\n" +"2017-06-14 16:23:10.993 [19153] relay/[::ffff:192.168.0.101]:/101/main I> the replica has closed its socket, exiting\n" +"2017-06-14 16:23:10.993 [19153] relay/[::ffff:192.168.0.101]:/101/main C> exiting the relay loop" +msgstr "" + +#: ../../doc/book/admin/replication/repl_recover.rst:27 +msgid "... and the master's status is reported as \"disconnected\":" +msgstr "" + +#: ../../doc/book/admin/replication/repl_recover.rst:29 +msgid "# report from replica #1\n" +"tarantool> box.info.replication\n" +"---\n" +"- 1:\n" +" id: 1\n" +" uuid: 70e8e9dc-e38d-4046-99e5-d25419267229\n" +" lsn: 542\n" +" upstream:\n" +" peer: replicator@192.168.0.101:3301\n" +" lag: 0.00026607513427734\n" +" status: disconnected\n" +" idle: 182.36929893494\n" +" message: connect, called on fd 13, aka 192.168.0.101:58244\n" +" 2:\n" +" id: 2\n" +" uuid: fb252ac7-5c34-4459-84d0-54d248b8c87e\n" +" lsn: 0\n" +" 3:\n" +" id: 3\n" +" uuid: fd7681d8-255f-4237-b8bb-c4fb9d99024d\n" +" lsn: 0\n" +" downstream:\n" +" vclock: {1: 542}\n" +"..." +msgstr "" + +#: ../../doc/book/admin/replication/repl_recover.rst:56 +msgid "# report from replica #2\n" +"tarantool> box.info.replication\n" +"---\n" +"- 1:\n" +" id: 1\n" +" uuid: 70e8e9dc-e38d-4046-99e5-d25419267229\n" +" lsn: 542\n" +" upstream:\n" +" peer: replicator@192.168.0.101:3301\n" +" lag: 0.00027203559875488\n" +" status: disconnected\n" +" idle: 186.76988101006\n" +" message: connect, called on fd 13, aka 192.168.0.101:58253\n" +" 2:\n" +" id: 2\n" +" uuid: fb252ac7-5c34-4459-84d0-54d248b8c87e\n" +" lsn: 0\n" +" upstream:\n" +" status: follow\n" +" idle: 186.76960110664\n" +" peer: replicator@192.168.0.102:3301\n" +" lag: 0.00020599365234375\n" +" 3:\n" +" id: 3\n" +" uuid: fd7681d8-255f-4237-b8bb-c4fb9d99024d\n" +" lsn: 0\n" +"..." +msgstr "" + +#: ../../doc/book/admin/replication/repl_recover.rst:86 +msgid "To declare that one of the replicas must now take over as a new master:" +msgstr "" + +#: ../../doc/book/admin/replication/repl_recover.rst:88 +msgid "Make sure that the old master is gone for good:" +msgstr "" + +#: ../../doc/book/admin/replication/repl_recover.rst:90 +msgid "change network routing rules to avoid any more packets being delivered to the master, or" +msgstr "" + +#: ../../doc/book/admin/replication/repl_recover.rst:92 +msgid "shut down the master instance, if you have access to the machine, or" +msgstr "" + +#: ../../doc/book/admin/replication/repl_recover.rst:93 +msgid "power off the container or the machine." +msgstr "" + +#: ../../doc/book/admin/replication/repl_recover.rst:95 +msgid "Say ``box.cfg{read_only=false, listen=URI}`` on the replica, and ``box.cfg{replication=URI}`` on the other replicas in the set." +msgstr "" + +#: ../../doc/book/admin/replication/repl_recover.rst:100 +msgid "If there are updates on the old master that were not propagated before the old master went down, :ref:`re-apply them manually ` to the new master using ``tt cat`` and ``tt play`` commands." +msgstr "" + +#: ../../doc/book/admin/replication/repl_recover.rst:105 +msgid "There is no automatic way for a replica to detect that the master is gone forever, since sources of failure and replication environments vary significantly. So the detection of degraded state requires an external observer." +msgstr "" diff --git a/locale/en/book/admin/replication/repl_reseed.pot b/locale/en/book/admin/replication/repl_reseed.pot new file mode 100644 index 0000000000..cadb9c4cda --- /dev/null +++ b/locale/en/book/admin/replication/repl_reseed.pot @@ -0,0 +1,53 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/book/admin/replication/repl_reseed.rst:5 +msgid "Reseeding a replica" +msgstr "" + +#: ../../doc/book/admin/replication/repl_reseed.rst:7 +msgid "If any of a replica's .xlog/.snap/.run files are corrupted or deleted, you can \"re-seed\" the replica:" +msgstr "" + +#: ../../doc/book/admin/replication/repl_reseed.rst:10 +msgid "Stop the replica and destroy all local database files (the ones with extensions .xlog/.snap/.run/.inprogress)." +msgstr "" + +#: ../../doc/book/admin/replication/repl_reseed.rst:13 +msgid "Delete the replica's record from the following locations:" +msgstr "" + +#: ../../doc/book/admin/replication/repl_reseed.rst:15 +msgid "the ``replication`` parameter at all running instances in the replica set." +msgstr "" + +#: ../../doc/book/admin/replication/repl_reseed.rst:16 +msgid "the ``box.space._cluster`` tuple on the master instance." +msgstr "" + +#: ../../doc/book/admin/replication/repl_reseed.rst:18 +msgid "See section :ref:`Removing instances ` for details." +msgstr "" + +#: ../../doc/book/admin/replication/repl_reseed.rst:21 +msgid "Restart the replica with the same instance file to contact the master again. The replica will then catch up with the master by retrieving all the master’s tuples." +msgstr "" + +#: ../../doc/book/admin/replication/repl_reseed.rst:27 +msgid "Remember that this procedure works only if the master’s WAL files are present." +msgstr "" diff --git a/locale/en/book/admin/security.pot b/locale/en/book/admin/security.pot new file mode 100644 index 0000000000..df75497222 --- /dev/null +++ b/locale/en/book/admin/security.pot @@ -0,0 +1,114 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/book/admin/security.rst:5 +msgid "Security" +msgstr "" + +#: ../../doc/book/admin/security.rst:7 +msgid "Tarantool allows for two types of connections:" +msgstr "" + +#: ../../doc/book/admin/security.rst:9 +msgid "With :ref:`console.listen() ` function from ``console`` module, you can set up a port which can be used to open an administrative console to the server. This is for administrators to connect to a running instance and make requests. ``tt`` invokes ``console.listen()`` to create a control socket for each started instance." +msgstr "" + +#: ../../doc/book/admin/security.rst:15 +msgid "With :ref:`box.cfg{listen=...} ` parameter from ``box`` module, you can set up a binary port for connections which read and write to the database or invoke stored procedures." +msgstr "" + +#: ../../doc/book/admin/security.rst:19 +msgid "When you connect to an admin console:" +msgstr "" + +#: ../../doc/book/admin/security.rst:21 +msgid "The client-server protocol is plain text." +msgstr "" + +#: ../../doc/book/admin/security.rst:22 +msgid "No password is necessary." +msgstr "" + +#: ../../doc/book/admin/security.rst:23 +msgid "The user is automatically 'admin'." +msgstr "" + +#: ../../doc/book/admin/security.rst:24 +msgid "Each command is fed directly to the built-in Lua interpreter." +msgstr "" + +#: ../../doc/book/admin/security.rst:26 +msgid "Therefore you must set up ports for the admin console very cautiously. If it is a TCP port, it should only be opened for a specific IP. Ideally, it should not be a TCP port at all, it should be a Unix domain socket, so that access to the server machine is required. Thus a typical port setup for admin console is:" +msgstr "" + +#: ../../doc/book/admin/security.rst:31 +msgid "console.listen('/var/lib/tarantool/socket_name.sock')" +msgstr "" + +#: ../../doc/book/admin/security.rst:35 +msgid "and a typical connection :ref:`URI ` is:" +msgstr "" + +#: ../../doc/book/admin/security.rst:37 +msgid "/var/lib/tarantool/socket_name.sock" +msgstr "" + +#: ../../doc/book/admin/security.rst:41 +msgid "if the listener has the privilege to write on ``/var/lib/tarantool`` and the connector has the privilege to read on ``/var/lib/tarantool``. Alternatively, to connect to an admin console of an instance started with ``tt``, use :ref:`tt connect `." +msgstr "" + +#: ../../doc/book/admin/security.rst:46 +msgid "To find out whether a TCP port is a port for admin console, use ``telnet``. For example:" +msgstr "" + +#: ../../doc/book/admin/security.rst:49 +msgid "$ telnet 0 3303\n" +"Trying 0.0.0.0...\n" +"Connected to 0.\n" +"Escape character is '^]'.\n" +"Tarantool 2.1.0 (Lua console)\n" +"type 'help' for interactive help" +msgstr "" + +#: ../../doc/book/admin/security.rst:58 +msgid "In this example, the response does not include the word \"binary\" and does include the words \"Lua console\". Therefore it is clear that this is a successful connection to a port for admin console, and you can now enter admin requests on this terminal." +msgstr "" + +#: ../../doc/book/admin/security.rst:63 +msgid "When you connect to a binary port:" +msgstr "" + +#: ../../doc/book/admin/security.rst:65 +msgid "The client-server protocol is :ref:`binary `." +msgstr "" + +#: ../../doc/book/admin/security.rst:66 +msgid "The user is automatically ':ref:`guest `'." +msgstr "" + +#: ../../doc/book/admin/security.rst:67 +msgid "To change the user, it’s necessary to authenticate." +msgstr "" + +#: ../../doc/book/admin/security.rst:69 +msgid "For ease of use, ``tt connect`` command automatically detects the type of connection during handshake and uses :ref:`EVAL ` binary protocol command when it’s necessary to execute Lua commands over a binary connection. To execute EVAL, the authenticated user must have global \"EXECUTE\" privilege." +msgstr "" + +#: ../../doc/book/admin/security.rst:75 +msgid "Therefore, when ``ssh`` access to the machine is not available, creating a Tarantool user with global \"EXECUTE\" privilege and non-empty password can be used to provide a system administrator **remote** access to an instance." +msgstr "" diff --git a/locale/en/book/admin/server_introspection.pot b/locale/en/book/admin/server_introspection.pot new file mode 100644 index 0000000000..b3ecbfa553 --- /dev/null +++ b/locale/en/book/admin/server_introspection.pot @@ -0,0 +1,765 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/book/admin/server_introspection.rst:4 +msgid "Server introspection" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:9 +msgid "Using Tarantool as a client" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:11 +msgid "Tarantool enters the interactive mode if:" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:13 +msgid "you start Tarantool without an :ref:`instance file `, or" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:16 +msgid "the instance file contains :ref:`console.start() `." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:18 +msgid "Tarantool displays a prompt (e.g. \"tarantool>\") and you can enter requests. When used this way, Tarantool can be a client for a remote server. See basic examples in :ref:`Getting started `." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:22 +msgid "The interactive mode is used in the ``tt`` utility's :ref:`connect ` command." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:27 +msgid "Executing code on an instance" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:29 +msgid "You can attach to an instance's :ref:`admin console ` and execute some Lua code using ``tt``:" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:32 +msgid "$ # for local instances:\n" +"$ tt connect my_app\n" +" • Connecting to the instance...\n" +" • Connected to /var/run/tarantool/example.control\n" +"\n" +"/var/run/tarantool/my_app.control> 1 + 1\n" +"---\n" +"- 2\n" +"...\n" +"/var/run/tarantool/my_app.control>\n" +"\n" +"$ # for local and remote instances:\n" +"$ tt connect username:password@127.0.0.1:3306" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:48 +msgid "You can also use ``tt`` to execute Lua code on an instance without attaching to its admin console. For example:" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:51 +msgid "$ # executing commands directly from the command line\n" +"$ | tt connect my_app -f -\n" +"<...>\n" +"\n" +"$ # - OR -\n" +"\n" +"$ # executing commands from a script file\n" +"$ tt connect my_app -f script.lua\n" +"<...>" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:65 +msgid "Alternatively, you can use the :ref:`console ` module or the :ref:`net.box ` module from a Tarantool server. Also, you can write your client programs with any of the :ref:`connectors `. However, most of the examples in this manual illustrate usage with either ``tt connect`` or :ref:`using the Tarantool server as a client `." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:75 +msgid "Health checks" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:77 +msgid "To check the instance status, run:" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:79 +msgid "$ tt status my_app\n" +"INSTANCE STATUS PID\n" +"my_app RUNNING 67172\n" +"\n" +"$ # - OR -\n" +"\n" +"$ systemctl status tarantool@my_app" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:89 +msgid "To check the boot log, on systems with ``systemd``, run:" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:91 +msgid "$ journalctl -u tarantool@my_app -n 5" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:95 +msgid "For more specific checks, use the reports provided by functions in the following submodules:" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:97 +msgid ":doc:`/reference/reference_lua/box_cfg` (check and specify all configuration parameters for the Tarantool server)" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:100 +msgid ":doc:`/reference/reference_lua/box_slab` (monitor the total use and fragmentation of memory allocated for storing data in Tarantool)" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:103 +msgid ":doc:`/reference/reference_lua/box_info` (introspect Tarantool server variables, primarily those related to replication)" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:106 +msgid ":doc:`/reference/reference_lua/box_stat` (introspect Tarantool request and network statistics)" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:109 +msgid "Finally, there is the `metrics `_ library, which enables collecting metrics (such as memory usage or number of requests) from Tarantool applications and expose them via various protocols, including Prometheus. Check :ref:`Monitoring ` for more details." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:114 +#: ../../doc/book/admin/server_introspection.rst:662 +msgid "**Example**" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:116 +msgid "A very popular administrator request is :doc:`/reference/reference_lua/box_slab/slab_info`, which displays detailed memory usage statistics for a Tarantool instance." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:120 +msgid "tarantool> box.slab.info()\n" +"---\n" +"- items_size: 228128\n" +" items_used_ratio: 1.8%\n" +" quota_size: 1073741824\n" +" quota_used_ratio: 0.8%\n" +" arena_used_ratio: 43.2%\n" +" items_used: 4208\n" +" quota_used: 8388608\n" +" arena_size: 2325176\n" +" arena_used: 1003632\n" +"..." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:135 +msgid "Tarantool takes memory from the operating system, for example when a user does many insertions. You can see how much it has taken by saying (on Linux):" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:139 +msgid "ps -eo args,%mem | grep \"tarantool\"" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:143 +msgid "Tarantool almost never releases this memory, even if the user deletes everything that was inserted, or reduces fragmentation by calling the Lua garbage collector via the `collectgarbage function `_." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:148 +msgid "Ordinarily this does not affect performance. But, to force Tarantool to release memory, you can call :doc:`box.snapshot() `, stop the server instance, and restart it." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:156 +msgid "Inspect traffic" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:158 +msgid "Inspecting binary traffic is a boring task. We offer a `Wireshark plugin `_ to simplify the analysis of Tarantool's traffic." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:162 +msgid "To enable the plugin, follow the steps below." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:164 +msgid "Clone the tarantool-dissector repository:" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:166 +msgid "git clone https://github.com/tarantool/tarantool-dissector.git" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:170 +msgid "Copy or symlink the plugin files into the Wireshark plugin directory:" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:172 +msgid "mkdir -p ~/.local/lib/wireshark/plugins\n" +"cd ~/.local/lib/wireshark/plugins\n" +"ln -s /path/to/tarantool-dissector/MessagePack.lua ./\n" +"ln -s /path/to/tarantool-dissector/tarantool.dissector.lua ./" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:179 +msgid "(For the location of the plugin directory on macOS and Windows, please refer to the `Plugin folders `_ chapter in the Wireshark documentation.)" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:183 +msgid "Run the Wireshark GUI and ensure that the plugins are loaded:" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:185 +msgid "Open :guilabel:`Help` > :guilabel:`About Wireshark` > :guilabel:`Plugins`." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:186 +msgid "Find ``MessagePack.lua`` and ``tarantool.dissector.lua`` in the list." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:188 +msgid "Now you can inspect incoming and outgoing Tarantool packets with user-friendly annotations." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:191 +msgid "Visit the project page for details: `https://github.com/tarantool/tarantool-dissector `_." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:197 +msgid "Profiling performance issues" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:199 +msgid "Tarantool can at times work slower than usual. There can be multiple reasons, such as disk issues, CPU-intensive Lua scripts or misconfiguration. Tarantool’s log may lack details in such cases, so the only indications that something goes wrong are log entries like this: ``W> too long DELETE: 8.546 sec``. Here are tools and techniques that can help you collect Tarantool’s performance profile, which is helpful in troubleshooting slowdowns." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:208 +msgid "Most of these tools -- except ``fiber.info()`` -- are intended for generic GNU/Linux distributions, but not FreeBSD or Mac OS." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:212 +msgid "fiber.info()" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:214 +msgid "The simplest profiling method is to take advantage of Tarantool’s built-in functionality. :ref:`fiber.info() ` returns information about all running fibers with their corresponding C stack traces. You can use this data to see how many fibers are running and which C functions are executed more often than others." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:220 +msgid "First, enter your instance’s interactive administrator console:" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:222 +#: ../../doc/book/admin/server_introspection.rst:500 +msgid "$ tt connect NAME|URI" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:226 +msgid "Once there, load the ``fiber`` module:" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:228 +msgid "tarantool> fiber = require('fiber')" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:232 +msgid "After that you can get the required information with ``fiber.info()``." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:234 +msgid "At this point, your console output should look something like this:" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:236 +msgid "tarantool> fiber = require('fiber')\n" +"---\n" +"...\n" +"tarantool> fiber.info()\n" +"---\n" +"- 360:\n" +" csw: 2098165\n" +" backtrace:\n" +" - '#0 0x4d1b77 in wal_write(journal*, journal_entry*)+487'\n" +" - '#1 0x4bbf68 in txn_commit(txn*)+152'\n" +" - '#2 0x4bd5d8 in process_rw(request*, space*, tuple**)+136'\n" +" - '#3 0x4bed48 in box_process1+104'\n" +" - '#4 0x4d72f8 in lbox_replace+120'\n" +" - '#5 0x50f317 in lj_BC_FUNCC+52'\n" +" fid: 360\n" +" memory:\n" +" total: 61744\n" +" used: 480\n" +" name: main\n" +" 129:\n" +" csw: 113\n" +" backtrace: []\n" +" fid: 129\n" +" memory:\n" +" total: 57648\n" +" used: 0\n" +" name: 'console/unix/:'\n" +"..." +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:267 +msgid "We highly recommend to assign meaningful names to fibers you create so that you can find them in the ``fiber.info()`` list. In the example below, we create a fiber named ``myworker``:" +msgstr "" + +#: ../../doc/book/admin/server_introspection.rst:271 +msgid "tarantool> fiber = require('fiber')\n" +"---\n" +"...\n" +"tarantool> f = fiber.create(function() while true do fiber.sleep(0.5) end end)\n" +"---\n" +"...\n" +"tarantool> f:name('myworker') \n" +"+-------+=============+\n" +"| scale | BCD |\n" +"+-------+=============+" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:53 +msgid "Here ``scale`` is either ``MP_INT`` or ``MP_UINT``. |br| ``scale`` = number of digits after the decimal point" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:56 +msgid "``BCD`` is a sequence of bytes representing decimal digits of the encoded number (each byte has two decimal digits each encoded using 4-bit ``nibbles``), so ``byte >> 4`` is the first digit and ``byte & 0x0f`` is the second digit. The leftmost digit in the array is the most significant. The rightmost digit in the array is the least significant." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:62 +msgid "The first byte of the ``BCD`` array contains the first digit of the number, represented as follows:" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:65 +msgid "| 4 bits | 4 bits |\n" +" = 0x = the 1st digit" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:70 +msgid "(The first ``nibble`` contains 0 if the decimal number has an even number of digits.) The last byte of the ``BCD`` array contains the last digit of the number and the final ``nibble``, represented as follows:" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:74 +msgid "| 4 bits | 4 bits |\n" +" = the last digit = nibble" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:79 +msgid "The final ``nibble`` represents the number's sign:" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:81 +msgid "``0x0a``, ``0x0c``, ``0x0e``, ``0x0f`` stand for plus," +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:82 +msgid "``0x0b`` and ``0x0d`` stand for minus." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:84 +msgid "**Examples**" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:86 +msgid "The decimal ``-12.34`` will be encoded as ``0xd6,0x01,0x02,0x01,0x23,0x4d``:" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:88 +msgid "|MP_EXT (fixext 4) | MP_DECIMAL | scale | 1 | 2,3 | 4 (minus) |\n" +"| 0xd6 | 0x01 | 0x02 | 0x01 | 0x23 | 0x4d |" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:93 +msgid "The decimal 0.000000000000000000000000000000000010 will be encoded as ``0xc7,0x03,0x01,0x24,0x01,0x0c``:" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:96 +msgid "| MP_EXT (ext 8) | length | MP_DECIMAL | scale | 1 | 0 (plus) |\n" +"| 0xc7 | 0x03 | 0x01 | 0x24 | 0x01 | 0x0c |" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:106 +msgid "The UUID type" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:108 +msgid "The MessagePack EXT type ``MP_EXT`` together with the extension type ``MP_UUID`` for values of the UUID type. Since version :doc:`2.4.1 `." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:111 +msgid "``MP_UUID`` type is 2." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:113 +msgid "The `MessagePack specification `_ defines ``d8`` to mean ``fixext`` with size 16, and a UUID's size is always 16. So the UUID MessagePack representation looks like this:" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:117 +msgid "+--------+------------+-----------------+\n" +"| MP_EXT | MP_UUID | UuidValue |\n" +"| = d8 | = 2 | = 16-byte value |\n" +"+--------+------------+-----------------+" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:124 +msgid "The 16-byte value has 2 digits per byte. Typically, it consists of 11 fields, which are encoded as big-endian unsigned integers in the following order:" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:128 +msgid "``time_low`` (4 bytes)" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:129 +msgid "``time_mid`` (2 bytes)" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:130 +msgid "``time_hi_and_version`` (2 bytes)" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:131 +msgid "``clock_seq_hi_and_reserved`` (1 byte)" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:132 +msgid "``clock_seq_low`` (1 byte)" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:133 +msgid "``node[0]``, ..., ``node[5]`` (1 byte each)" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:135 +msgid "Some of the functions in :ref:`Module uuid ` can produce values which are compatible with the UUID data type. For example, after" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:139 +msgid "uuid = require('uuid')\n" +"box.schema.space.create('t')\n" +"box.space.t:create_index('i', {parts={1,'uuid'}})\n" +"box.space.t:insert{uuid.fromstr('f6423bdf-b49e-4913-b361-0740c9702e4b')}\n" +"box.space.t:select()" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:147 +msgid "a peek at the server response packet will show that it contains" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:149 +msgid "d8 02 f6 42 3b df b4 9e 49 13 b3 61 07 40 c9 70 2e 4b" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:157 +msgid "The ERROR type" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:159 +msgid "Since version :doc:`2.4.1 `, responses for errors have extra information following what was described in :ref:`Box protocol -- responses for errors `. This is a \"compatible\" enhancement, because clients that expect old-style server responses should ignore map components that they do not recognize. Notice, however, that there has been a renaming of a constant: formerly ``IPROTO_ERROR`` in :file:`./box/iproto_constants.h` was ``0x31``, now ``IPROTO_ERROR`` is ``0x52`` and ``IPROTO_ERROR_24`` is ``0x31``." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:168 +msgid "``MP_ERROR`` type is 3." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:170 +msgid "++=========================+============================+\n" +"|| | |\n" +"|| 0x31: IPROTO_ERROR_24 | 0x52: IPROTO_ERROR |\n" +"|| MP_INT: MP_STRING | MP_MAP: extra information |\n" +"|| | |\n" +"++=========================+============================+\n" +" MP_MAP" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:180 +msgid "The extra information, most of which is also in :doc:`error object ` fields, is:" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:183 +msgid "``MP_ERROR_TYPE`` (0x00) (MP_STR) Type that implies source, as in :samp:`{error_object}.base_type`, for example \"ClientError\"." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:185 +msgid "``MP_ERROR_FILE`` (0x01) (MP_STR) Source code file where error was caught, as in :samp:`{error_object}.trace`." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:187 +msgid "``MP_ERROR_LINE`` (0x02) (MP_UINT) Line number in source code file, as in :samp:`{error_object}.trace`." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:189 +msgid "``MP_ERROR_MESSAGE`` (0x03) (MP_STR) Text of reason, as in :samp:`{error_object}.message`. The value here will be the same as in the ``IPROTO_ERROR_24`` value." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:192 +msgid "``MP_ERROR_ERRNO`` (0x04) (MP_UINT) Ordinal number of the error, as in :samp:`{error_object}.errno`. Not to be confused with ``MP_ERROR_ERRCODE``." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:195 +msgid "``MP_ERROR_ERRCODE`` (0x05) (MP_UINT) Number of the error as defined in errcode.h, as in :samp:`{error_object}.code`, which can also be retrieved with the C function :ref:`box_error_code() `. The value here will be the same as the lower part of the Response-Code-Indicator value." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:199 +msgid "``MP_ERROR_FIELDS`` (0x06) (MP_MAPs) Additional fields depending on error type. For example, if ``MP_ERROR_TYPE`` is \"AccessDeniedError\", then ``MP_ERROR_FIELDS`` will include \"object_type\", \"object_name\", \"access_type\". This field will be omitted from the response body if there are no additional fields available." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:204 +msgid "Client and connector programmers should ensure that unknown map keys are ignored, and should check for addition of new keys in the Tarantool source code file where error object creation is defined. In version 2.4.1 the name of this source code file is mp_error.cc." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:209 +msgid "For example, in version 2.4.1 or later, if we try to create a duplicate space with |br| ``conn:eval([[box.schema.space.create('_space');]])`` |br| the server response will look like this:" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:213 +msgid "ce 00 00 00 88 MP_UINT = HEADER + BODY SIZE\n" +"83 MP_MAP, size 3 (i.e. 3 items in header)\n" +" 00 Response-Code-Indicator\n" +" ce 00 00 80 0a MP_UINT = hexadecimal 800a\n" +" 01 IPROTO_SYNC\n" +" cf 00 00 00 00 00 00 00 05 MP_UINT = sync value\n" +" 05 IPROTO_SCHEMA_VERSION\n" +" ce 00 00 00 4e MP_UINT = schema version value\n" +"82 MP_MAP, size 2\n" +" 31 IPROTO_ERROR_24\n" +" bd 53 70 61 63 etc. MP_STR = \"Space '_space' already exists\"\n" +" 52 IPROTO_ERROR\n" +" 81 MP_MAP, size 1\n" +" 00 MP_ERROR_STACK\n" +" 91 MP_ARRAY, size 1\n" +" 86 MP_MAP, size 6\n" +" 00 MP_ERROR_TYPE\n" +" ab 43 6c 69 65 6e 74 etc. MP_STR = \"ClientError\"\n" +" 02 MP_ERROR_LINE\n" +" cd MP_UINT = line number\n" +" 01 MP_ERROR_FILE\n" +" aa 01 b6 62 75 69 6c etc. MP_STR \"builtin/box/schema.lua\"\n" +" 03 MP_ERROR_MESSAGE\n" +" bd 53 70 61 63 65 20 etc. MP_STR = Space.'_space'.already.exists\"\n" +" 04 MP_ERROR_ERRNO\n" +" 00 MP_UINT = error number\n" +" 05 MP_ERROR_ERRCODE\n" +" 0a MP_UINT = eror code ER_SPACE_EXISTS" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:249 +msgid "The DATETIME type" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:251 +msgid "Since version :doc:`2.10.0 `. The MessagePack EXT type ``MP_EXT`` together with the extension type ``MP_DATETIME`` is a header for values of the DATETIME type. It creates a container with a payload of 8 or 16 bytes." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:256 +msgid "``MP_DATETIME`` type is 4." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:258 +msgid "The `MessagePack specification `_ defines ``d7`` to mean ``fixext`` with size 8 or ``d8`` to mean ``fixext`` with size 16." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:261 +msgid "So the datetime MessagePack representation looks like this:" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:263 +msgid "+---------+----------------+==========+-----------------+\n" +"| MP_EXT | MP_DATETIME | seconds | nsec; tzoffset; |\n" +"| = d7/d8 | = 4 | | tzindex; |\n" +"+---------+----------------+==========+-----------------+" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:270 +msgid "MessagePack data contains:" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:272 +msgid "Seconds (8 bytes) as an unencoded 64-bit signed integer stored in the little-endian order." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:274 +msgid "The optional fields (8 bytes), if any of them have a non-zero value. The fields include ``nsec``, ``tzoffset``, and ``tzindex`` packed in the little-endian order." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:277 +msgid "For more information about the datetime type, see :ref:`datetime field type details ` and :doc:`reference for the datetime module `." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:284 +msgid "The INTERVAL type" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:286 +msgid "Since version :doc:`2.10.0 `. The MessagePack EXT type ``MP_EXT`` together with the extension type ``MP_INTERVAL`` is a header for values of the INTERVAL type." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:290 +msgid "``MP_INTERVAL`` type is 6." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:292 +msgid "The interval is saved as a variant of a map with a predefined number of known attribute names. If some attributes are undefined, they are omitted from the generated payload." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:295 +msgid "The interval MessagePack representation looks like this:" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:297 +msgid "+--------+-------------------------+-------------+----------------+\n" +"| MP_EXT | Size of packed interval | MP_INTERVAL | PackedInterval |\n" +"+--------+-------------------------+-------------+----------------+" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:303 +msgid "Packed interval consists of:" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:305 +msgid "Packed number of non-zero fields." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:306 +msgid "Packed non-null fields." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:308 +msgid "Each packed field has the following structure:" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:310 +msgid "+----------+=====================+\n" +"| field ID | field value |\n" +"+----------+=====================+" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:316 +msgid "The number of defined (non-null) fields can be zero. In this case, the packed interval will be encoded as integer 0." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:319 +msgid "List of the field IDs:" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:321 +msgid "0 -- year" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:322 +msgid "1 -- month" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:323 +msgid "2 -- week" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:324 +msgid "3 -- day" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:325 +msgid "4 -- hour" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:326 +msgid "5 -- minute" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:327 +msgid "6 -- second" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:328 +msgid "7 -- nanosecond" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:329 +msgid "8 -- adjust" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:331 +msgid "**Example**" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:333 +msgid "Interval value ``1 years, 200 months, -77 days`` is encoded in the following way:" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:335 +msgid "tarantool> I = datetime.interval.new{year = 1, month = 200, day = -77}\n" +"---\n" +"...\n" +"\n" +"tarantool> I\n" +"---\n" +"- +1 years, 200 months, -77 days\n" +"...\n" +"\n" +"tarantool> M = msgpack.encode(I)\n" +"---\n" +"...\n" +"\n" +"tarantool> M\n" +"---\n" +"- !!binary xwsGBAABAczIA9CzCAE=\n" +"...\n" +"\n" +"tarantool> tohex = function(s) return (s:gsub('.', function(c) return string.format('%02X ', string.byte(c)) end)) end\n" +"---\n" +"...\n" +"\n" +"tarantool> tohex(M)\n" +"---\n" +"- 'C7 0B 06 04 00 01 01 CC C8 03 D0 B3 08 01 '\n" +"..." +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:364 +msgid "Where:" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:366 +msgid "C7 -- MP_EXT" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:367 +msgid "0B -- size of a packed interval value (11 bytes)" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:368 +msgid "06 -- MP_INTERVAL type" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:369 +msgid "04 -- number of defined fields" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:370 +msgid "00 -- field ID (year)" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:371 +msgid "01 -- packed value ``1``" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:372 +msgid "01 -- field ID (month)" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:373 +msgid "CCC8 -- packed value ``200``" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:374 +msgid "03 -- field ID (day)" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:375 +msgid "D0B3 -- packed value ``-77``" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:376 +msgid "08 -- field ID (adjust)" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:377 +msgid "01 -- packed value ``1`` (DT_LIMIT)" +msgstr "" + +#: ../../doc/dev_guide/internals/msgpack_extensions.rst:379 +msgid "For more information about the interval type, see :ref:`interval field type details ` and :doc:`description of the datetime module `." +msgstr "" diff --git a/locale/en/dev_guide/internals/recovery_internals.pot b/locale/en/dev_guide/internals/recovery_internals.pot new file mode 100644 index 0000000000..1e5b9e755d --- /dev/null +++ b/locale/en/dev_guide/internals/recovery_internals.pot @@ -0,0 +1,81 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/internals/recovery_internals.rst:5 +msgid "The recovery process" +msgstr "" + +#: ../../doc/dev_guide/internals/recovery_internals.rst:7 +msgid "The recovery process begins when ``box.cfg{}`` happens for the first time after the Tarantool server instance starts." +msgstr "" + +#: ../../doc/dev_guide/internals/recovery_internals.rst:10 +msgid "The recovery process must recover the databases as of the moment when the instance was last shut down. For this it may use the latest snapshot file and any WAL files that were written after the snapshot. One complicating factor is that Tarantool has two engines -- the memtx data must be reconstructed entirely from the snapshot and the WAL files, while the vinyl data will be on disk but might require updating around the time of a checkpoint. (When a snapshot happens, Tarantool tells the vinyl engine to make a checkpoint, and the snapshot operation is rolled back if anything goes wrong, so vinyl's checkpoint is at least as fresh as the snapshot file.)" +msgstr "" + +#: ../../doc/dev_guide/internals/recovery_internals.rst:22 +msgid "**Step 1**" +msgstr "" + +#: ../../doc/dev_guide/internals/recovery_internals.rst:24 +msgid "Read the configuration parameters in the ``box.cfg{}`` request. Parameters which affect recovery may include :ref:`work_dir `, :ref:`wal_dir `, :ref:`memtx_dir `, :ref:`vinyl_dir ` and :ref:`force_recovery `." +msgstr "" + +#: ../../doc/dev_guide/internals/recovery_internals.rst:30 +msgid "**Step 2**" +msgstr "" + +#: ../../doc/dev_guide/internals/recovery_internals.rst:32 +msgid "Find the latest snapshot file. Use its data to reconstruct the in-memory databases. Instruct the vinyl engine to recover to the latest checkpoint." +msgstr "" + +#: ../../doc/dev_guide/internals/recovery_internals.rst:35 +msgid "There are actually two variations of the reconstruction procedure for memtx databases, depending on whether the recovery process is \"default\"." +msgstr "" + +#: ../../doc/dev_guide/internals/recovery_internals.rst:38 +msgid "If the recovery process is default (``force_recovery`` is ``false``), memtx can read data in the snapshot with all indexes disabled. First, all tuples are read into memory. Then, primary keys are built in bulk, taking advantage of the fact that the data is already sorted by primary key within each space." +msgstr "" + +#: ../../doc/dev_guide/internals/recovery_internals.rst:44 +msgid "If the recovery process is non-default (``force_recovery`` is ``true``), Tarantool performs additional checking. Indexes are enabled at the start, and tuples are added one by one. This means that any unique-key constraint violations will be caught, and any duplicates will be skipped. Normally there will be no constraint violations or duplicates, so these checks are only made if an error has occurred." +msgstr "" + +#: ../../doc/dev_guide/internals/recovery_internals.rst:51 +msgid "**Step 3**" +msgstr "" + +#: ../../doc/dev_guide/internals/recovery_internals.rst:53 +msgid "Find the WAL file that was made at the time of, or after, the snapshot file. Read its log entries until the log-entry LSN is greater than the LSN of the snapshot, or greater than the LSN of the vinyl checkpoint. This is the recovery process's \"start position\"; it matches the current state of the engines." +msgstr "" + +#: ../../doc/dev_guide/internals/recovery_internals.rst:59 +msgid "**Step 4**" +msgstr "" + +#: ../../doc/dev_guide/internals/recovery_internals.rst:61 +msgid "Redo the log entries, from the start position to the end of the WAL. The engine skips a redo instruction if it is older than the engine's checkpoint." +msgstr "" + +#: ../../doc/dev_guide/internals/recovery_internals.rst:64 +msgid "**Step 5**" +msgstr "" + +#: ../../doc/dev_guide/internals/recovery_internals.rst:66 +msgid "For the memtx engine, re-create all secondary indexes." +msgstr "" diff --git a/locale/en/dev_guide/internals/replication/index.pot b/locale/en/dev_guide/internals/replication/index.pot new file mode 100644 index 0000000000..a364b84f00 --- /dev/null +++ b/locale/en/dev_guide/internals/replication/index.pot @@ -0,0 +1,21 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/internals/replication/index.rst:7 +msgid "Replication internals" +msgstr "" diff --git a/locale/en/dev_guide/internals/replication/orphan.pot b/locale/en/dev_guide/internals/replication/orphan.pot new file mode 100644 index 0000000000..9cc79d5f8d --- /dev/null +++ b/locale/en/dev_guide/internals/replication/orphan.pot @@ -0,0 +1,153 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:5 +msgid "Orphan status" +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:7 +msgid "Starting with Tarantool version 1.9, there is a change to the procedure when an instance joins a replica set. During ``box.cfg()`` the instance tries to join all nodes listed in :ref:`box.cfg.replication `. If the instance does not succeed with connecting to the required number of nodes (see :ref:`bootstrap_strategy `), it switches to the **orphan** status. While an instance is in orphan status, it is read-only." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:16 +msgid "To \"join\" a master, a replica instance must \"connect\" to the master node and then \"sync\"." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:19 +msgid "\"Connect\" means contact the master over the physical network and receive acknowledgment. If there is no acknowledgment after :ref:`box.replication_connect_timeout ` seconds (usually 4 seconds), and retries fail, then the connect step fails." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:24 +msgid "\"Sync\" means receive updates from the master in order to make a local database copy. Syncing is complete when the replica has received all the updates, or at least has received enough updates that the replica's lag (see :ref:`replication.upstream.lag ` in ``box.info()``) is less than or equal to the number of seconds specified in :ref:`box.cfg.replication_sync_lag `. If ``replication_sync_lag`` is unset (nil) or set to TIMEOUT_INFINITY, then the replica skips the \"sync\" state and switches to \"follow\" immediately." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:36 +msgid "In order to leave orphan mode, you need to sync with a sufficient number of instances (:ref:`bootstrap_strategy `). To do so, you may either:" +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:40 +msgid "Reset ``box.cfg.replication`` to exclude instances that cannot be reached or synced with." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:42 +msgid "Set ``box.cfg.replication`` to ``\"\"`` (empty string)." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:44 +msgid "The following situations are possible." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:48 +msgid "**Situation 1: bootstrap**" +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:50 +msgid "Here ``box.cfg{}`` is being called for the first time. A replica is joining but no replica set exists yet." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:53 +msgid "Set the status to 'orphan'." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:55 +msgid "Try to connect to all nodes from ``box.cfg.replication``. The replica tries to connect for the :ref:`replication_connect_timeout ` number of seconds and retries each :ref:`replication_timeout ` seconds if needed." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:61 +msgid "Abort and throw an error if a replica is not connected to the majority of nodes in ``box.cfg.replication``." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:63 +msgid "This instance might be elected as the replica set 'leader'. Criteria for electing a leader include vclock value (largest is best), and whether it is read-only or read-write (read-write is best unless there is no other choice). The leader is the master that other instances must join. The leader is the master that executes :doc:`box.once() ` functions." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:70 +msgid "If this instance is elected as the replica set leader, then perform an \"automatic bootstrap\":" +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:74 +msgid "Set status to 'running'." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:75 +msgid "Return from ``box.cfg{}``." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:77 +msgid "Otherwise this instance will be a replica joining an existing replica set, so:" +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:80 +msgid "Bootstrap from the leader. See examples in section :ref:`Bootstrapping a replica set `." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:82 +msgid "In background, sync with all the other nodes in the replication set." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:84 +msgid "**Situation 2: recovery**" +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:86 +msgid "Here ``box.cfg{}`` is not being called for the first time. It is being called again in order to perform recovery." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:89 +msgid "Perform :ref:`recovery ` from the last local snapshot and the WAL files." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:92 +msgid "Try to establish connections to all other nodes for the :ref:`replication_connect_timeout ` number of seconds. Once ``replication_connect_timeout`` is expired or all the connections are established, proceed to the \"sync\" state with all the established connections." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:96 +msgid "If connected, sync with all connected nodes, until the difference is not more than :ref:`replication_sync_lag ` seconds." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:101 +msgid "**Situation 3: configuration update**" +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:103 +msgid "Here ``box.cfg{}`` is not being called for the first time. It is being called again because some replication parameter or something in the replica set has changed." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:107 +msgid "Try to connect to all nodes from ``box.cfg.replication``, within the time period specified in :ref:`replication_connect_timeout `." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:111 +msgid "Try to sync with the connected nodes, within the time period specified in :ref:`replication_sync_timeout `." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:115 +msgid "If earlier steps fail, change status to 'orphan'. (Attempts to sync will continue in the background and when/if they succeed then 'orphan' status will end.)" +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:119 +msgid "If earlier steps succeed, set status to 'running' (master) or 'follow' (replica)." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:123 +msgid "**Situation 4: rebootstrap**" +msgstr "" + +#: ../../doc/dev_guide/internals/replication/orphan.rst:125 +msgid "Here ``box.cfg{}`` is not being called. The replica connected successfully at some point in the past, and is now ready for an update from the master. But the master cannot provide an update. This can happen by accident, or more likely can happen because the replica is slow (its :ref:`lag ` is large), and the WAL (.xlog) files containing the updates have been deleted. This is not crippling. The replica can discard what it received earlier, and then ask for the master's latest snapshot (.snap) file contents. Since it is effectively going through the bootstrap process a second time, this is called \"rebootstrapping\". However, there has to be one difference from an ordinary bootstrap -- the replica's :ref:`replica id ` will remain the same. If it changed, then the master would think that the replica is a new addition to the cluster, and would maintain a record of an instance ID of a replica that has ceased to exist. Rebootstrapping was introduced in Tarantool version 1.10.2 and is completely automatic." +msgstr "" diff --git a/locale/en/dev_guide/internals/replication/replication_server_startup.pot b/locale/en/dev_guide/internals/replication/replication_server_startup.pot new file mode 100644 index 0000000000..bdb42e4a1d --- /dev/null +++ b/locale/en/dev_guide/internals/replication/replication_server_startup.pot @@ -0,0 +1,89 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/internals/replication/replication_server_startup.rst:4 +msgid "Server startup with replication" +msgstr "" + +#: ../../doc/dev_guide/internals/replication/replication_server_startup.rst:6 +msgid "In addition to the recovery process described in the section :ref:`Recovery process `, the server must take additional steps and precautions if :ref:`replication ` is enabled." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/replication_server_startup.rst:10 +msgid "Once again the startup procedure is initiated by the ``box.cfg{}`` request. One of the ``box.cfg`` parameters may be :ref:`replication ` which specifies replication source(-s). We will refer to this replica, which is starting up due to ``box.cfg``, as the \"local\" replica to distinguish it from the other replicas in a replica set, which we will refer to as \"distant\" replicas." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/replication_server_startup.rst:17 +msgid "*If there is no snapshot .snap file and the* ``replication`` *parameter is empty and* ``cfg.read_only=false``: |br| then the local replica assumes it is an unreplicated \"standalone\" instance, or is the first replica of a new replica set. It will generate new UUIDs for itself and for the replica set. The replica UUID is stored in the ``_cluster`` space; the replica set UUID is stored in the ``_schema`` space. Since a snapshot contains all the data in all the spaces, that means the local replica's snapshot will contain the replica UUID and the replica set UUID. Therefore, when the local replica restarts on later occasions, it will be able to recover these UUIDs when it reads the .snap file." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/replication_server_startup.rst:28 +msgid "*If there is no snapshot .snap file and the* ``replication`` *parameter is empty and* ``cfg.read_only=true``: |br| it cannot be the first replica of a new replica set because the first replica must be a master. Therefore an error message will occur: ER_BOOTSTRAP_READONLY. To avoid this, change the setting for this (local) instance to ``read_only = false``, or ensure that another (distant) instance starts first and has the local instance's UUID in its ``_cluster`` space. In the latter case, if ER_BOOTSTRAP_READONLY still occurs, set the local instance's :ref:`box.replication_connect_timeout ` to a larger value." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/replication_server_startup.rst:39 +msgid "*If there is no snapshot .snap file and the* ``replication`` *parameter is not empty and the* ``_cluster`` *space contains no other replica UUIDs*: |br| then the local replica assumes it is not a standalone instance, but is not yet part of a replica set. It must now join the replica set. It will send its replica UUID to the first distant replica which is listed in ``replication`` and which will act as a master. This is called the \"join request\". When a distant replica receives a join request, it will send back:" +msgstr "" + +#: ../../doc/dev_guide/internals/replication/replication_server_startup.rst:47 +msgid "the distant replica's replica set UUID," +msgstr "" + +#: ../../doc/dev_guide/internals/replication/replication_server_startup.rst:49 +msgid "the contents of the distant replica's .snap file. |br| When the local replica receives this information, it puts the replica set UUID in its ``_schema`` space, puts the distant replica's UUID and connection information in its ``_cluster`` space, and makes a snapshot containing all the data sent by the distant replica. Then, if the local replica has data in its WAL .xlog files, it sends that data to the distant replica. The distant replica will receive this and update its own copy of the data, and add the local replica's UUID to its ``_cluster`` space." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/replication_server_startup.rst:58 +msgid "*If there is no snapshot .snap file and the* ``replication`` *parameter is not empty and the* ``_cluster`` *space contains other replica UUIDs*: |br| then the local replica assumes it is not a standalone instance, and is already part of a replica set. It will send its replica UUID and replica set UUID to all the distant replicas which are listed in ``replication``. This is called the \"on-connect handshake\". When a distant replica receives an on-connect handshake: |br|" +msgstr "" + +#: ../../doc/dev_guide/internals/replication/replication_server_startup.rst:65 +msgid "the distant replica compares its own copy of the replica set UUID to the one in the on-connect handshake. If there is no match, then the handshake fails and the local replica will display an error." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/replication_server_startup.rst:69 +msgid "the distant replica looks for a record of the connecting instance in its ``_cluster`` space. If there is none, then the handshake fails. |br| Otherwise the handshake is successful. The distant replica will read any new information from its own .snap and .xlog files, and send the new requests to the local replica." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/replication_server_startup.rst:75 +msgid "In the end, the local replica knows what replica set it belongs to, the distant replica knows that the local replica is a member of the replica set, and both replicas have the same database contents." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/replication_server_startup.rst:81 +msgid "*If there is a snapshot file and replication source is not empty*: |br| first the local replica goes through the recovery process described in the previous section, using its own .snap and .xlog files. Then it sends a \"subscribe\" request to all the other replicas of the replica set. The subscribe request contains the server vector clock. The vector clock has a collection of pairs 'server id, lsn' for every replica in the ``_cluster`` system space. Each distant replica, upon receiving a subscribe request, will read its .xlog files' requests and send them to the local replica if (lsn of .xlog file request) is greater than (lsn of the vector clock in the subscribe request). After all the other replicas of the replica set have responded to the local replica's subscribe request, the replica startup is complete." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/replication_server_startup.rst:93 +msgid "The following temporary limitations applied for Tarantool versions earlier than 1.7.7:" +msgstr "" + +#: ../../doc/dev_guide/internals/replication/replication_server_startup.rst:96 +msgid "The URIs in the ``replication`` parameter should all be in the same order on all replicas. This is not mandatory but is an aid to consistency." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/replication_server_startup.rst:98 +msgid "The replicas of a replica set should be started up at slightly different times. This is not mandatory but prevents a situation where each replica is waiting for the other replica to be ready." +msgstr "" + +#: ../../doc/dev_guide/internals/replication/replication_server_startup.rst:102 +msgid "The following limitation still applies for the current Tarantool version:" +msgstr "" + +#: ../../doc/dev_guide/internals/replication/replication_server_startup.rst:104 +msgid "The maximum number of entries in the ``_cluster`` space is :ref:`32 `. Tuples for out-of-date replicas are not automatically re-used, so if this 32-replica limit is reached, users may have to reorganize the ``_cluster`` space manually." +msgstr "" diff --git a/locale/en/dev_guide/lua_style_guide.pot b/locale/en/dev_guide/lua_style_guide.pot new file mode 100644 index 0000000000..756433df28 --- /dev/null +++ b/locale/en/dev_guide/lua_style_guide.pot @@ -0,0 +1,801 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/lua_style_guide.rst:4 +msgid "Lua style guide" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:6 +msgid "Inspiration:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:8 +msgid "https://github.com/Olivine-Labs/lua-style-guide" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:9 +msgid "http://dev.minetest.net/Lua_code_style_guidelines" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:10 +msgid "http://sputnik.freewisdom.org/en/Coding_Standard" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:12 +msgid "Programming style is art. There is some arbitrariness to the rules, but there are sound rationales for them. It is useful not only to provide sound advice on style but to understand the underlying rationale behind the style recommendations:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:17 +msgid "http://mindprod.com/jgloss/unmain.html" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:18 +msgid "http://www.oreilly.com/catalog/perlbp/" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:19 +msgid "http://books.google.com/books?id=QnghAQAAIAAJ" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:21 +msgid "The Zen of Python is good. Understand it and use wisely:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "Beautiful is better than ugly." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "Explicit is better than implicit." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "Simple is better than complex." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "Complex is better than complicated." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "Flat is better than nested." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "Sparse is better than dense." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "Readability counts." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "Special cases aren't special enough to break the rules." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "Although practicality beats purity." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "Errors should never pass silently." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "Unless explicitly silenced." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "In the face of ambiguity, refuse the temptation to guess." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "There should be one -- and preferably only one -- obvious way to do it." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "Although that way may not be obvious at first unless you're Dutch." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "Now is better than never." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "Although never is often better than *right* now." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "If the implementation is hard to explain, it's a bad idea." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "If the implementation is easy to explain, it may be a good idea." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "Namespaces are one honking great idea -- let's do more of those!" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:0 +msgid "https://www.python.org/dev/peps/pep-0020/" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:47 +msgid "Indentation and formatting" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:49 +msgid "4 spaces instead of tabs. PIL suggests using two spaces, but a programmer looks at code from 4 to 8 hours a day, so it's simpler to distinguish indentation with 4 spaces. Why spaces? Similar representation everywhere." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:53 +msgid "You can use vim modelines:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:55 +msgid "-- vim:ts=4 ss=4 sw=4 expandtab" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:59 +msgid "A file should ends w/ one newline symbol, but shouldn't ends w/ blank line (two newline symbols)." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:62 +msgid "Every do/while/for/if/function should indent 4 spaces." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:64 +msgid "Related ``or``/``and`` in ``if`` must be enclosed in the round brackets (). Example:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:66 +msgid "-- Good\n" +"if (a == true and b == false) or (a == false and b == true) then\n" +" <...>\n" +"end\n" +"\n" +"-- Bad\n" +"if a == true and b == false or a == false and b == true then\n" +" <...>\n" +"end\n" +"\n" +"-- Good but not explicit\n" +"if a ^ b == true then\n" +"end" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:82 +msgid "Type conversion" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:84 +msgid "Do not use concatenation to convert to string or addition to convert to number (use ``tostring``/``tonumber`` instead):" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:87 +msgid "-- Bad\n" +"local a = 123\n" +"a = a .. ''\n" +"\n" +"-- Good\n" +"local a = 123\n" +"a = tostring(a)\n" +"\n" +"-- Bad\n" +"local a = '123'\n" +"a = a + 5 -- 128\n" +"\n" +"-- Good\n" +"local a = '123'\n" +"a = tonumber(a) + 5 -- 128" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:105 +msgid "Try to avoid multiple nested ``if``'s with common body:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:107 +msgid "-- Good\n" +"if (a == true and b == false) or (a == false and b == true) then\n" +" do_something()\n" +"end\n" +"\n" +"-- Bad\n" +"if a == true then\n" +" if b == false then\n" +" do_something()\n" +" end\n" +"if b == true then\n" +" if a == false then\n" +" do_something()\n" +" end\n" +"end" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:125 +msgid "Avoid multiple concatenations in one statement, use ``string.format`` instead:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:127 +msgid "-- Bad\n" +"function say_greeting(period, name)\n" +" local a = \"good \" .. period .. \", \" .. name\n" +"end\n" +"\n" +"-- Good\n" +"function say_greeting(period, name)\n" +" local a = string.format(\"good %s, %s\", period, name)\n" +"end\n" +"\n" +"-- Best\n" +"local say_greeting_fmt = \"good %s, %s\"\n" +"function say_greeting(period, name)\n" +" local a = say_greeting_fmt:format(period, name)\n" +"end" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:145 +msgid "Use ``and``/``or`` for default variable values" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:147 +msgid "-- Good\n" +"function(input)\n" +" input = input or 'default_value'\n" +"end\n" +"\n" +"-- Ok but excessive\n" +"function(input)\n" +" if input == nil then\n" +" input = 'default_value'\n" +" end\n" +"end" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:161 +msgid "``if``'s and return statements:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:163 +msgid "-- Good\n" +"if a == true then\n" +" return do_something()\n" +"end\n" +"do_other_thing()\n" +"\n" +"-- Bad\n" +"if a == true then\n" +" return do_something()\n" +"else\n" +" do_other_thing()\n" +"end" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:178 +msgid "Using spaces:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:180 +msgid "Don't use spaces between function name and opening round bracket. Split arguments with one whitespace character:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:183 +msgid "-- Bad\n" +"function name (arg1,arg2,...)\n" +"end\n" +"\n" +"-- Good\n" +"function name(arg1, arg2, ...)\n" +"end" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:193 +msgid "Add a space after comment markers:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:195 +msgid "while true do -- Inline comment\n" +" -- Comment\n" +" do_something()\n" +"end\n" +"--[[\n" +"Multiline\n" +"comment\n" +"]]--" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:206 +msgid "Surrounding operators:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:208 +msgid "-- Bad\n" +"local thing=1\n" +"thing = thing-1\n" +"thing = thing*1\n" +"thing = 'string'..'s'\n" +"\n" +"-- Good\n" +"local thing = 1\n" +"thing = thing - 1\n" +"thing = thing * 1\n" +"thing = 'string' .. 's'" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:222 +msgid "Add a space after commas in tables:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:224 +msgid "-- Bad\n" +"local thing = {1,2,3}\n" +"thing = {1 , 2 , 3}\n" +"thing = {1 ,2 ,3}\n" +"\n" +"-- Good\n" +"local thing = {1, 2, 3}" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:234 +msgid "Add a space in map definitions after equals signs and commas:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:236 +msgid "-- Bad\n" +"return {1,2,3,4}\n" +"return {\n" +" key1 = val1,key2=val2\n" +"}\n" +"\n" +"-- Good\n" +"return {1, 2, 3, 4}\n" +"return {\n" +" key1 = val1, key2 = val2,\n" +" key3 = val3\n" +"}" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:251 +msgid "You can also use alignment:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:253 +msgid "return {\n" +" long_key = 'vaaaaalue',\n" +" key = 'val',\n" +" something = 'even better'\n" +"}" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:262 +msgid "Extra blank lines may be used (sparingly) to separate groups of related functions. Blank lines may be omitted between several related one-liners (for example, a set of dummy implementations)." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:266 +msgid "Use blank lines in functions (sparingly) to indicate logical sections:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:268 +msgid "-- Bad\n" +"if thing ~= nil then\n" +" -- ... stuff ...\n" +"end\n" +"function derp()\n" +" -- ... stuff ...\n" +"end\n" +"local wat = 7\n" +"\n" +"-- Good\n" +"if thing ~= nil then\n" +" -- ... stuff ...\n" +"end\n" +"\n" +"function derp()\n" +" -- ... stuff ...\n" +"end\n" +"\n" +"local wat = 7" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:290 +msgid "Delete whitespace at EOL (strongly forbidden. Use ``:s/\\s\\+$//gc`` in vim to delete them)." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:295 +msgid "Avoid global variables" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:297 +msgid "Avoid using global variables. In exceptional cases, start the name of such a variable with ``_G``, add a prefix, or add a table instead of a prefix:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:300 +msgid "-- Very bad\n" +"function bad_global_example()\n" +"end\n" +"\n" +"function good_local_example()\n" +"end\n" +"-- Good\n" +"_G.modulename_good_local_example = good_local_example\n" +"\n" +"-- Better\n" +"_G.modulename = {}\n" +"_G.modulename.good_local_example = good_local_example" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:315 +msgid "Always use a prefix to avoid name conflicts." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:318 +msgid "Naming" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:320 +msgid "Names of variables/\"objects\" and \"methods\"/functions: snake_case." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:321 +msgid "Names of \"classes\": CamelCase." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:322 +msgid "Private variables/methods (future properties) of objects start with underscores ``._``. Avoid syntax like ``local function private_methods(self) end``." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:325 +msgid "Boolean: naming ``is_<...>``, ``isnt_<...>``, ``has_``, ``hasnt_`` is good style." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:326 +msgid "For \"very local\" variables:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:328 +msgid "``t`` is for tables" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:329 +msgid "``i``, ``j`` are for indexing" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:330 +msgid "``n`` is for counting" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:331 +msgid "``k``, ``v`` is what you get out of ``pairs()`` (are acceptable, ``_`` if unused)" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:332 +msgid "``i``, ``v`` is what you get out of ``ipairs()`` (are acceptable, ``_`` if unused)" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:333 +msgid "``k``/``key`` is for table keys" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:334 +msgid "``v``/``val``/``value`` is for values that are passed around" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:335 +msgid "``x``/``y``/``z`` is for generic math quantities" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:336 +msgid "``s``/``str``/``string`` is for strings" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:337 +msgid "``c`` is for 1-char strings" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:338 +msgid "``f``/``func``/``cb`` are for functions" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:339 +msgid "``status, ..`` or ``ok, ..`` is what you get out of pcall/xpcall" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:340 +msgid "``buf, sz`` is a (buffer, size) pair" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:341 +msgid "``_p`` is for pointers" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:342 +msgid "``t0``.. is for timestamps" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:343 +msgid "``err`` is for errors" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:345 +msgid "Abbreviations are acceptable if they're very common or if they're unambiguous and you've documented them." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:346 +msgid "Global variables are spelled in ALL_CAPS. If it's a system variable, it starts with an underscore (``_G``/``_VERSION``/..)." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:348 +msgid "Modules are named in snake_case (avoid underscores and dashes): for example, 'luasql', not 'Lua-SQL'." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:350 +msgid "``*_mt`` and ``*_methods`` defines metatable and methods table." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:353 +msgid "Idioms and patterns" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:355 +msgid "Always use round brackets in call of functions except multiple cases (common lua style idioms):" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:358 +msgid "``*.cfg{ }`` functions (``box.cfg``/``memcached.cfg``/..)" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:359 +msgid "``ffi.cdef[[ ]]`` function" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:361 +msgid "Avoid the following constructions:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:363 +msgid "''. Strongly avoid require'..'." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:364 +msgid "``function object:method() end``. Use ``function object.method(self) end`` instead." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:365 +msgid "Semicolons as table separators. Only use commas." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:366 +msgid "Semicolons at the end of line. Use semicolons only to split multiple statements on one line." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:367 +msgid "Unnecessary function creation (closures/..)." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:369 +msgid "Avoid implicit casting to boolean in ``if`` conditions like ``if x then`` or ``if not x then``. Such expressions will likely result in troubles with :doc:`box.NULL `. Instead of those conditions, use ``if x ~= nil then`` and ``if x == nil then``." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:374 +msgid "Modules" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:376 +msgid "Don't start modules with license/authors/descriptions, you can write it in LICENSE/AUTHORS/README files. To write modules, use one of the two patterns (don't use ``modules()``):" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:380 +msgid "local M = {}\n" +"\n" +"function M.foo()\n" +" ...\n" +"end\n" +"\n" +"function M.bar()\n" +" ...\n" +"end\n" +"\n" +"return M" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:394 +msgid "or" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:396 +msgid "local function foo()\n" +" ...\n" +"end\n" +"\n" +"local function bar()\n" +" ...\n" +"end\n" +"\n" +"return {\n" +" foo = foo,\n" +" bar = bar,\n" +"}" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:412 +msgid "Commenting" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:414 +msgid "Don't forget to comment your Lua code. You shouldn't comment Lua syntax (assume that the reader already knows the Lua language). Instead, tell about functions/variable names/etc." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:417 +msgid "Start a sentence with a capital letter and end with a period." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:419 +msgid "Multiline comments: use matching (``--[[ ]]--``) instead of simple (``--[[ ]]``)." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:422 +msgid "Public function comments:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:424 +msgid "--- Copy any table (shallow and deep version).\n" +"-- * deepcopy: copies all levels\n" +"-- * shallowcopy: copies only first level\n" +"-- Supports __copy metamethod for copying custom tables with metatables.\n" +"-- @function gsplit\n" +"-- @table inp original table\n" +"-- @shallow[opt] sep flag for shallow copy\n" +"-- @returns table (copy)" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:436 +msgid "Testing" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:438 +msgid "Use the ``tap`` module for writing efficient tests. Example of a test file:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:440 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local test = require('tap').test('table')\n" +"test:plan(31)\n" +"\n" +"do\n" +" -- Check basic table.copy (deepcopy).\n" +" local example_table = {\n" +" { 1, 2, 3 },\n" +" { \"help, I'm very nested\", { { { } } } }\n" +" }\n" +"\n" +" local copy_table = table.copy(example_table)\n" +"\n" +" test:is_deeply(\n" +" example_table,\n" +" copy_table,\n" +" \"checking, that deepcopy behaves ok\"\n" +" )\n" +" test:isnt(\n" +" example_table,\n" +" copy_table,\n" +" \"checking, that tables are different\"\n" +" )\n" +" test:isnt(\n" +" example_table[1],\n" +" copy_table[1],\n" +" \"checking, that tables are different\"\n" +" )\n" +" test:isnt(\n" +" example_table[2],\n" +" copy_table[2],\n" +" \"checking, that tables are different\"\n" +" )\n" +" test:isnt(\n" +" example_table[2][2],\n" +" copy_table[2][2],\n" +" \"checking, that tables are different\"\n" +" )\n" +" test:isnt(\n" +" example_table[2][2][1],\n" +" copy_table[2][2][1],\n" +" \"checking, that tables are different\"\n" +" )\n" +"end\n" +"\n" +"<...>\n" +"\n" +"os.exit(test:check() and 0 or 1)" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:492 +msgid "When you test your code, the output will be something like this:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:494 +msgid "TAP version 13\n" +"1..31\n" +"ok - checking, that deepcopy behaves ok\n" +"ok - checking, that tables are different\n" +"ok - checking, that tables are different\n" +"ok - checking, that tables are different\n" +"ok - checking, that tables are different\n" +"ok - checking, that tables are different\n" +"..." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:508 +msgid "Error handling" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:510 +msgid "Be generous in what you accept and strict in what you return." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:512 +msgid "With error handling, this means that you must provide an error object as the second multi-return value in case of error. The error object can be a string, a Lua table, cdata, or userdata. In the latter three cases, it must have a ``__tostring`` metamethod defined." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:517 +msgid "In case of error, use ``nil`` for the first return value. This makes the error hard to ignore." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:520 +msgid "When checking function return values, check the first argument first. If it's ``nil``, look for error in the second argument:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:523 +msgid "local data, err = foo()\n" +"if data == nil then\n" +" return nil, err\n" +"end\n" +"return bar(data)" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:531 +msgid "Unless the performance of your code is paramount, try to avoid using more than two return values." +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:534 +msgid "In rare cases, you may want to return ``nil`` as a legal return value. In this case, it's OK to check for error first and then for return:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:537 +msgid "local data, err = foo()\n" +"if err == nil then\n" +" return data\n" +"end\n" +"return nil, err" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:546 +msgid "luacheck" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:548 +msgid "To check the code style, Tarantool uses ``luacheck``. It analyses different aspects of code, such as unused variables, and sometimes it checks more aspects than needed. So there is an agreement to ignore some warnings generated by ``luacheck``:" +msgstr "" + +#: ../../doc/dev_guide/lua_style_guide.rst:552 +msgid "\"212/self\", -- Unused argument .\n" +"\"411\", -- Redefining a local variable.\n" +"\"421\", -- Shadowing a local variable.\n" +"\"431\", -- Shadowing an upvalue.\n" +"\"432\", -- Shadowing an upvalue argument." +msgstr "" diff --git a/locale/en/dev_guide/python_style_guide.pot b/locale/en/dev_guide/python_style_guide.pot new file mode 100644 index 0000000000..d9ade0f2a1 --- /dev/null +++ b/locale/en/dev_guide/python_style_guide.pot @@ -0,0 +1,945 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/python_style_guide.rst:3 +msgid "Python Style Guide" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:7 +msgid "Introduction" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:9 +msgid "This document gives coding conventions for the Python code comprising the standard library in the main Python distribution. Please see the companion informational PEP describing style guidelines for the C code in the C implementation of Python [1]_." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:14 +msgid "This document and PEP 257 (Docstring Conventions) were adapted from Guido's original Python Style Guide essay, with some additions from Barry's style guide [2]_." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:21 +msgid "A Foolish Consistency is the Hobgoblin of Little Minds" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:23 +msgid "One of Guido's key insights is that code is read much more often than it is written. The guidelines provided here are intended to improve the readability of code and make it consistent across the wide spectrum of Python code. As PEP 20 says, \"Readability counts\"." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:28 +msgid "A style guide is about consistency. Consistency with this style guide is important. Consistency within a project is more important. Consistency within one module or function is the most important." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:32 +msgid "But most importantly: know when to be inconsistent -- sometimes the style guide just doesn't apply. When in doubt, use your best judgment. Look at other examples and decide what looks best. And don't hesitate to ask!" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:37 +msgid "Two good reasons to break a particular rule:" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:39 +msgid "When applying the rule would make the code less readable, even for someone who is used to reading code that follows the rules." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:42 +msgid "To be consistent with surrounding code that also breaks it (maybe for historic reasons) -- although this is also an opportunity to clean up someone else's mess (in true XP style)." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:49 +msgid "Code lay-out" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:53 +msgid "Indentation" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:55 +msgid "Use 4 spaces per indentation level." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:57 +msgid "For really old code that you don't want to mess up, you can continue to use 8-space tabs." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:60 +msgid "Continuation lines should align wrapped elements either vertically using Python's implicit line joining inside parentheses, brackets and braces, or using a hanging indent. When using a hanging indent the following considerations should be applied; there should be no arguments on the first line and further indentation should be used to clearly distinguish itself as a continuation line." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:67 +#: ../../doc/dev_guide/python_style_guide.rst:324 +#: ../../doc/dev_guide/python_style_guide.rst:353 +#: ../../doc/dev_guide/python_style_guide.rst:372 +#: ../../doc/dev_guide/python_style_guide.rst:385 +msgid "Yes::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:69 +msgid "# Aligned with opening delimiter\n" +"foo = long_function_name(var_one, var_two,\n" +" var_three, var_four)\n" +"\n" +"# More indentation included to distinguish this from the rest.\n" +"def long_function_name(\n" +" var_one, var_two, var_three,\n" +" var_four):\n" +" print(var_one)" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:79 +#: ../../doc/dev_guide/python_style_guide.rst:330 +#: ../../doc/dev_guide/python_style_guide.rst:361 +#: ../../doc/dev_guide/python_style_guide.rst:377 +msgid "No::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:81 +msgid "# Arguments on first line forbidden when not using vertical alignment\n" +"foo = long_function_name(var_one, var_two,\n" +" var_three, var_four)\n" +"\n" +"# Further indentation required as indentation is not distinguishable\n" +"def long_function_name(\n" +" var_one, var_two, var_three,\n" +" var_four):\n" +" print(var_one)" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:91 +msgid "Optional::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:93 +msgid "# Extra indentation is not necessary.\n" +"foo = long_function_name(\n" +" var_one, var_two,\n" +" var_three, var_four)" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:98 +msgid "The closing brace/bracket/parenthesis on multi-line constructs may either line up under the first non-whitespace character of the last line of list, as in::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:102 +msgid "my_list = [\n" +" 1, 2, 3,\n" +" 4, 5, 6,\n" +" ]\n" +"result = some_function_that_takes_arguments(\n" +" 'a', 'b', 'c',\n" +" 'd', 'e', 'f',\n" +" )" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:111 +msgid "or it may be lined up under the first character of the line that starts the multi-line construct, as in::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:114 +msgid "my_list = [\n" +" 1, 2, 3,\n" +" 4, 5, 6,\n" +"]\n" +"result = some_function_that_takes_arguments(\n" +" 'a', 'b', 'c',\n" +" 'd', 'e', 'f',\n" +")" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:126 +msgid "Tabs or Spaces?" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:128 +msgid "Never mix tabs and spaces." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:130 +msgid "The most popular way of indenting Python is with spaces only. The second-most popular way is with tabs only. Code indented with a mixture of tabs and spaces should be converted to using spaces exclusively. When invoking the Python command line interpreter with the ``-t`` option, it issues warnings about code that illegally mixes tabs and spaces. When using ``-tt`` these warnings become errors. These options are highly recommended!" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:138 +msgid "For new projects, spaces-only are strongly recommended over tabs. Most editors have features that make this easy to do." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:143 +msgid "Maximum Line Length" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:145 +msgid "Limit all lines to a maximum of 79 characters." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:147 +msgid "There are still many devices around that are limited to 80 character lines; plus, limiting windows to 80 characters makes it possible to have several windows side-by-side. The default wrapping on such devices disrupts the visual structure of the code, making it more difficult to understand. Therefore, please limit all lines to a maximum of 79 characters. For flowing long blocks of text (docstrings or comments), limiting the length to 72 characters is recommended." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:155 +msgid "The preferred way of wrapping long lines is by using Python's implied line continuation inside parentheses, brackets and braces. Long lines can be broken over multiple lines by wrapping expressions in parentheses. These should be used in preference to using a backslash for line continuation." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:161 +msgid "Backslashes may still be appropriate at times. For example, long, multiple ``with``-statements cannot use implicit continuation, so backslashes are acceptable::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:165 +msgid "with open('/path/to/some/file/you/want/to/read') as file_1, \\\n" +" open('/path/to/some/file/being/written', 'w') as file_2:\n" +" file_2.write(file_1.read())" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:169 +msgid "Another such case is with ``assert`` statements." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:171 +msgid "Make sure to indent the continued line appropriately. The preferred place to break around a binary operator is *after* the operator, not before it. Some examples::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:175 +msgid "class Rectangle(Blob):\n" +"\n" +" def __init__(self, width, height,\n" +" color='black', emphasis=None, highlight=0):\n" +" if (width == 0 and height == 0 and\n" +" color == 'red' and emphasis == 'strong' or\n" +" highlight > 100):\n" +" raise ValueError(\"sorry, you lose\")\n" +" if width == 0 and height == 0 and (color == 'red' or\n" +" emphasis is None):\n" +" raise ValueError(\"I don't think so -- values are %s, %s\" %\n" +" (width, height))\n" +" Blob.__init__(self, width, height,\n" +" color, emphasis, highlight)" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:192 +msgid "Blank Lines" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:194 +msgid "Separate top-level function and class definitions with two blank lines." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:197 +msgid "Method definitions inside a class are separated by a single blank line." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:200 +msgid "Extra blank lines may be used (sparingly) to separate groups of related functions. Blank lines may be omitted between a bunch of related one-liners (e.g. a set of dummy implementations)." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:204 +msgid "Use blank lines in functions, sparingly, to indicate logical sections." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:206 +msgid "Python accepts the control-L (i.e. ^L) form feed character as whitespace; Many tools treat these characters as page separators, so you may use them to separate pages of related sections of your file. Note, some editors and web-based code viewers may not recognize control-L as a form feed and will show another glyph in its place." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:214 +msgid "Encodings (PEP 263)" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:216 +msgid "Code in the core Python distribution should always use the ASCII or Latin-1 encoding (a.k.a. ISO-8859-1). For Python 3.0 and beyond, UTF-8 is preferred over Latin-1, see PEP 3120." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:220 +msgid "Files using ASCII should not have a coding cookie. Latin-1 (or UTF-8) should only be used when a comment or docstring needs to mention an author name that requires Latin-1; otherwise, using ``\\x``, ``\\u`` or ``\\U`` escapes is the preferred way to include non-ASCII data in string literals." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:226 +msgid "For Python 3.0 and beyond, the following policy is prescribed for the standard library (see PEP 3131): All identifiers in the Python standard library MUST use ASCII-only identifiers, and SHOULD use English words wherever feasible (in many cases, abbreviations and technical terms are used which aren't English). In addition, string literals and comments must also be in ASCII. The only exceptions are (a) test cases testing the non-ASCII features, and (b) names of authors. Authors whose names are not based on the latin alphabet MUST provide a latin transliteration of their names." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:237 +msgid "Open source projects with a global audience are encouraged to adopt a similar policy." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:243 +msgid "Imports" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:245 +msgid "Imports should usually be on separate lines, e.g.::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:247 +msgid "Yes: import os\n" +" import sys\n" +"\n" +"No: import sys, os" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:252 +msgid "It's okay to say this though::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:254 +msgid "from subprocess import Popen, PIPE" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:256 +msgid "Imports are always put at the top of the file, just after any module comments and docstrings, and before module globals and constants." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:259 +msgid "Imports should be grouped in the following order:" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:261 +msgid "standard library imports" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:262 +msgid "related third party imports" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:263 +msgid "local application/library specific imports" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:265 +msgid "You should put a blank line between each group of imports." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:267 +msgid "Put any relevant ``__all__`` specification after the imports." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:269 +msgid "Relative imports for intra-package imports are highly discouraged. Always use the absolute package path for all imports. Even now that PEP 328 is fully implemented in Python 2.5, its style of explicit relative imports is actively discouraged; absolute imports are more portable and usually more readable." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:275 +msgid "When importing a class from a class-containing module, it's usually okay to spell this::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:278 +msgid "from myclass import MyClass\n" +"from foo.bar.yourclass import YourClass" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:281 +msgid "If this spelling causes local name clashes, then spell them ::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:283 +msgid "import myclass\n" +"import foo.bar.yourclass" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:286 +msgid "and use \"myclass.MyClass\" and \"foo.bar.yourclass.YourClass\"." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:291 +msgid "Whitespace in Expressions and Statements" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:295 +msgid "Pet Peeves" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:297 +msgid "Avoid extraneous whitespace in the following situations:" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:299 +msgid "Immediately inside parentheses, brackets or braces. ::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:301 +msgid "Yes: spam(ham[1], {eggs: 2})\n" +"No: spam( ham[ 1 ], { eggs: 2 } )" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:304 +msgid "Immediately before a comma, semicolon, or colon::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:306 +msgid "Yes: if x == 4: print x, y; x, y = y, x\n" +"No: if x == 4 : print x , y ; x , y = y , x" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:309 +msgid "Immediately before the open parenthesis that starts the argument list of a function call::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:312 +msgid "Yes: spam(1)\n" +"No: spam (1)" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:315 +msgid "Immediately before the open parenthesis that starts an indexing or slicing::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:318 +msgid "Yes: dict['key'] = list[index]\n" +"No: dict ['key'] = list [index]" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:321 +msgid "More than one space around an assignment (or other) operator to align it with another." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:326 +msgid "x = 1\n" +"y = 2\n" +"long_variable = 3" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:332 +msgid "x = 1\n" +"y = 2\n" +"long_variable = 3" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:339 +msgid "Other Recommendations" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:341 +msgid "Always surround these binary operators with a single space on either side: assignment (``=``), augmented assignment (``+=``, ``-=`` etc.), comparisons (``==``, ``<``, ``>``, ``!=``, ``<>``, ``<=``, ``>=``, ``in``, ``not in``, ``is``, ``is not``), Booleans (``and``, ``or``, ``not``)." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:347 +msgid "If operators with different priorities are used, consider adding whitespace around the operators with the lowest priority(ies). Use your own judgement; however, never use more than one space, and always have the same amount of whitespace on both sides of a binary operator." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:355 +msgid "i = i + 1\n" +"submitted += 1\n" +"x = x*2 - 1\n" +"hypot2 = x*x + y*y\n" +"c = (a+b) * (a-b)" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:363 +msgid "i=i+1\n" +"submitted +=1\n" +"x = x * 2 - 1\n" +"hypot2 = x * x + y * y\n" +"c = (a + b) * (a - b)" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:369 +msgid "Don't use spaces around the ``=`` sign when used to indicate a keyword argument or a default parameter value." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:374 +msgid "def complex(real, imag=0.0):\n" +" return magic(r=real, i=imag)" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:379 +msgid "def complex(real, imag = 0.0):\n" +" return magic(r = real, i = imag)" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:382 +msgid "Compound statements (multiple statements on the same line) are generally discouraged." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:387 +msgid "if foo == 'blah':\n" +" do_blah_thing()\n" +"do_one()\n" +"do_two()\n" +"do_three()" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:393 +#: ../../doc/dev_guide/python_style_guide.rst:402 +msgid "Rather not::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:395 +msgid "if foo == 'blah': do_blah_thing()\n" +"do_one(); do_two(); do_three()" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:398 +msgid "While sometimes it's okay to put an if/for/while with a small body on the same line, never do this for multi-clause statements. Also avoid folding such long lines!" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:404 +msgid "if foo == 'blah': do_blah_thing()\n" +"for x in lst: total += x\n" +"while t < 10: t = delay()" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:408 +msgid "Definitely not::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:410 +msgid "if foo == 'blah': do_blah_thing()\n" +"else: do_non_blah_thing()\n" +"\n" +"try: something()\n" +"finally: cleanup()\n" +"\n" +"do_one(); do_two(); do_three(long, argument,\n" +" list, like, this)\n" +"\n" +"if foo == 'blah': one(); two(); three()" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:423 +msgid "Comments" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:425 +msgid "Comments that contradict the code are worse than no comments. Always make a priority of keeping the comments up-to-date when the code changes!" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:429 +msgid "Comments should be complete sentences. If a comment is a phrase or sentence, its first word should be capitalized, unless it is an identifier that begins with a lower case letter (never alter the case of identifiers!)." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:434 +msgid "If a comment is short, the period at the end can be omitted. Block comments generally consist of one or more paragraphs built out of complete sentences, and each sentence should end in a period." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:438 +msgid "You should use two spaces after a sentence-ending period." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:440 +msgid "When writing English, Strunk and White apply." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:442 +msgid "Python coders from non-English speaking countries: please write your comments in English, unless you are 120% sure that the code will never be read by people who don't speak your language." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:448 +msgid "Block Comments" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:450 +msgid "Block comments generally apply to some (or all) code that follows them, and are indented to the same level as that code. Each line of a block comment starts with a ``#`` and a single space (unless it is indented text inside the comment)." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:455 +msgid "Paragraphs inside a block comment are separated by a line containing a single ``#``." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:460 +msgid "Inline Comments" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:462 +msgid "Use inline comments sparingly." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:464 +msgid "An inline comment is a comment on the same line as a statement. Inline comments should be separated by at least two spaces from the statement. They should start with a # and a single space." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:468 +msgid "Inline comments are unnecessary and in fact distracting if they state the obvious. Don't do this::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:471 +msgid "x = x + 1 # Increment x" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:473 +msgid "But sometimes, this is useful::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:475 +msgid "x = x + 1 # Compensate for border" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:479 +msgid "Documentation Strings" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:481 +msgid "Conventions for writing good documentation strings (a.k.a. \"docstrings\") are immortalized in PEP 257." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:484 +msgid "Write docstrings for all public modules, functions, classes, and methods. Docstrings are not necessary for non-public methods, but you should have a comment that describes what the method does. This comment should appear after the ``def`` line." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:489 +msgid "PEP 257 describes good docstring conventions. Note that most importantly, the ``\"\"\"`` that ends a multiline docstring should be on a line by itself, and preferably preceded by a blank line, e.g.::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:493 +msgid "\"\"\"Return a foobang\n" +"\n" +"Optional plotz says to frobnicate the bizbaz first.\n" +"\n" +"\"\"\"" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:499 +msgid "For one liner docstrings, it's okay to keep the closing ``\"\"\"`` on the same line." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:505 +msgid "Version Bookkeeping" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:507 +msgid "If you have to have Subversion, CVS, or RCS crud in your source file, do it as follows. ::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:510 +msgid "__version__ = \"$Revision$\"\n" +"# $Source$" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:513 +msgid "These lines should be included after the module's docstring, before any other code, separated by a blank line above and below." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:519 +msgid "Naming Conventions" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:521 +msgid "The naming conventions of Python's library are a bit of a mess, so we'll never get this completely consistent -- nevertheless, here are the currently recommended naming standards. New modules and packages (including third party frameworks) should be written to these standards, but where an existing library has a different style, internal consistency is preferred." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:530 +msgid "Descriptive: Naming Styles" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:532 +msgid "There are a lot of different naming styles. It helps to be able to recognize what naming style is being used, independently from what they are used for." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:536 +msgid "The following naming styles are commonly distinguished:" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:538 +msgid "``b`` (single lowercase letter)" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:539 +msgid "``B`` (single uppercase letter)" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:540 +msgid "``lowercase``" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:541 +msgid "``lower_case_with_underscores``" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:542 +msgid "``UPPERCASE``" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:543 +msgid "``UPPER_CASE_WITH_UNDERSCORES``" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:544 +msgid "``CapitalizedWords`` (or CapWords, or CamelCase -- so named because of the bumpy look of its letters [3]_). This is also sometimes known as StudlyCaps." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:548 +msgid "Note: When using abbreviations in CapWords, capitalize all the letters of the abbreviation. Thus HTTPServerError is better than HttpServerError." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:551 +msgid "``mixedCase`` (differs from CapitalizedWords by initial lowercase character!)" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:553 +msgid "``Capitalized_Words_With_Underscores`` (ugly!)" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:555 +msgid "There's also the style of using a short unique prefix to group related names together. This is not used much in Python, but it is mentioned for completeness. For example, the ``os.stat()`` function returns a tuple whose items traditionally have names like ``st_mode``, ``st_size``, ``st_mtime`` and so on. (This is done to emphasize the correspondence with the fields of the POSIX system call struct, which helps programmers familiar with that.)" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:563 +msgid "The X11 library uses a leading X for all its public functions. In Python, this style is generally deemed unnecessary because attribute and method names are prefixed with an object, and function names are prefixed with a module name." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:568 +msgid "In addition, the following special forms using leading or trailing underscores are recognized (these can generally be combined with any case convention):" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:572 +msgid "``_single_leading_underscore``: weak \"internal use\" indicator. E.g. ``from M import *`` does not import objects whose name starts with an underscore." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:576 +msgid "``single_trailing_underscore_``: used by convention to avoid conflicts with Python keyword, e.g. ::" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:579 +msgid "Tkinter.Toplevel(master, class_='ClassName')" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:581 +msgid "``__double_leading_underscore``: when naming a class attribute, invokes name mangling (inside class FooBar, ``__boo`` becomes ``_FooBar__boo``; see below)." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:585 +msgid "``__double_leading_and_trailing_underscore__``: \"magic\" objects or attributes that live in user-controlled namespaces. E.g. ``__init__``, ``__import__`` or ``__file__``. Never invent such names; only use them as documented." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:592 +msgid "Prescriptive: Naming Conventions" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:596 +msgid "Names to Avoid" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:598 +msgid "Never use the characters 'l' (lowercase letter el), 'O' (uppercase letter oh), or 'I' (uppercase letter eye) as single character variable names." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:602 +msgid "In some fonts, these characters are indistinguishable from the numerals one and zero. When tempted to use 'l', use 'L' instead." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:607 +msgid "Package and Module Names" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:609 +msgid "Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability. Python packages should also have short, all-lowercase names, although the use of underscores is discouraged." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:614 +msgid "Since module names are mapped to file names, and some file systems are case insensitive and truncate long names, it is important that module names be chosen to be fairly short -- this won't be a problem on Unix, but it may be a problem when the code is transported to older Mac or Windows versions, or DOS." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:620 +msgid "When an extension module written in C or C++ has an accompanying Python module that provides a higher level (e.g. more object oriented) interface, the C/C++ module has a leading underscore (e.g. ``_socket``)." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:627 +msgid "Class Names" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:629 +msgid "Almost without exception, class names use the CapWords convention. Classes for internal use have a leading underscore in addition." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:634 +msgid "Exception Names" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:636 +msgid "Because exceptions should be classes, the class naming convention applies here. However, you should use the suffix \"Error\" on your exception names (if the exception actually is an error)." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:642 +msgid "Global Variable Names" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:644 +msgid "(Let's hope that these variables are meant for use inside one module only.) The conventions are about the same as those for functions." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:647 +msgid "Modules that are designed for use via ``from M import *`` should use the ``__all__`` mechanism to prevent exporting globals, or use the older convention of prefixing such globals with an underscore (which you might want to do to indicate these globals are \"module non-public\")." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:655 +msgid "Function Names" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:657 +msgid "Function names should be lowercase, with words separated by underscores as necessary to improve readability." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:660 +msgid "mixedCase is allowed only in contexts where that's already the prevailing style (e.g. threading.py), to retain backwards compatibility." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:666 +msgid "Function and method arguments" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:668 +msgid "Always use ``self`` for the first argument to instance methods." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:670 +msgid "Always use ``cls`` for the first argument to class methods." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:672 +msgid "If a function argument's name clashes with a reserved keyword, it is generally better to append a single trailing underscore rather than use an abbreviation or spelling corruption. Thus ``class_`` is better than ``clss``. (Perhaps better is to avoid such clashes by using a synonym.)" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:680 +msgid "Method Names and Instance Variables" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:682 +msgid "Use the function naming rules: lowercase with words separated by underscores as necessary to improve readability." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:685 +msgid "Use one leading underscore only for non-public methods and instance variables." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:688 +msgid "To avoid name clashes with subclasses, use two leading underscores to invoke Python's name mangling rules." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:691 +msgid "Python mangles these names with the class name: if class Foo has an attribute named ``__a``, it cannot be accessed by ``Foo.__a``. (An insistent user could still gain access by calling ``Foo._Foo__a``.) Generally, double leading underscores should be used only to avoid name conflicts with attributes in classes designed to be subclassed." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:697 +msgid "Note: there is some controversy about the use of __names (see below)." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:701 +msgid "Constants" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:703 +msgid "Constants are usually defined on a module level and written in all capital letters with underscores separating words. Examples include ``MAX_OVERFLOW`` and ``TOTAL``." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:709 +msgid "Designing for inheritance" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:711 +msgid "Always decide whether a class's methods and instance variables (collectively: \"attributes\") should be public or non-public. If in doubt, choose non-public; it's easier to make it public later than to make a public attribute non-public." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:716 +msgid "Public attributes are those that you expect unrelated clients of your class to use, with your commitment to avoid backward incompatible changes. Non-public attributes are those that are not intended to be used by third parties; you make no guarantees that non-public attributes won't change or even be removed." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:722 +msgid "We don't use the term \"private\" here, since no attribute is really private in Python (without a generally unnecessary amount of work)." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:725 +msgid "Another category of attributes are those that are part of the \"subclass API\" (often called \"protected\" in other languages). Some classes are designed to be inherited from, either to extend or modify aspects of the class's behavior. When designing such a class, take care to make explicit decisions about which attributes are public, which are part of the subclass API, and which are truly only to be used by your base class." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:733 +msgid "With this in mind, here are the Pythonic guidelines:" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:735 +msgid "Public attributes should have no leading underscores." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:737 +msgid "If your public attribute name collides with a reserved keyword, append a single trailing underscore to your attribute name. This is preferable to an abbreviation or corrupted spelling. (However, not withstanding this rule, 'cls' is the preferred spelling for any variable or argument which is known to be a class, especially the first argument to a class method.)" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:745 +#: ../../doc/dev_guide/python_style_guide.rst:756 +#: ../../doc/dev_guide/python_style_guide.rst:778 +msgid "Note 1:" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:745 +msgid "See the argument name recommendation above for class methods." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:747 +msgid "For simple public data attributes, it is best to expose just the attribute name, without complicated accessor/mutator methods. Keep in mind that Python provides an easy path to future enhancement, should you find that a simple data attribute needs to grow functional behavior. In that case, use properties to hide functional implementation behind simple data attribute access syntax." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:756 +msgid "Properties only work on new-style classes." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:760 +#: ../../doc/dev_guide/python_style_guide.rst:783 +msgid "Note 2:" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:759 +msgid "Try to keep the functional behavior side-effect free, although side-effects such as caching are generally fine." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:765 +#: ../../doc/dev_guide/python_style_guide.rst:788 +msgid "Note 3:" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:763 +msgid "Avoid using properties for computationally expensive operations; the attribute notation makes the caller believe that access is (relatively) cheap." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:767 +msgid "If your class is intended to be subclassed, and you have attributes that you do not want subclasses to use, consider naming them with double leading underscores and no trailing underscores. This invokes Python's name mangling algorithm, where the name of the class is mangled into the attribute name. This helps avoid attribute name collisions should subclasses inadvertently contain attributes with the same name." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:776 +msgid "Note that only the simple class name is used in the mangled name, so if a subclass chooses both the same class name and attribute name, you can still get name collisions." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:781 +msgid "Name mangling can make certain uses, such as debugging and ``__getattr__()``, less convenient. However the name mangling algorithm is well documented and easy to perform manually." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:786 +msgid "Not everyone likes name mangling. Try to balance the need to avoid accidental name clashes with potential use by advanced callers." +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:792 +msgid "References" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:794 +msgid "`PEP 7, Style Guide for C Code, van Rossum `_" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:795 +msgid "`Barry's GNU Mailman style guide `_" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:796 +msgid "`CamelCase Wikipedia page `_" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:800 +msgid "Copyright" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:802 +msgid "Author:" +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:804 +msgid "Guido van Rossum " +msgstr "" + +#: ../../doc/dev_guide/python_style_guide.rst:805 +msgid "Barry Warsaw " +msgstr "" diff --git a/locale/en/dev_guide/reference_capi/box.pot b/locale/en/dev_guide/reference_capi/box.pot new file mode 100644 index 0000000000..009e1eea21 --- /dev/null +++ b/locale/en/dev_guide/reference_capi/box.pot @@ -0,0 +1,585 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-21 08:10+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/reference_capi/box.rst:3 +msgid "Module box" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:7 +msgid "Opaque structure passed to a C stored procedure" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:13 +msgid "Return a tuple from a C stored procedure." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:15 +msgid "The returned tuple is automatically reference-counted by Tarantool. An example program that uses ``box_return_tuple()`` is :ref:`write.c `." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:19 +#: ../../doc/dev_guide/reference_capi/box.rst:46 +msgid "an opaque structure passed to the C stored procedure by Tarantool" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:21 +msgid "a tuple to return" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +msgid "Returns" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:23 +#: ../../doc/dev_guide/reference_capi/box.rst:51 +msgid "-1 on error (perhaps, out of memory; check :ref:`box_error_last()`)" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:25 +#: ../../doc/dev_guide/reference_capi/box.rst:53 +#: ../../doc/dev_guide/reference_capi/box.rst:106 +#: ../../doc/dev_guide/reference_capi/box.rst:123 +#: ../../doc/dev_guide/reference_capi/box.rst:139 +#: ../../doc/dev_guide/reference_capi/box.rst:160 +#: ../../doc/dev_guide/reference_capi/box.rst:181 +#: ../../doc/dev_guide/reference_capi/box.rst:204 +msgid "0 otherwise" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:32 +msgid "Return a pointer to a series of bytes in MessagePack format." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:34 +msgid "This can be used instead of :ref:`box_return_tuple() ` -- it can send the same value, but as MessagePack instead of as a tuple object. It may be simpler than ``box_return_tuple()`` when the result is small, for example a number or a boolean or a short string. It will also be faster than ``box_return_tuple()``, if the result is that users save time by not creating a tuple every time they want to return something from a C function." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:42 +msgid "On the other hand, if an already-existing tuple was obtained from an iterator, then it would be faster to return the tuple via ``box_return_tuple()`` rather than extracting its parts and sending them via ``box_return_mp()``." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:48 +msgid "the first MessagePack byte" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:49 +msgid "after the last MessagePack byte" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:55 +msgid "For example, if ``mp`` is a buffer, and ``mp_end`` is a return value produced by encoding a single MP_UINT scalar value with ``mp_end=mp_encode_uint(mp,1);``, then ``box_return_mp(ctx,mp,mp_end);`` should return ``0``." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:64 +msgid "Find space id by name." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:66 +msgid "This function performs a SELECT request on the ``_vspace`` system space." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:68 +msgid "space name" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:69 +#: ../../doc/dev_guide/reference_capi/box.rst:85 +msgid "length of ``name``" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:71 +#: ../../doc/dev_guide/reference_capi/box.rst:87 +msgid ":c:macro:`BOX_ID_NIL` on error or if not found (check :ref:`box_error_last()`)" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:73 +#: ../../doc/dev_guide/reference_capi/box.rst:89 +msgid "space_id otherwise" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:75 +msgid "See also: :c:type:`box_index_id_by_name`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:79 +msgid "Find index id by name." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:81 +msgid "This function performs a SELECT request on the ``_vindex`` system space." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:83 +#: ../../doc/dev_guide/reference_capi/box.rst:99 +#: ../../doc/dev_guide/reference_capi/box.rst:116 +#: ../../doc/dev_guide/reference_capi/box.rst:131 +#: ../../doc/dev_guide/reference_capi/box.rst:147 +#: ../../doc/dev_guide/reference_capi/box.rst:168 +#: ../../doc/dev_guide/reference_capi/box.rst:189 +msgid "space identifier" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:84 +msgid "index name" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:91 +msgid "See also: :c:type:`box_space_id_by_name`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:97 +msgid "Execute an INSERT/REPLACE request." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:100 +#: ../../doc/dev_guide/reference_capi/box.rst:117 +#: ../../doc/dev_guide/reference_capi/box.rst:170 +msgid "encoded tuple in MsgPack Array format ([ field1, field2, ...])" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:101 +#: ../../doc/dev_guide/reference_capi/box.rst:118 +#: ../../doc/dev_guide/reference_capi/box.rst:171 +msgid "end of a ``tuple``" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:102 +#: ../../doc/dev_guide/reference_capi/box.rst:119 +msgid "output argument. Resulting tuple. Can be set to NULL to discard result" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:105 +#: ../../doc/dev_guide/reference_capi/box.rst:122 +#: ../../doc/dev_guide/reference_capi/box.rst:138 +#: ../../doc/dev_guide/reference_capi/box.rst:159 +#: ../../doc/dev_guide/reference_capi/box.rst:180 +#: ../../doc/dev_guide/reference_capi/box.rst:203 +msgid "-1 on error (check :ref:`box_error_last()`)" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:108 +msgid "See also: :ref:`space_object.insert()`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:114 +msgid "Execute a REPLACE request." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:125 +msgid "See also: :ref:`space_object.replace()`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:129 +msgid "Execute a DELETE request." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:132 +#: ../../doc/dev_guide/reference_capi/box.rst:148 +#: ../../doc/dev_guide/reference_capi/box.rst:169 +msgid "index identifier" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:133 +#: ../../doc/dev_guide/reference_capi/box.rst:149 +msgid "encoded key in MsgPack Array format ([ field1, field2, ...])" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:134 +#: ../../doc/dev_guide/reference_capi/box.rst:150 +msgid "end of a ``key``" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:135 +#: ../../doc/dev_guide/reference_capi/box.rst:156 +#: ../../doc/dev_guide/reference_capi/box.rst:177 +msgid "output argument. An old tuple. Can be set to NULL to discard result" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:141 +msgid "See also: :ref:`space_object.delete()`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:145 +msgid "Execute an UPDATE request." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:151 +#: ../../doc/dev_guide/reference_capi/box.rst:172 +msgid "encoded operations in MsgPack Array format, e.g. ``[[ '=', field_id, value ], ['!', 2, 'xxx']]``" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:153 +msgid "end of an ``ops`` section" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:154 +#: ../../doc/dev_guide/reference_capi/box.rst:175 +msgid "0 if field_ids are zero-based as in C, 1 if field ids are 1-based as in Lua" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:162 +msgid "See also: :ref:`space_object.update()`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:166 +msgid "Execute an UPSERT request." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:174 +msgid "end of a ``ops``" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:183 +msgid "See also: :ref:`space_object.upsert()`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:187 +msgid "Truncate a space." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:195 +msgid "Since version :doc:`2.4.1 `. Push MessagePack data into a session data channel -- socket, console or whatever is behind the session. Behaves just like Lua :doc:`/reference/reference_lua/box_session/push`." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:200 +msgid "begin of MessagePack to push" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:201 +msgid "end of MessagePack to push" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:210 +msgid "Since version :doc:`2.4.1 `. Return the last retrieved value of the specified sequence." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:213 +msgid "sequence identifier" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:214 +msgid "pointer to a variable where the current sequence value will be stored on success." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:217 +msgid "0 on success and -1 otherwise. In case of an error user could get it via ``box_error_last()``." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:224 +msgid "Since version :doc:`2.11.0 `. Return the database schema version. A schema version is a number that indicates whether the :ref:`database schema ` is changed. For example, the ``schema_version`` value grows if a :ref:`space ` or :ref:`index ` is added or deleted, or a space, index, or field name is changed." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:230 +msgid "the database schema version" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +#: ../../doc/dev_guide/reference_capi/box.rst:0 +msgid "Return type" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:231 +#: ../../doc/dev_guide/reference_capi/box.rst:243 +#: ../../doc/dev_guide/reference_capi/box.rst:265 +#: ../../doc/dev_guide/reference_capi/box.rst:337 +msgid "number" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:233 +msgid "See also: :ref:`box.info.schema_version ` and :ref:`IPROTO_SCHEMA_VERSION `" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:239 +msgid "Since version :doc:`2.11.0 `. Return the unique identifier (ID) for the current session." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:242 +msgid "the session identifier; 0 or -1 if there is no session" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:245 +msgid "See also: :ref:`box.session.id() `" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:251 +msgid "Since version :doc:`2.11.0 `. Send an :ref:`IPROTO ` packet over the session's socket with the given MsgPack header and body. The function yields. The function works for binary sessions only. For details, see :ref:`box.session.type() `." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:257 +msgid "the IPROTO session identifier (see :ref:`box_session_id() `)" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:258 +msgid "a MsgPack-encoded header" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:259 +msgid "end of a header encoded as MsgPack" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:260 +msgid "a MsgPack-encoded body. If the ``body`` and ``body_end`` parameters are omitted, the packet consists of the header only." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:262 +msgid "end of a body encoded as MsgPack" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:264 +#: ../../doc/dev_guide/reference_capi/box.rst:336 +msgid "0 on success; -1 on error (check :ref:`box_error_last() `)" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:267 +msgid "See also: :ref:`box.iproto.send() `" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:269 +#: ../../doc/dev_guide/reference_capi/box.rst:341 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:271 +msgid ":errcode:`ER_SESSION_CLOSED` -- the session is closed." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:272 +msgid ":errcode:`ER_NO_SUCH_SESSION` -- the session does not exist." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:273 +msgid ":errcode:`ER_MEMORY_ISSUE` -- out-of-memory limit has been reached." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:274 +msgid ":errcode:`ER_WRONG_SESSION_TYPE` -- the session type is not binary." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:276 +#: ../../doc/dev_guide/reference_capi/box.rst:349 +msgid "For details, see `src/box/errcode.h `__." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:278 +msgid "**Example**" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:280 +msgid "/* IPROTO constants are not exported to C.\n" +"* That is, the user encodes them by himself.\n" +"*/\n" +"#define IPROTO_REQUEST_TYPE 0x00\n" +"#define IPROTO_OK 0x00\n" +"#define IPROTO_SYNC 0x01\n" +"#define IPROTO_SCHEMA_VERSION 0x05\n" +"#define IPROTO_DATA 0x30\n" +"\n" +"char buf[256] = {};\n" +"char *header = buf;\n" +"char *header_end = header;\n" +"header_end = mp_encode_map(header_end, 3);\n" +"header_end = mp_encode_uint(header_end, IPROTO_REQUEST_TYPE);\n" +"header_end = mp_encode_uint(header_end, IPROTO_OK);\n" +"header_end = mp_encode_uint(header_end, IPROTO_SYNC);\n" +"header_end = mp_encode_uint(header_end, 10);\n" +"header_end = mp_encode_uint(header_end, IPROTO_SCHEMA_VERSION);\n" +"header_end = mp_encode_uint(header_end, box_schema_version());\n" +"\n" +"char *body = header_end;\n" +"char *body_end = body;\n" +"body_end = mp_encode_map(body_end, 1);\n" +"body_end = mp_encode_uint(body_end, IPROTO_DATA);\n" +"body_end = mp_encode_uint(body_end, 1);\n" +"\n" +"/* The packet contains both the header and body. */\n" +"box_iproto_send(box_session_id(), header, header_end, body, body_end);\n" +"\n" +"/* The packet contains the header only. */\n" +"box_iproto_send(box_session_id(), header, header_end, NULL, NULL);" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:318 +msgid "Since version :doc:`2.11.0 `. Set a new IPROTO request handler with the provided context for the given request type. The function yields." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:322 +msgid "IPROTO request type code (for example, ``IPROTO_SELECT``). For details, check :ref:`Client-server requests and responses `. To override the handler of unknown request types, use the :ref:`IPROTO_UNKNOWN ` type code." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:322 +msgid "IPROTO request type code (for example, ``IPROTO_SELECT``). For details, check :ref:`Client-server requests and responses `." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:325 +msgid "To override the handler of unknown request types, use the :ref:`IPROTO_UNKNOWN ` type code." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:327 +msgid "IPROTO request handler. To reset the request handler, set the ``handler`` parameter to ``NULL``. See the full parameter description in the :ref:`Handler function ` section." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:330 +msgid "IPROTO request handler destructor. The destructor is called when the corresponding handler is removed. See the full parameter description in the :ref:`Handler destructor function ` section." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:334 +msgid "a context passed to the ``handler`` and ``destroy`` callbacks" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:339 +msgid "See also: :ref:`box.iproto.override() `" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:343 +msgid "If a Lua handler throws an exception, the behavior is similar to that of a remote procedure call. The following errors are returned to the client over IPROTO (see `src/lua/utils.h `__):" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:346 +msgid ":errcode:`ER_PROC_LUA` -- an exception is thrown from a Lua handler, diagnostic is not set." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:347 +msgid "diagnostics from ``src/box/errcode.h`` -- an exception is thrown, diagnostic is set." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:353 +msgid "**Handler function**" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:355 +msgid "The signature of a handler function (the ``handler`` parameter):" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:357 +msgid "enum iproto_handler_status {\n" +" IPROTO_HANDLER_OK,\n" +" IPROTO_HANDLER_ERROR,\n" +" IPROTO_HANDLER_FALLBACK,\n" +"}\n" +"\n" +"typedef enum iproto_handler_status\n" +"(*iproto_handler_t)(const char *header, const char *header_end,\n" +" const char *body, const char *body_end, void *ctx);" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:369 +#: ../../doc/dev_guide/reference_capi/box.rst:395 +msgid "where:" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:371 +msgid "``header`` (const char*) -- a MsgPack-encoded header" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:372 +msgid "``header_end`` (const char*) -- end of a header encoded as MsgPack" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:373 +msgid "``body`` (const char*) -- a MsgPack-encoded body" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:374 +msgid "``header_end`` (const char*) -- end of a body encoded as MsgPack" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:376 +msgid "The handler returns a status code. Possible statuses:" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:378 +msgid "``IPROTO_REQUEST_HANDLER_OK`` -- success" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:379 +msgid "``IPROTO_REQUEST_HANDLER_ERROR`` -- error, diagnostic must be set by handler (see :ref:`box_error_set() ` and :ref:`box_error_raise() `)" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:382 +msgid "``IPROTO_REQUEST_HANDLER_FALLBACK`` -- fallback to the default handler" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:386 +msgid "**Handler destructor function**" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:388 +msgid "The destructor is called when the handler is reset. The signature of a destructor function (the ``destroy`` parameter):" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:391 +msgid "typedef void (*iproto_handler_destroy_t)(void *ctx);" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:397 +msgid "``ctx`` (void*): the context provided by ``box_iproto_override()`` function." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:399 +msgid "**Examples**" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box.rst:401 +msgid "box_iproto_override(1000, iproto_request_handler_с, NULL)\n" +"box_iproto_override(IPROTO_SELECT, iproto_request_handler_с, (uintptr_t)23)\n" +"box_iproto_override(IPROTO_SELECT, NULL, NULL)\n" +"box_iproto_override(IPROTO_UNKNOWN, iproto_unknown_request_handler_с, &ctx)" +msgstr "" diff --git a/locale/en/dev_guide/reference_capi/box_index.pot b/locale/en/dev_guide/reference_capi/box_index.pot new file mode 100644 index 0000000000..baa39f3cbc --- /dev/null +++ b/locale/en/dev_guide/reference_capi/box_index.pot @@ -0,0 +1,322 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:3 +msgid "Module index" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:7 +msgid "A space iterator" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:13 +msgid "Controls how to iterate over tuples in an index. Different index types support different iterator types. For example, one can start iteration from a particular value (request key) and then retrieve all tuples where keys are greater or equal (= GE) to this key." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:18 +msgid "If iterator type is not supported by the selected index type, iterator constructor must fail with ER_UNSUPPORTED. To be selectable for primary key, an index must support at least ITER_EQ and ITER_GE types." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:22 +msgid "NULL value of request key corresponds to the first or last key in the index, depending on iteration direction. (first key for GE and GT types, and last key for LE and LT). Therefore, to iterate over all tuples in an index, one can use ITER_GE or ITER_LE iteration types with start key equal to NULL. For ITER_EQ, the key must not be NULL." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:30 +msgid "key == x ASC order" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:34 +msgid "key == x DESC order" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:38 +msgid "all tuples" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:42 +msgid "key < x" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:46 +msgid "key <= x" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:50 +msgid "key >= x" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:54 +msgid "key > x" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:58 +msgid "all bits from x are set in key" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:62 +msgid "at least one x's bit is set" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:66 +msgid "all bits are not set" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:70 +msgid "key overlaps x" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:74 +msgid "tuples in distance ascending order from specified point" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:80 +msgid "Allocate and initialize iterator for space_id, index_id." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:82 +msgid "The returned iterator must be destroyed by :ref:`box_iterator_free`." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:85 +#: ../../doc/dev_guide/reference_capi/box_index.rst:129 +#: ../../doc/dev_guide/reference_capi/box_index.rst:139 +#: ../../doc/dev_guide/reference_capi/box_index.rst:149 +#: ../../doc/dev_guide/reference_capi/box_index.rst:168 +#: ../../doc/dev_guide/reference_capi/box_index.rst:184 +#: ../../doc/dev_guide/reference_capi/box_index.rst:200 +#: ../../doc/dev_guide/reference_capi/box_index.rst:216 +#: ../../doc/dev_guide/reference_capi/box_index.rst:234 +msgid "space identifier" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:86 +#: ../../doc/dev_guide/reference_capi/box_index.rst:130 +#: ../../doc/dev_guide/reference_capi/box_index.rst:140 +#: ../../doc/dev_guide/reference_capi/box_index.rst:150 +#: ../../doc/dev_guide/reference_capi/box_index.rst:169 +#: ../../doc/dev_guide/reference_capi/box_index.rst:185 +#: ../../doc/dev_guide/reference_capi/box_index.rst:201 +#: ../../doc/dev_guide/reference_capi/box_index.rst:217 +#: ../../doc/dev_guide/reference_capi/box_index.rst:235 +msgid "index identifier" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:87 +#: ../../doc/dev_guide/reference_capi/box_index.rst:218 +msgid ":ref:`iterator_type`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:88 +#: ../../doc/dev_guide/reference_capi/box_index.rst:170 +#: ../../doc/dev_guide/reference_capi/box_index.rst:186 +#: ../../doc/dev_guide/reference_capi/box_index.rst:202 +#: ../../doc/dev_guide/reference_capi/box_index.rst:219 +msgid "encode key in MsgPack Array format ([part1, part2, ...])" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:89 +#: ../../doc/dev_guide/reference_capi/box_index.rst:171 +#: ../../doc/dev_guide/reference_capi/box_index.rst:187 +#: ../../doc/dev_guide/reference_capi/box_index.rst:203 +#: ../../doc/dev_guide/reference_capi/box_index.rst:220 +msgid "the end of encoded ``key``" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +#: ../../doc/dev_guide/reference_capi/box_index.rst:0 +msgid "Returns" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:91 +msgid "NULL on error (check :ref:`box_error_last `)" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:92 +msgid "iterator otherwise" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:94 +msgid "See also :ref:`box_iterator_next`, :ref:`box_iterator_free`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:101 +msgid "Retrieve the next item from the ``iterator``." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:103 +#: ../../doc/dev_guide/reference_capi/box_index.rst:117 +msgid "an iterator returned by :ref:`box_index_iterator `" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:105 +msgid "output argument. result a tuple or NULL if there is no more data." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:108 +#: ../../doc/dev_guide/reference_capi/box_index.rst:132 +#: ../../doc/dev_guide/reference_capi/box_index.rst:142 +#: ../../doc/dev_guide/reference_capi/box_index.rst:175 +msgid "-1 on error (check :ref:`box_error_last `)" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:109 +msgid "0 on success. The end of data is not an error." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:115 +msgid "Destroy and deallocate iterator." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:122 +msgid "Determine a direction of the given iterator type: -1 for REQ, LT, LE, and +1 for all others." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:127 +msgid "Return the number of element in the index." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:133 +#: ../../doc/dev_guide/reference_capi/box_index.rst:143 +msgid ">= 0 otherwise" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:137 +msgid "Return the number of bytes used in memory by the index." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:147 +msgid "Return a random tuple from the index (useful for statistical analysis)." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:151 +msgid "random seed" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:152 +#: ../../doc/dev_guide/reference_capi/box_index.rst:172 +#: ../../doc/dev_guide/reference_capi/box_index.rst:188 +#: ../../doc/dev_guide/reference_capi/box_index.rst:204 +msgid "output argument. result a tuple or NULL if there is no tuples in space" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:155 +msgid "See also: :doc:`/reference/reference_lua/box_index/random`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:161 +msgid "Get a tuple from index by the key." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:163 +msgid "Please note that this function works much more faster than :doc:`/reference/reference_lua/box_index/select` or :ref:`box_index_iterator` + :ref:`box_iterator_next`." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:176 +#: ../../doc/dev_guide/reference_capi/box_index.rst:192 +#: ../../doc/dev_guide/reference_capi/box_index.rst:208 +#: ../../doc/dev_guide/reference_capi/box_index.rst:223 +msgid "0 on success" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:178 +msgid "See also: ``index_object.get()``" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:182 +msgid "Return a first (minimal) tuple matched the provided key." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:191 +#: ../../doc/dev_guide/reference_capi/box_index.rst:207 +#: ../../doc/dev_guide/reference_capi/box_index.rst:222 +msgid "-1 on error (check :ref:`box_error_last() `)" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:194 +msgid "See also: :doc:`/reference/reference_lua/box_index/min`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:198 +msgid "Return a last (maximal) tuple matched the provided key." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:210 +msgid "See also: :doc:`/reference/reference_lua/box_index/max`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:214 +msgid "Count the number of tuple matched the provided key." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:225 +msgid "See also: :ref:`index_object.count()`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:230 +msgid "Return :ref:`key definition ` for an index" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:232 +msgid "Returned object is valid until the next yield." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:237 +msgid "key definition on success" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:238 +msgid "NULL on error" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:240 +msgid "See also: :ref:`box_tuple_compare() `," +msgstr "" + +#: ../../doc/dev_guide/reference_capi/box_index.rst:241 +msgid ":ref:`box_tuple_format_new() `" +msgstr "" diff --git a/locale/en/dev_guide/reference_capi/clock.pot b/locale/en/dev_guide/reference_capi/clock.pot new file mode 100644 index 0000000000..b8f8c2af48 --- /dev/null +++ b/locale/en/dev_guide/reference_capi/clock.pot @@ -0,0 +1,21 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/reference_capi/clock.rst:3 +msgid "Module clock" +msgstr "" diff --git a/locale/en/dev_guide/reference_capi/coio.pot b/locale/en/dev_guide/reference_capi/coio.pot new file mode 100644 index 0000000000..9420649d66 --- /dev/null +++ b/locale/en/dev_guide/reference_capi/coio.pot @@ -0,0 +1,112 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/reference_capi/coio.rst:5 +msgid "Module coio" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/coio.rst:11 +msgid "READ event" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/coio.rst:15 +msgid "WRITE event" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/coio.rst:21 +msgid "Wait until READ or WRITE event on socket (``fd``). Yields." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/coio.rst:0 +#: ../../doc/dev_guide/reference_capi/coio.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/coio.rst:23 +#: ../../doc/dev_guide/reference_capi/coio.rst:72 +msgid "non-blocking socket file description" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/coio.rst:24 +msgid "requested events to wait. Combination of ``COIO_READ | COIO_WRITE`` bit flags." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/coio.rst:26 +msgid "timeout in seconds." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/coio.rst:0 +#: ../../doc/dev_guide/reference_capi/coio.rst:0 +#: ../../doc/dev_guide/reference_capi/coio.rst:0 +#: ../../doc/dev_guide/reference_capi/coio.rst:0 +#: ../../doc/dev_guide/reference_capi/coio.rst:0 +msgid "Returns" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/coio.rst:28 +msgid "0 - timeout" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/coio.rst:29 +msgid ">0 - returned events. Combination of ``TNT_IO_READ | TNT_IO_WRITE`` bit flags." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/coio.rst:35 +msgid "Create new eio task with specified function and arguments. Yield and wait until the task is complete. This function may use the :ref:`worker_pool_threads ` configuration parameter." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/coio.rst:40 +msgid "To avoid double error checking, this function does not throw exceptions. In most cases it is also necessary to check the return value of the called function and perform necessary actions. If func sets errno, the errno is preserved across the call." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/coio.rst:45 +msgid "-1 and ``errno`` = ENOMEM if failed to create a task" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/coio.rst:46 +msgid "the function's return (``errno`` is preserved)." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/coio.rst:48 +msgid "**Example:**" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/coio.rst:50 +msgid "static ssize_t openfile_cb(va_list ap)\n" +"{\n" +" const char* filename = va_arg(ap);\n" +" int flags = va_arg(ap);\n" +" return open(filename, flags);\n" +"}\n" +"\n" +"if (coio_call(openfile_cb, \"/tmp/file\", 0) == -1)\n" +" // handle errors.\n" +"..." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/coio.rst:65 +msgid "Fiber-friendly version of :manpage:`getaddrinfo(3)`." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/coio.rst:69 +msgid "Close the ``fd`` and wake any fiber blocked in :ref:`coio_wait() ` call on this ``fd``." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/coio.rst:74 +msgid "the result of ``close(fd)``, see :manpage:`close(2)`" +msgstr "" diff --git a/locale/en/dev_guide/reference_capi/error.pot b/locale/en/dev_guide/reference_capi/error.pot new file mode 100644 index 0000000000..cb39ff79c8 --- /dev/null +++ b/locale/en/dev_guide/reference_capi/error.pot @@ -0,0 +1,114 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-21 08:10+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/reference_capi/error.rst:3 +msgid "Module error" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:11 +msgid "For a complete list of errors, refer to the Tarantool `error code header file `__." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:16 +msgid "Error -- contains information about error." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:20 +msgid "Return the error type, e.g. \"ClientError\", \"SocketError\", etc." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:0 +#: ../../doc/dev_guide/reference_capi/error.rst:0 +#: ../../doc/dev_guide/reference_capi/error.rst:0 +#: ../../doc/dev_guide/reference_capi/error.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:22 +#: ../../doc/dev_guide/reference_capi/error.rst:31 +#: ../../doc/dev_guide/reference_capi/error.rst:38 +msgid "error" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:0 +#: ../../doc/dev_guide/reference_capi/error.rst:0 +#: ../../doc/dev_guide/reference_capi/error.rst:0 +#: ../../doc/dev_guide/reference_capi/error.rst:0 +msgid "Returns" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:23 +#: ../../doc/dev_guide/reference_capi/error.rst:39 +msgid "not-null string" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:29 +msgid "Return IPROTO error code" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:32 +msgid ":ref:`box_error_code `" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:36 +msgid "Return the error message" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:45 +msgid "Get the information about the last API call error." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:47 +msgid "The Tarantool error handling works most like libc's errno. All API calls return -1 or NULL in the event of error. An internal pointer to box_error_t type is set by API functions to indicate what went wrong. This value is only significant if API call failed (returned -1 or NULL)." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:52 +msgid "Successful function can also touch the last error in some cases. You don't have to clear the last error before calling API functions. The returned object is valid only until next call to **any** API function." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:56 +msgid "You must set the last error using box_error_set() in your stored C procedures if you want to return a custom error message. You can re-throw the last API error to IPROTO client by keeping the current value and returning -1 to Tarantool from your stored procedure." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:61 +msgid "last error" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:65 +msgid "Clear the last error." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:71 +msgid "Set the last error." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:75 +msgid "IPROTO :ref:`error code`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:77 +msgid "format arguments" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:79 +msgid "See also: IPROTO :ref:`error code`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/error.rst:85 +msgid "A backward-compatible API define." +msgstr "" diff --git a/locale/en/dev_guide/reference_capi/fiber.pot b/locale/en/dev_guide/reference_capi/fiber.pot new file mode 100644 index 0000000000..2c0ca7ad8b --- /dev/null +++ b/locale/en/dev_guide/reference_capi/fiber.pot @@ -0,0 +1,343 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:3 +msgid "Module fiber" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:7 +msgid "Fiber - contains information about a :ref:`fiber `." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:11 +msgid "Function to run inside a fiber." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:15 +msgid "Create a new fiber." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:17 +msgid "Takes a fiber from the fiber cache, if it's not empty. Can fail only if there is not enough memory for the fiber structure or fiber stack." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:20 +msgid "The created fiber automatically returns itself to the fiber cache when its \"main\" function completes." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:23 +#: ../../doc/dev_guide/reference_capi/fiber.rst:39 +msgid "string with fiber name" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:24 +msgid "func for run inside fiber" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:26 +#: ../../doc/dev_guide/reference_capi/fiber.rst:43 +msgid "See also: :ref:`fiber_start()`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:30 +msgid "Create a new fiber with defined attributes." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:32 +msgid "Can fail only if there is not enough memory for the fiber structure or fiber stack." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:35 +msgid "The created fiber automatically returns itself to the fiber cache if has a default stack size when its \"main\" function completes." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:40 +#: ../../doc/dev_guide/reference_capi/fiber.rst:175 +#: ../../doc/dev_guide/reference_capi/fiber.rst:181 +msgid "fiber attributes container" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:41 +msgid "function to run inside the fiber" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:49 +msgid "Start execution of created fiber." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:51 +msgid "fiber to start" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:52 +msgid "arguments to start the fiber with" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:56 +msgid "Return control to another fiber and wait until it'll be woken." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:58 +msgid "See also: :ref:`fiber_wakeup()`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:64 +msgid "Interrupt a synchronous wait of a fiber" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:66 +#: ../../doc/dev_guide/reference_capi/fiber.rst:108 +msgid "fiber to be woken up" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:72 +msgid "Cancel the subject fiber." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:74 +msgid "Cancellation is asynchronous. Use :ref:`fiber_join()` to wait for the cancellation to complete." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:77 +msgid "After ``fiber_cancel()`` is called, the fiber may or may not check whether it was cancelled. If the fiber does not check it, it cannot ever be cancelled." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:80 +msgid "fiber to be cancelled" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:84 +msgid "Deprecated since :doc:`2.11.0 `. Make it possible or not possible to wakeup the current fiber immediately when it's cancelled." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:87 +#: ../../doc/dev_guide/reference_capi/fiber.rst:98 +msgid "fiber" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:88 +#: ../../doc/dev_guide/reference_capi/fiber.rst:99 +msgid "status to set" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +#: ../../doc/dev_guide/reference_capi/fiber.rst:0 +msgid "Returns" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:90 +msgid "previous state" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:96 +msgid "Set fiber to be joinable (``false`` by default)." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:105 +msgid "Wait until the fiber is dead and then move its execution status to the caller. The fiber must not be detached." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:110 +msgid "Before: ``FIBER_IS_JOINABLE`` flag is set." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:112 +msgid "See also: :ref:`fiber_set_joinable()`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:116 +msgid "Put the current fiber to sleep for at least 's' seconds." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:118 +msgid "time to sleep" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:120 +msgid "Note: this is a cancellation point." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:122 +msgid "See also: :ref:`fiber_is_cancelled()`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:128 +msgid "Check current fiber for cancellation (it must be checked manually)." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:132 +msgid "Report loop begin time as double (cheap)." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:136 +msgid "Report loop begin time as 64-bit int. Uses real time clock." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:140 +msgid "Report loop begin time as double (cheap). Uses monotonic clock." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:144 +msgid "Report loop begin time as 64-bit int. Uses monotonic clock." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:148 +msgid "Reschedule fiber to end of event loop cycle." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:154 +msgid "Return ``slab_cache`` suitable to use with ``tarantool/small`` library" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:158 +msgid "Return the current fiber." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:164 +msgid "Create a new fiber attributes container and initialize it with default parameters." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:167 +msgid "Can be used for creating many fibers: corresponding fibers will not take ownership." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:172 +msgid "Delete the ``fiber_attr`` and free all allocated resources. This is safe when fibers created with this attribute still exist." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:179 +msgid "Set the fiber's stack size in the fiber attributes container." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:182 +msgid "stack size for new fibers (in bytes)" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:184 +msgid "0 on success" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:185 +msgid "-1 on failure (if ``stack_size`` is smaller than the minimum allowable fiber stack size)" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:190 +msgid "Get the fiber's stack size from the fiber attributes container." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:192 +msgid "fiber attributes container, or NULL for default" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:195 +msgid "stack size (in bytes)" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:201 +msgid "A conditional variable: a synchronization primitive that allow fibers in Tarantool's :ref:`cooperative multitasking ` environment to yield until some predicate is satisfied." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:205 +msgid "Fiber conditions have two basic operations -- \"wait\" and \"signal\", -- where \"wait\" suspends the execution of a fiber (i.e. yields) until \"signal\" is called." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:209 +msgid "Unlike ``pthread_cond``, ``fiber_cond`` doesn't require mutex/latch wrapping." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:213 +msgid "Create a new conditional variable." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:217 +msgid "Delete the conditional variable." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:219 +msgid "Note: behavior is undefined if there are fibers waiting for the conditional variable." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:222 +msgid "conditional variable to delete" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:228 +msgid "Wake up **one** (any) of the fibers waiting for the conditional variable." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:230 +#: ../../doc/dev_guide/reference_capi/fiber.rst:238 +msgid "Does nothing if no one is waiting." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:232 +#: ../../doc/dev_guide/reference_capi/fiber.rst:240 +#: ../../doc/dev_guide/reference_capi/fiber.rst:256 +msgid "conditional variable" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:236 +msgid "Wake up **all** fibers waiting for the conditional variable." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:246 +msgid "Suspend the execution of the current fiber (i.e. yield) until :ref:`fiber_cond_signal() ` is called." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:249 +msgid "Like ``pthread_cond``, ``fiber_cond`` can issue spurious wake ups caused by explicit :ref:`fiber_wakeup()` or :ref:`fiber_cancel()` calls. It is highly recommended to wrap calls to this function into a loop and check the actual predicate and :ref:`fiber_is_cancelled()` on every iteration." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:257 +msgid "timeout in seconds" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:259 +msgid "0 on :ref:`fiber_cond_signal() ` call or a spurious wake up" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:261 +msgid "-1 on timeout, and the error code is set to 'TimedOut'" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/fiber.rst:265 +msgid "Shortcut for :ref:`fiber_cond_wait_timeout() `." +msgstr "" diff --git a/locale/en/dev_guide/reference_capi/index.pot b/locale/en/dev_guide/reference_capi/index.pot new file mode 100644 index 0000000000..3b2b490f7b --- /dev/null +++ b/locale/en/dev_guide/reference_capi/index.pot @@ -0,0 +1,26 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/reference_capi/index.rst:10 +#: ../../doc/dev_guide/reference_capi/index.rst:10 +msgid "List of C API headers" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/index.rst:8 +msgid "C API reference" +msgstr "" diff --git a/locale/en/dev_guide/reference_capi/latch.pot b/locale/en/dev_guide/reference_capi/latch.pot new file mode 100644 index 0000000000..10c9425ee3 --- /dev/null +++ b/locale/en/dev_guide/reference_capi/latch.pot @@ -0,0 +1,91 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/reference_capi/latch.rst:3 +msgid "Module latch" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/latch.rst:7 +msgid "A lock for cooperative multitasking environment" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/latch.rst:11 +msgid "Allocate and initialize the new latch." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/latch.rst:0 +#: ../../doc/dev_guide/reference_capi/latch.rst:0 +msgid "Returns" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/latch.rst:13 +msgid "allocated latch object" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/latch.rst:0 +#: ../../doc/dev_guide/reference_capi/latch.rst:0 +msgid "Return type" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/latch.rst:14 +msgid "box_latch_t *" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/latch.rst:18 +msgid "Destroy and free the latch." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/latch.rst:0 +#: ../../doc/dev_guide/reference_capi/latch.rst:0 +#: ../../doc/dev_guide/reference_capi/latch.rst:0 +#: ../../doc/dev_guide/reference_capi/latch.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/latch.rst:20 +msgid "latch to destroy" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/latch.rst:24 +msgid "Lock a latch. Waits indefinitely until the current fiber can gain access to the latch. Since version :doc:`2.11.0 `, locks are acquired exactly in the order in which they were requested." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/latch.rst:28 +#: ../../doc/dev_guide/reference_capi/latch.rst:34 +msgid "latch to lock" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/latch.rst:32 +msgid "Try to lock a latch. Return immediately if the latch is locked." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/latch.rst:35 +msgid "status of operation. 0 - success, 1 - latch is locked" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/latch.rst:36 +msgid "int" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/latch.rst:40 +msgid "Unlock a latch. The fiber calling this function must own the latch." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/latch.rst:42 +msgid "latch to unlock" +msgstr "" diff --git a/locale/en/dev_guide/reference_capi/on_shutdown.pot b/locale/en/dev_guide/reference_capi/on_shutdown.pot new file mode 100644 index 0000000000..ab3cb2befe --- /dev/null +++ b/locale/en/dev_guide/reference_capi/on_shutdown.pot @@ -0,0 +1,81 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/reference_capi/on_shutdown.rst:3 +msgid "Function on_shutdown" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/on_shutdown.rst:9 +msgid "Register and/or deregister an on_shutdown function." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/on_shutdown.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/on_shutdown.rst:11 +msgid "Pointer to an area that the new handler can use" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/on_shutdown.rst:12 +msgid "Pointer to a function which will be registered, or NULL" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/on_shutdown.rst:13 +msgid "Pointer to a function which will be deregistered, or NULL" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/on_shutdown.rst:0 +msgid "Returns" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/on_shutdown.rst:15 +msgid "status of operation. 0 - success, -1 - failure" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/on_shutdown.rst:0 +msgid "Return type" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/on_shutdown.rst:16 +msgid "int" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/on_shutdown.rst:18 +msgid "A function which is registered will be called when the Tarantool instance shuts down. This is functionally similar to what :ref:`box.ctl.on_shutdown ` does." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/on_shutdown.rst:21 +msgid "If there are several on_shutdown functions, the Tarantool instance will call them in reverse order of registration, that is, it will call the last-registered function first." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/on_shutdown.rst:24 +msgid "Typically a module developer will register an on_shutdown function that does whatever cleanup work the module requires, and then returns control to the Tarantool instance. Such an on_shutdown function should be fast, or should use an asynchronous waiting mechanism (for example :ref:`coio_wait `)." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/on_shutdown.rst:29 +msgid "Possible errors: old_handler does not exist (errno = EINVAL), new_handler and old_handler are both NULL (errno = EINVAL), memory allocation fails (errno = ENOMEM)." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/on_shutdown.rst:34 +msgid "Example: if the C API .c program contains a function ``int on_shutdown_function(void *arg) {printf(\"Bye!\\n\");return 0; }`` and later, in the function which the instance calls, contains a line ``box_on_shutdown(NULL, on_shutdown_function, NULL);`` then, if all goes well, when the instance shuts down, it will display \"Bye!\"." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/on_shutdown.rst:40 +msgid "Added in version :doc:`2.8.1 `." +msgstr "" diff --git a/locale/en/dev_guide/reference_capi/say.pot b/locale/en/dev_guide/reference_capi/say.pot new file mode 100644 index 0000000000..c478c9da7c --- /dev/null +++ b/locale/en/dev_guide/reference_capi/say.pot @@ -0,0 +1,62 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/reference_capi/say.rst:3 +msgid "Module say (logging)" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/say.rst:11 +msgid "do not use this value directly" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/say.rst:29 +#: ../../doc/dev_guide/reference_capi/say.rst:45 +msgid "Format and print a message to Tarantool log file." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/say.rst:0 +#: ../../doc/dev_guide/reference_capi/say.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/say.rst:31 +msgid ":ref:`log level `" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/say.rst:32 +#: ../../doc/dev_guide/reference_capi/say.rst:47 +msgid "``printf()``-like format string" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/say.rst:33 +#: ../../doc/dev_guide/reference_capi/say.rst:48 +msgid "format arguments" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/say.rst:35 +#: ../../doc/dev_guide/reference_capi/say.rst:50 +msgid "See also :manpage:`printf(3)`, :ref:`say_level`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/say.rst:52 +msgid "**Example:**" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/say.rst:54 +msgid "say_info(\"Some useful information: %s\", status);" +msgstr "" diff --git a/locale/en/dev_guide/reference_capi/schema.pot b/locale/en/dev_guide/reference_capi/schema.pot new file mode 100644 index 0000000000..8e91c54f12 --- /dev/null +++ b/locale/en/dev_guide/reference_capi/schema.pot @@ -0,0 +1,89 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/reference_capi/schema.rst:3 +msgid "Module schema" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/schema.rst:11 +msgid "Start of the reserved range of system spaces." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/schema.rst:15 +msgid "Space id of _schema." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/schema.rst:19 +msgid "Space id of _space." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/schema.rst:23 +msgid "Space id of _vspace view." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/schema.rst:27 +msgid "Space id of _index." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/schema.rst:31 +msgid "Space id of _vindex view." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/schema.rst:35 +msgid "Space id of _func." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/schema.rst:39 +msgid "Space id of _vfunc view." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/schema.rst:43 +msgid "Space id of _user." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/schema.rst:47 +msgid "Space id of _vuser view." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/schema.rst:51 +msgid "Space id of _priv." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/schema.rst:55 +msgid "Space id of _vpriv view." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/schema.rst:59 +msgid "Space id of _cluster." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/schema.rst:63 +msgid "Space id of _trigger." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/schema.rst:67 +msgid "Space id of _truncate." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/schema.rst:71 +msgid "End of reserved range of system spaces." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/schema.rst:75 +msgid "NULL value, returned on error." +msgstr "" diff --git a/locale/en/dev_guide/reference_capi/trivia.pot b/locale/en/dev_guide/reference_capi/trivia.pot new file mode 100644 index 0000000000..e1d2f87f4f --- /dev/null +++ b/locale/en/dev_guide/reference_capi/trivia.pot @@ -0,0 +1,93 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/reference_capi/trivia.rst:3 +msgid "Module trivia/config" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/trivia.rst:7 +msgid "Extern modifier for all public functions." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/trivia.rst:11 +msgid "Package major version - 2 for 2.0.5." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/trivia.rst:15 +msgid "Package minor version - 0 for 2.0.5." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/trivia.rst:19 +msgid "Package patch version - 5 for 2.0.5." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/trivia.rst:23 +msgid "A string with major-minor-patch-commit-id identifier of the release, e.g. 2.0.5-75-gdd8e14ffb." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/trivia.rst:28 +msgid "System configuration dir (e.g ``/etc``)" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/trivia.rst:32 +msgid "Install prefix (e.g. ``/usr``)" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/trivia.rst:36 +msgid "Build type, e.g. Debug or Release" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/trivia.rst:40 +msgid "CMake build type signature, e.g. ``Linux-x86_64-Debug``" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/trivia.rst:44 +msgid "Command line used to run CMake." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/trivia.rst:48 +msgid "Paths to C and CXX compilers." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/trivia.rst:52 +msgid "C compile flags used to build Tarantool." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/trivia.rst:56 +msgid "CXX compile flags used to build Tarantool." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/trivia.rst:60 +msgid "A path to install ``*.lua`` module files." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/trivia.rst:64 +msgid "A path to install ``*.so``/``*.dylib`` module files." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/trivia.rst:68 +msgid "A path to Lua includes (the same directory where this file is contained)" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/trivia.rst:72 +msgid "A constant added to ``package.path`` in Lua to find ``*.lua`` module files." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/trivia.rst:76 +msgid "A constant added to ``package.cpath`` in Lua to find ``*.so`` module files." +msgstr "" diff --git a/locale/en/dev_guide/reference_capi/tuple.pot b/locale/en/dev_guide/reference_capi/tuple.pot new file mode 100644 index 0000000000..44062d2efa --- /dev/null +++ b/locale/en/dev_guide/reference_capi/tuple.pot @@ -0,0 +1,452 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:3 +msgid "Module tuple" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:11 +msgid "Tuple format." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:13 +msgid "Each Tuple has an associated format (class). Default format is used to create tuples which are not attached to any particular space." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:18 +msgid "Tuple" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:24 +msgid "Allocate and initialize a new tuple from raw MsgPack Array data." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:26 +msgid "tuple format. Use :ref:`box_tuple_format_default()` to create space-independent tuple." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:29 +msgid "tuple data in MsgPack Array format ([field1, field2, ...])" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:30 +msgid "the end of ``data``" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +#: ../../doc/dev_guide/reference_capi/tuple.rst:0 +msgid "Returns" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:32 +msgid "NULL on out of memory" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:33 +msgid "tuple otherwise" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:35 +msgid "See also: :doc:`/reference/reference_lua/box_tuple/new`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:39 +msgid "When working with tuples, it is the developer's responsibility to ensure that enough space is allocated, taking especial caution when writing to them with msgpuck functions such as ``mp_encode_array()``." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:48 +msgid "Increase the reference counter of tuple." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:50 +msgid "Tuples are reference counted. All functions that return tuples guarantee that the last returned tuple is reference counted internally until the next call to API function that yields or returns another tuple." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:54 +msgid "You should increase the reference counter before taking tuples for long processing in your code. The Lua garbage collector will not destroy a tuple that has references, even if another fiber removes them from a space. After processing, decrement the reference counter using :ref:`box_tuple_unref()`, otherwise the tuple will leak." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:62 +#: ../../doc/dev_guide/reference_capi/tuple.rst:75 +#: ../../doc/dev_guide/reference_capi/tuple.rst:85 +#: ../../doc/dev_guide/reference_capi/tuple.rst:91 +#: ../../doc/dev_guide/reference_capi/tuple.rst:110 +#: ../../doc/dev_guide/reference_capi/tuple.rst:125 +msgid "a tuple" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:64 +#: ../../doc/dev_guide/reference_capi/tuple.rst:103 +msgid "-1 on error" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:65 +msgid "0 otherwise" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:67 +msgid "See also: :ref:`box_tuple_unref()`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:73 +msgid "Decrease the reference counter of tuple." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:77 +msgid "See also: :ref:`box_tuple_ref()`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:83 +msgid "Return the number of fields in a tuple (the size of MsgPack Array)." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:89 +msgid "Return the number of bytes used to store internal tuple data (MsgPack Array)." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:95 +msgid "Dump raw MsgPack data to the memory buffer ``buf`` of size ``size``." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:97 +msgid "Store tuple fields in the memory buffer." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:99 +msgid "Upon successful return, the function returns the number of bytes written. If buffer size is not enough then the return value is the number of bytes which would have been written if enough space had been available." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:104 +msgid "number of bytes written on success." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:108 +msgid "Return the associated format." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:112 +msgid "tuple format" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:118 +msgid "Return the raw tuple field in MsgPack format. The result is a pointer to raw MessagePack data which can be decoded with mp_decode functions, for an example see the tutorial program :ref:`read.c `." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:123 +msgid "The buffer is valid until the next call to a ``box_tuple_*`` function." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:126 +msgid "zero-based index in MsgPack array." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:128 +msgid "NULL if i >= :ref:`box_tuple_field_count()`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:129 +msgid "msgpack otherwise" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:149 +msgid "Possible data types for tuple fields." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:151 +msgid "One cannot use STRS/ENUM macros for types because there is a mismatch between enum name (STRING) and type name literal (\"STR\"). STR is already used as a type in Objective C." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:159 +msgid "Key definition" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:163 +msgid "Create a key definition with the key fields with passed types on passed positions." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:165 +msgid "May be used for tuple format creation and/or tuple comparison." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:167 +msgid "array with key field identifiers" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:168 +msgid "array with key :ref:`field types `" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:169 +msgid "the number of key fields" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:171 +msgid "key definition on success" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:172 +#: ../../doc/dev_guide/reference_capi/tuple.rst:190 +msgid "NULL on error" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:176 +msgid "Delete a key definition" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:178 +msgid "key definition to delete" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:184 +msgid "Return new in-memory tuple format based on passed key definitions" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:186 +msgid "array of keys defined for the format" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:187 +msgid "count of keys" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:189 +msgid "new tuple format on success" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:194 +msgid "Increment tuple format reference count" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:196 +msgid "tuple format to ref" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:200 +msgid "Decrement tuple format reference count" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:202 +msgid "tuple format to unref" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:208 +msgid "Compare tuples using key definition" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:210 +msgid "the first tuple" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:211 +msgid "the second tuple" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:212 +#: ../../doc/dev_guide/reference_capi/tuple.rst:226 +msgid "key definition" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:214 +msgid "0 if ``key_fields(tuple_a)`` == ``key_fields(tuple_b)``" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:215 +msgid "<0 if ``key_fields(tuple_a)`` < ``key_fields(tuple_b)``" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:216 +msgid ">0 if ``key_fields(tuple_a)`` > ``key_fields(tuple_b)``" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:218 +#: ../../doc/dev_guide/reference_capi/tuple.rst:232 +msgid "See also: enum :ref:`field_type `" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:222 +msgid "Compare a tuple with a key using key definition" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:224 +msgid "tuple" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:225 +msgid "key with MessagePack array header" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:228 +msgid "0 if ``key_fields(tuple)`` == ``parts(key)``" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:229 +msgid "<0 if ``key_fields(tuple)`` < ``parts(key)``" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:230 +msgid ">0 if ``key_fields(tuple)`` > ``parts(key)``" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:236 +msgid "Tuple iterator" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:240 +msgid "Allocate and initialize a new tuple iterator. The tuple iterator allows iterating over fields at the root level of a MsgPack array." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:243 +msgid "**Example:**" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:245 +msgid "box_tuple_iterator_t* it = box_tuple_iterator(tuple);\n" +"if (it == NULL) {\n" +" // error handling using box_error_last()\n" +"}\n" +"const char* field;\n" +"while (field = box_tuple_next(it)) {\n" +" // process raw MsgPack data\n" +"}\n" +"\n" +"// rewind the iterator to the first position\n" +"box_tuple_rewind(it)\n" +"assert(box_tuple_position(it) == 0);\n" +"\n" +"// rewind three fields\n" +"field = box_tuple_seek(it, 3);\n" +"assert(box_tuple_position(it) == 4);\n" +"\n" +"box_iterator_free(it);" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:268 +msgid "Destroy and free tuple iterator" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:274 +msgid "Return zero-based next position in iterator. That is, this function returnы the field id of the field that will be returned by the next call to :ref:`box_tuple_next()`. Returned value is zero after initialization or rewind and :ref:`box_tuple_field_count()` after the end of iteration." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:281 +#: ../../doc/dev_guide/reference_capi/tuple.rst:288 +#: ../../doc/dev_guide/reference_capi/tuple.rst:303 +#: ../../doc/dev_guide/reference_capi/tuple.rst:324 +msgid "a tuple iterator" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:282 +msgid "position" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:286 +msgid "Rewind iterator to the initial position." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:290 +msgid "After: ``box_tuple_position(it) == 0``" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:294 +msgid "Seek the tuple iterator." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:296 +msgid "The result is a pointer to raw MessagePack data which can be decoded with mp_decode functions, for an example see the tutorial program :ref:`read.c `. The returned buffer is valid until the next call to ``box_tuple_*`` API. The requested ``field_no`` is returned by the next call to ``box_tuple_next(it)``." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:304 +msgid "field number - zero-based position in MsgPack array" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:307 +msgid "After:" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:309 +msgid "``box_tuple_position(it) == field_not`` if returned value is not NULL." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:310 +msgid "``box_tuple_position(it) == box_tuple_field_count(tuple)`` if returned value is NULL." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:317 +msgid "Return the next tuple field from tuple iterator." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:319 +msgid "The result is a pointer to raw MessagePack data which can be decoded with mp_decode functions, for an example see the tutorial program :ref:`read.c `. The returned buffer is valid until next call to ``box_tuple_*`` API." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:325 +msgid "NULL if there are no more fields" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:326 +msgid "MsgPack otherwise" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:328 +msgid "Before: :ref:`box_tuple_position()` is zero-based ID of returned field." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/tuple.rst:331 +msgid "After: ``box_tuple_position(it) == box_tuple_field_count(tuple)`` if returned value is NULL." +msgstr "" diff --git a/locale/en/dev_guide/reference_capi/txn.pot b/locale/en/dev_guide/reference_capi/txn.pot new file mode 100644 index 0000000000..69892565fe --- /dev/null +++ b/locale/en/dev_guide/reference_capi/txn.pot @@ -0,0 +1,82 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/reference_capi/txn.rst:3 +msgid "Module txn" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/txn.rst:7 +msgid "Return true if there is an active transaction." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/txn.rst:13 +msgid "Begin a transaction in the current fiber." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/txn.rst:15 +msgid "A transaction is attached to caller fiber, therefore one fiber can have only one active transaction. See also :doc:`/reference/reference_lua/box_txn_management/begin`." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/txn.rst:0 +#: ../../doc/dev_guide/reference_capi/txn.rst:0 +#: ../../doc/dev_guide/reference_capi/txn.rst:0 +#: ../../doc/dev_guide/reference_capi/txn.rst:0 +#: ../../doc/dev_guide/reference_capi/txn.rst:0 +msgid "Returns" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/txn.rst:18 +#: ../../doc/dev_guide/reference_capi/txn.rst:27 +msgid "0 on success" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/txn.rst:19 +msgid "-1 on error. Perhaps a transaction has already been started." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/txn.rst:25 +msgid "Commit the current transaction. See also :doc:`/reference/reference_lua/box_txn_management/commit`." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/txn.rst:28 +msgid "-1 on error. Perhaps a disk write failure" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/txn.rst:32 +msgid "Roll back the current transaction. See also :doc:`/reference/reference_lua/box_txn_management/rollback`." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/txn.rst:36 +msgid "Return a descriptor of a savepoint." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/txn.rst:40 +msgid "Roll back the current transaction as far as the specified savepoint." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/txn.rst:44 +msgid "Allocate memory on txn memory pool." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/txn.rst:46 +msgid "The memory is automatically deallocated when the transaction is committed or rolled back." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/txn.rst:49 +msgid "NULL on out of memory" +msgstr "" diff --git a/locale/en/dev_guide/reference_capi/utils.pot b/locale/en/dev_guide/reference_capi/utils.pot new file mode 100644 index 0000000000..bdfe069905 --- /dev/null +++ b/locale/en/dev_guide/reference_capi/utils.pot @@ -0,0 +1,226 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/dev_guide/reference_capi/utils.rst:3 +msgid "Module lua/utils" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:9 +msgid "Push cdata of given ``ctypeid`` onto the stack." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:11 +msgid "CTypeID must be used from FFI at least once. Allocated memory returned uninitialized. Only numbers and pointers are supported." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:14 +#: ../../doc/dev_guide/reference_capi/utils.rst:27 +#: ../../doc/dev_guide/reference_capi/utils.rst:42 +#: ../../doc/dev_guide/reference_capi/utils.rst:49 +#: ../../doc/dev_guide/reference_capi/utils.rst:62 +#: ../../doc/dev_guide/reference_capi/utils.rst:74 +#: ../../doc/dev_guide/reference_capi/utils.rst:81 +#: ../../doc/dev_guide/reference_capi/utils.rst:116 +#: ../../doc/dev_guide/reference_capi/utils.rst:128 +msgid "Lua State" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:15 +msgid "FFI's CTypeID of this cdata" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +msgid "Returns" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:17 +#: ../../doc/dev_guide/reference_capi/utils.rst:31 +msgid "memory associated with this cdata" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:19 +msgid "See also: :ref:`luaL_checkcdata()`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:25 +msgid "Check whether the function argument ``idx`` is a cdata." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:28 +#: ../../doc/dev_guide/reference_capi/utils.rst:43 +msgid "stack index" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:29 +msgid "output argument. FFI's CTypeID of returned cdata" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:33 +msgid "See also: :ref:`luaL_pushcdata()`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:37 +msgid "Set finalizer function on a cdata object." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:39 +msgid "Equivalent to call `ffi.gc(obj, function)`. Finalizer function must be on the top of the stack." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:47 +msgid "Return CTypeID (FFI) of given СDATA type." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:50 +msgid "C type name as string (e.g. \"struct request\" or \"uint32_t\")" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:53 +msgid "CTypeID" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:55 +msgid "See also: :ref:`luaL_pushcdata()`, :ref:`luaL_checkcdata()`" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:60 +msgid "Declare symbols for FFI." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:63 +msgid "C definitions (e.g. \"struct stat\")" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:65 +msgid "0 on success" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:66 +msgid "``LUA_ERRRUN``, ``LUA_ERRMEM`` or ``LUA_ERRERR`` otherwise." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:68 +msgid "See also: ``ffi.cdef(def)``" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:72 +msgid "Push uint64_t onto the stack." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:75 +#: ../../doc/dev_guide/reference_capi/utils.rst:82 +msgid "value to push" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:79 +msgid "Push int64_t onto the stack." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:86 +#: ../../doc/dev_guide/reference_capi/utils.rst:100 +msgid "Check whether the argument idx is a uint64 or a convertible string and returns this number." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +#: ../../doc/dev_guide/reference_capi/utils.rst:0 +msgid "throws" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:89 +#: ../../doc/dev_guide/reference_capi/utils.rst:96 +msgid "error if the argument can't be converted" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:93 +#: ../../doc/dev_guide/reference_capi/utils.rst:107 +msgid "Check whether the argument idx is a int64 or a convertible string and returns this number." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:103 +#: ../../doc/dev_guide/reference_capi/utils.rst:110 +msgid "the converted number or 0 of argument can't be converted" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:114 +msgid "Push a tuple onto the stack." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:118 +msgid "error on OOM" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:120 +msgid "See also: :ref:`luaT_istuple `" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:126 +msgid "Check whether ``idx`` is a tuple." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:129 +msgid "the stack index" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:131 +msgid "non-NULL if ``idx`` is a tuple" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:132 +msgid "NULL if ``idx`` is not a tuple" +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:136 +msgid "Re-throw the last Tarantool error as a Lua object." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:138 +msgid "See also: `lua_error() `_," +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:139 +msgid ":ref:`box_error_last() `." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:143 +msgid "Similar to `lua_cpcall() `_, but with the proper support of Tarantool errors." +msgstr "" + +#: ../../doc/dev_guide/reference_capi/utils.rst:148 +msgid "Get the global Lua state used by Tarantool." +msgstr "" diff --git a/locale/en/enterprise/admin.pot b/locale/en/enterprise/admin.pot new file mode 100644 index 0000000000..971c21873c --- /dev/null +++ b/locale/en/enterprise/admin.pot @@ -0,0 +1,21 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/admin.rst:4 +msgid "Cluster administrator's guide" +msgstr "" diff --git a/locale/en/enterprise/audit.pot b/locale/en/enterprise/audit.pot new file mode 100644 index 0000000000..876188658f --- /dev/null +++ b/locale/en/enterprise/audit.pot @@ -0,0 +1,224 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/audit.rst:2 +msgid "Security audit" +msgstr "" + +#: ../../doc/enterprise/audit.rst:4 +msgid "This document will help you audit the security of a Tarantool cluster. It explains certain security aspects, their rationale, and the ways to check them. For details on how to configure Tarantool Enterprise Edition and its infrastructure for each aspect, refer to the :doc:`security hardening guide `." +msgstr "" + +#: ../../doc/enterprise/audit.rst:10 +msgid "Encryption of external iproto traffic" +msgstr "" + +#: ../../doc/enterprise/audit.rst:12 +msgid "Tarantool uses the :doc:`iproto binary protocol ` for replicating data between instances and also in the connector libraries." +msgstr "" + +#: ../../doc/enterprise/audit.rst:16 +msgid "Since version 2.10.0, the Enterprise Edition has the built-in support for using SSL to encrypt the client-server communications over binary connections. For details on enabling SSL encryption, see the :ref:`enterprise-iproto-encryption` section of this document." +msgstr "" + +#: ../../doc/enterprise/audit.rst:19 +msgid "In case the built-in encryption is not enabled, we recommend using VPN to secure data exchange between data centers." +msgstr "" + +#: ../../doc/enterprise/audit.rst:22 +msgid "Closed iproto ports" +msgstr "" + +#: ../../doc/enterprise/audit.rst:24 +msgid "When a Tarantool cluster does not use iproto for external requests, connections to the iproto ports should be allowed only between Tarantool instances." +msgstr "" + +#: ../../doc/enterprise/audit.rst:27 +msgid "For more details on configuring ports for iproto, see the ``advertise_uri`` section in the Cartridge documentation." +msgstr "" + +#: ../../doc/enterprise/audit.rst:32 +msgid "HTTPS connection termination" +msgstr "" + +#: ../../doc/enterprise/audit.rst:34 +msgid "A Tarantool instance can accept HTTP connections from external services or access the administrative web UI. All such connections must go through an HTTPS-providing web server, running on the same host, such as nginx. This requirement is for both virtual and physical hosts. Running HTTP traffic through a few separate hosts with HTTPS termination is not sufficiently secure." +msgstr "" + +#: ../../doc/enterprise/audit.rst:44 +msgid "Closed HTTP ports" +msgstr "" + +#: ../../doc/enterprise/audit.rst:48 +msgid "Tarantool accepts HTTP connections on a specific port. It must be only available on the same host for nginx to connect to it." +msgstr "" + +#: ../../doc/enterprise/audit.rst:51 +msgid "Check that the configured HTTP port is closed and that the HTTPS port (``443`` by default) is open." +msgstr "" + +#: ../../doc/enterprise/audit.rst:55 +msgid "Restricted access to the administrative console" +msgstr "" + +#: ../../doc/enterprise/audit.rst:57 +msgid "The :doc:`console ` module provides a way to connect to a running instance and run custom Lua code. This can be useful for development and administration. The following code examples open connections on a TCP port and on a UNIX socket." +msgstr "" + +#: ../../doc/enterprise/audit.rst:62 +msgid "console.listen()\n" +"console.listen('/var/lib/tarantool/socket_name.sock')" +msgstr "" + +#: ../../doc/enterprise/audit.rst:67 +msgid "Opening an administrative console through a TCP port is always unsafe. Check that there are no calls like ``console.listen()`` in the code." +msgstr "" + +#: ../../doc/enterprise/audit.rst:71 +msgid "Connecting through a socket requires having the write permission on the ``/var/lib/tarantool`` directory. Check that write permission to this directory is limited to the ``tarantool`` user." +msgstr "" + +#: ../../doc/enterprise/audit.rst:76 +msgid "Limiting the guest user" +msgstr "" + +#: ../../doc/enterprise/audit.rst:78 +msgid "Connecting to the instance with ``tt connect`` or ``tarantoolctl connect`` without user credentials (under the ``guest`` user) must be disabled." +msgstr "" + +#: ../../doc/enterprise/audit.rst:81 +msgid "There are two ways to check this vulnerability:" +msgstr "" + +#: ../../doc/enterprise/audit.rst:83 +msgid "Check that the source code doesn't grant access to the ``guest`` user. The corresponding code can look like this:" +msgstr "" + +#: ../../doc/enterprise/audit.rst:86 +msgid "box.schema.user.grant('guest',\n" +" 'read,write',\n" +" 'universe',\n" +" nil, { if_not_exists = true }\n" +")" +msgstr "" + +#: ../../doc/enterprise/audit.rst:94 +msgid "Besides searching for the whole code pattern, search for any entries of ``'universe'``." +msgstr "" + +#: ../../doc/enterprise/audit.rst:97 +msgid "Try connecting with ``tt connect`` to each Tarantool node." +msgstr "" + +#: ../../doc/enterprise/audit.rst:99 +msgid "For more details, refer to the documentation on :ref:`access control `." +msgstr "" + +#: ../../doc/enterprise/audit.rst:103 +msgid "Authorization in the web UI" +msgstr "" + +#: ../../doc/enterprise/audit.rst:105 +msgid "Using the web interface must require logging in with a username and password." +msgstr "" + +#: ../../doc/enterprise/audit.rst:108 +msgid "Running under the tarantool user" +msgstr "" + +#: ../../doc/enterprise/audit.rst:110 +msgid "All Tarantool instances should be running under the ``tarantool`` user." +msgstr "" + +#: ../../doc/enterprise/audit.rst:113 +msgid "Limiting access to the tarantool user" +msgstr "" + +#: ../../doc/enterprise/audit.rst:115 +msgid "The ``tarantool`` user must be a non-privileged user without the ``sudo`` permission. Also, it must not have a password set to prevent logging in via SSH or ``su``." +msgstr "" + +#: ../../doc/enterprise/audit.rst:120 +msgid "Keeping two or more snapshots" +msgstr "" + +#: ../../doc/enterprise/audit.rst:122 +msgid "In order to have a reliable backup, a Tarantool instance must keep two or more latest snapshots. This should be checked on each Tarantool instance." +msgstr "" + +#: ../../doc/enterprise/audit.rst:126 +msgid "The :ref:`snapshot_count ` value determines the number of kept snapshots. Configuration values are primarily set in the configuration files but can be overridden with environment variables and command-line arguments. So, it's best to check both the values in the configuration files and the actual values using the console:" +msgstr "" + +#: ../../doc/enterprise/audit.rst:133 +msgid "tarantool> box.cfg.checkpoint_count\n" +"---\n" +"- 2" +msgstr "" + +#: ../../doc/enterprise/audit.rst:141 +msgid "Enabled write-ahead logging (WAL)" +msgstr "" + +#: ../../doc/enterprise/audit.rst:143 +msgid "Tarantool records all incoming data in the write-ahead log (WAL). The WAL must be enabled to ensure that data will be recovered in case of a possible instance restart." +msgstr "" + +#: ../../doc/enterprise/audit.rst:147 +msgid "Secure values of ``wal_mode`` are ``write`` and ``fsync``:" +msgstr "" + +#: ../../doc/enterprise/audit.rst:149 +msgid "tarantool> box.cfg.wal_mode\n" +"---\n" +"- write" +msgstr "" + +#: ../../doc/enterprise/audit.rst:155 +msgid "An exclusion from this requirement is when the instance is processing data, which can be freely rejected. For example, when Tarantool is used for caching. Then WAL can be disabled to reduce i/o load." +msgstr "" + +#: ../../doc/enterprise/audit.rst:160 +msgid "For more details, see the :ref:`wal_mode reference `." +msgstr "" + +#: ../../doc/enterprise/audit.rst:164 +msgid "The logging level is INFO or higher" +msgstr "" + +#: ../../doc/enterprise/audit.rst:166 +msgid "The logging level should be set to 5 (``INFO``), 6 (``VERBOSE``), or 7 (``DEBUG``). Application logs will then have enough information to research a possible security breach." +msgstr "" + +#: ../../doc/enterprise/audit.rst:169 +msgid "tarantool> box.cfg.log_level\n" +"---\n" +"- 5" +msgstr "" + +#: ../../doc/enterprise/audit.rst:175 +msgid "For a full list of logging levels, see the :ref:`log_level reference `." +msgstr "" + +#: ../../doc/enterprise/audit.rst:180 +msgid "Logging with journald" +msgstr "" + +#: ../../doc/enterprise/audit.rst:182 +msgid "Tarantool should use ``journald`` for logging." +msgstr "" diff --git a/locale/en/enterprise/audit_log.pot b/locale/en/enterprise/audit_log.pot new file mode 100644 index 0000000000..3281a7a8fa --- /dev/null +++ b/locale/en/enterprise/audit_log.pot @@ -0,0 +1,1042 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/audit_log.rst:4 +msgid "Audit module" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:6 +msgid "The audit module available in Tarantool Enterprise Edition writes messages that record Tarantool events in plain text, CSV, or JSON format." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:8 +msgid "It provides detailed reports of security-related activities and helps you find and fix breaches to protect your business. For example, you can see who created a new user and when:" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:12 +msgid "{\n" +" \"time\": \"2022-04-07T13:39:36.046+0300\",\n" +" \"remote\": \"\",\n" +" \"session_type\": \"background\",\n" +" \"module\": \"tarantool\",\n" +" \"user\": \"admin\",\n" +" \"type\": \"user_create\",\n" +" \"tag\": \"\",\n" +" \"description\": \"Create user alice\"\n" +"}" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:25 +msgid "It is up to each company to decide exactly what activities to audit and what actions to take. System administrators, security engineers, and people in charge of the company may want to audit different events for different reasons. Tarantool provides such an option for each of them." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:32 +msgid "Audit log events" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:34 +msgid "The Tarantool audit log module can record various events that you can monitor and decide whether you need to take actions:" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:37 +msgid "Admin activity -- events related to actions performed by the administrator. For example, such logs record the creation of a user." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:40 +msgid "Access events -- events related to authorization and authentication of users. For example, such logs record failed attempts to access secure data." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:43 +msgid "Data access and modification -- events of data manipulation in the storage." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:45 +msgid "System events -- events related to modification or configuration of resources. For example, such logs record the replacement of a space." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:48 +msgid ":ref:`User-defined events `-- any events added manually using the audit module API." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:51 +msgid "The full list of available audit log events is provided in the table below:" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:59 +msgid "Event" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:60 +msgid "Type of event written to the audit log" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:61 +msgid "Example of an event description" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:62 +msgid "Audit log enabled for events" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:63 +msgid "``audit_enable``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:65 +msgid ":ref:`User-defined events `" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:66 +msgid "``custom``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:68 +msgid "User authorized successfully" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:69 +msgid "``auth_ok``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:70 +msgid "``Authenticate user ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:71 +msgid "User authorization failed" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:72 +msgid "``auth_fail``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:73 +msgid "``Failed to authenticate user ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:74 +msgid "User logged out or quit the session" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:75 +msgid "``disconnect``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:76 +msgid "``Close connection``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:77 +msgid "User created" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:78 +msgid "``user_create``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:79 +msgid "``Create user ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:80 +msgid "User dropped" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:81 +msgid "``user_drop``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:82 +msgid "``Drop user ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:83 +msgid "Role created" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:84 +msgid "``role_create``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:85 +msgid "``Create role ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:86 +msgid "Role dropped" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:87 +msgid "``role_drop``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:88 +msgid "``Drop role ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:89 +msgid "User disabled" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:90 +msgid "``user_disable``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:91 +msgid "``Disable user ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:92 +msgid "User enabled" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:93 +msgid "``user_enable``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:94 +msgid "``Enable user ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:95 +msgid "User granted rights" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:96 +msgid "``user_grant_rights``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:97 +msgid "``Grant rights for to user ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:98 +msgid "User revoked rights" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:99 +msgid "``user_revoke_rights``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:100 +msgid "``Revoke rights for from user ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:101 +msgid "Role granted rights" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:102 +msgid "``role_grant_rights``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:103 +msgid "``Grant rights for to role ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:104 +msgid "Role revoked rights" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:105 +msgid "``role_revoke_rights``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:106 +msgid "``Revoke rights for from role ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:107 +msgid "User password changed" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:108 +msgid "``password_change``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:109 +msgid "``Change password for user ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:110 +msgid "Failed attempt to access secure data (personal records, details, geolocation, etc.)" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:111 +msgid "``access_denied``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:112 +msgid "`` denied to ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:113 +msgid "Expressions with arguments evaluated in a string" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:114 +msgid "``eval``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:115 +msgid "``Evaluate expression ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:116 +msgid "Function called with arguments" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:117 +msgid "``call``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:118 +msgid "``Call function with arguments ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:119 +msgid "Iterator key selected from ``space.index``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:120 +msgid "``space_select``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:121 +msgid "``Select from .``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:122 +msgid "Space created" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:123 +msgid "``space_create``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:124 +msgid "``Create space ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:125 +msgid "Space altered" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:126 +msgid "``space_alter``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:127 +msgid "``Alter space ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:128 +msgid "Space dropped" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:129 +msgid "``space_drop``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:130 +msgid "``Drop space ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:131 +msgid "Tuple inserted into space" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:132 +msgid "``space_insert``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:133 +msgid "``Insert tuple into space ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:134 +msgid "Tuple replaced in space" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:135 +msgid "``space_replace``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:136 +msgid "``Replace tuple with in space ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:137 +msgid "Tuple deleted from space" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:138 +msgid "``space_delete``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:139 +msgid "``Delete tuple from space ``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:144 +msgid "The ``eval`` event displays data from the ``console`` module and the ``eval`` function of the ``net.box`` module. For more on how they work, see :ref:`Module console ` and :ref:`Module net.box -- eval `. To separate the data, specify ``console`` or ``binary`` in the session field." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:153 +msgid "Event groups" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:155 +msgid "You can simplify working with audit log events by using built-in event groups. For example, you can set to record only events related to the enabling of the audit log, or only events related to a space." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:159 +msgid "Tarantool provides the following event groups:" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:161 +msgid "``all`` -- all :ref:`events `." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:165 +msgid "Events ``call`` and ``eval`` are included only into the ``all`` group." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:167 +msgid "``audit`` -- ``audit_enable`` event." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:169 +msgid "``auth`` -- authorization events: ``auth_ok``, ``auth_fail``." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:171 +msgid "``priv`` -- events related to authentication, authorization, users, and roles: ``user_create``, ``user_drop``, ``role_create``, ``role_drop``, ``user_enable``, ``user_disable``, ``user_grant_rights``, ``user_revoke_rights``, ``role_grant_rights``, ``role_revoke_rights``." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:175 +msgid "``ddl`` -- events of space creation, altering, and dropping: ``space_create``, ``space_alter``, ``space_drop``." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:178 +msgid "``dml`` -- events of data modification in spaces: ``space_insert``, ``space_replace``, ``space_delete``." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:181 +msgid "``data_operations`` -- events of data modification or selection from spaces: ``space_select``, ``space_insert``, ``space_replace``, ``space_delete``." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:184 +msgid "``compatibility`` -- events available in Tarantool before the version 2.10.0. ``auth_ok``, ``auth_fail``, ``disconnect``, ``user_create``, ``user_drop``, ``role_create``, ``role_drop``, ``user_enable``, ``user_disable``, ``user_grant_rights``, ``user_revoke_rights``, ``role_grant_rights``. ``role_revoke_rights``, ``password_change``, ``access_denied``. This group enables the compatibility with earlier Tarantool versions." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:193 +msgid "Be careful when recording ``all`` and ``data_operations`` event groups. The more events you record, the slower the requests will be processed over time. It is recommended that you select only those groups whose events your company really needs to monitor and analyze." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:201 +msgid "Structure of audit log events" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:203 +msgid "Each audit log event contains several fields to make it easy to filter and aggregate the resulting logs. They are described in the following table." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:212 +msgid "Field" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:213 +msgid "Description" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:214 +msgid "Example of a log field display" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:215 +msgid "``time``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:216 +msgid "Time of the event" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:217 +msgid "2022-04-07T13:20:05.327+0300" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:218 +msgid "``remote``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:219 +msgid "Remote host that triggered the event" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:220 +msgid "100.96.163.226:48722" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:221 +msgid "``session_type``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:222 +msgid "Session type" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:223 +msgid "console" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:224 +msgid "``module``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:225 +msgid "Audit log module. Set to ``tarantool`` for system events; can be overwritten for user-defined events" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:227 +msgid "tarantool" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:228 +msgid "``user``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:229 +msgid "User who triggered the event" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:230 +msgid "admin" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:231 +msgid "``type``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:232 +msgid "Audit event type" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:233 +msgid "access_denied" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:234 +msgid "``tag``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:235 +msgid "A text field that can be overwritten by the user" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:237 +msgid "``description``" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:238 +msgid "Human-readable event description" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:239 +msgid "Authenticate user Alice" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:243 +msgid "You can set all these parameters only once. Unlike many other parameters in ``box.cfg``, they cannot be changed." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:249 +msgid "Enable the Tarantool audit log" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:251 +msgid "By default, audit logging is disabled. To enable audit logging, define the logs location by setting the ``box.cfg.audit_log`` option. Tarantool can write audit logs to a file, to a pipe, or to the system logger." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:255 +msgid "To disable audit logging, set the ``audit_log`` option to ``nil``." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:258 +msgid "Write to a file" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:260 +msgid "box.cfg{audit_log = 'audit_tarantool.log'}\n" +"-- or\n" +"box.cfg{audit_log = 'file:audit_tarantool.log'}" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:266 +msgid "This opens the ``audit_tarantool.log`` file for output in the server’s default directory. If the ``audit_log`` string has no prefix or the prefix ``file:``, the string is interpreted as a file path." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:270 +msgid "Send to a pipe" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:272 +msgid "box.cfg{audit_log = '| cronolog audit_tarantool.log'}\n" +"-- or\n" +"box.cfg{audit_log = 'pipe: cronolog audit_tarantool.log'}'" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:278 +msgid "This starts the `cronolog `_ program when the server starts and sends all ``audit_log`` messages to cronolog's standard input (``stdin``). If the ``audit_log`` string starts with '|' or contains the prefix ``pipe:``, the string is interpreted as a Unix `pipeline `_." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:284 +msgid "Send to syslog" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:288 +msgid "Below is an example of writing audit logs to a directory shared with the system logs. Tarantool allows this option, but it is not recommended to do this to avoid difficulties when working with audit logs. System and audit logs should be written separately. To do this, create separate paths and specify them." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:293 +msgid "This example setting sends the audit log to syslog:" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:295 +msgid "box.cfg{audit_log = 'syslog:identity=tarantool'}\n" +"-- or\n" +"box.cfg{audit_log = 'syslog:facility=user'}\n" +"-- or\n" +"box.cfg{audit_log = 'syslog:identity=tarantool,facility=user'}\n" +"-- or\n" +"box.cfg{audit_log = 'syslog:server=unix:/dev/log'}" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:305 +msgid "If the ``audit_log`` string starts with \"syslog:\", it is interpreted as a message for the `syslogd `_ program, which normally runs in the background of any Unix-like platform. The setting can be 'syslog:', 'syslog:facility=...', 'syslog:identity=...', 'syslog:server=...' or a combination." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:310 +msgid "The ``syslog:identity`` setting is an arbitrary string that is placed at the beginning of all messages. The default value is ``tarantool``." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:313 +msgid "The ``syslog:facility`` setting is currently ignored, but will be used in the future. The value must be one of the `syslog `_ keywords that tell ``syslogd`` where to send the message. The possible values are ``auth``, ``authpriv``, ``cron``, ``daemon``, ``ftp``, ``kern``, ``lpr``, ``mail``, ``news``, ``security``, ``syslog``, ``user``, ``uucp``, ``local0``, ``local1``, ``local2``, ``local3``, ``local4``, ``local5``, ``local6``, ``local7``. The default value is ``local7``." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:321 +msgid "The ``syslog:server`` setting is the locator for the syslog server. It can be a Unix socket path starting with \"unix:\" or an ipv4 port number. The default socket value is ``/dev/log`` (on Linux) or ``/var/run/syslog`` (on Mac OS). The default port value is 514, which is the UDP port." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:326 +msgid "If you log to a file, Tarantool will reopen the audit log at `SIGHUP `_. If log is a program, its pid is stored in the ``audit_log.logger_pid`` variable. You need to send it a signal to rotate logs." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:330 +msgid "An example of a Tarantool audit log entry in the syslog:" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:332 +msgid "{\n" +" \"__CURSOR\" : \"s=81564632436a4de590e80b89b0151148;i=11519;b=def80c1464fe49d1aac8a64895d6614d;m=8c825ebfc;t=5edb27a75f282;x=7eba320f7cc9ae4d\",\n" +" \"__REALTIME_TIMESTAMP\" : \"1668725698065026\",\n" +" \"__MONOTONIC_TIMESTAMP\" : \"37717666812\",\n" +" \"_BOOT_ID\" : \"def80c1464fe49d1aac8a64895d6614d\",\n" +" \"_UID\" : \"1003\",\n" +" \"_GID\" : \"1004\",\n" +" \"_COMM\" : \"tarantool\",\n" +" \"_EXE\" : \"/app/tarantool/dist/tdg-2.6.4.0.x86_64/tarantool\",\n" +" \"_CMDLINE\" : \"tarantool init.lua : core-03\",\n" +" \"_CAP_EFFECTIVE\" : \"0\",\n" +" \"_AUDIT_SESSION\" : \"1\",\n" +" \"_AUDIT_LOGINUID\" : \"1003\",\n" +" \"_SYSTEMD_CGROUP\" : \"/user.slice/user-1003.slice/user@1003.service/app.slice/app@core-03.service\",\n" +" \"_SYSTEMD_OWNER_UID\" : \"1003\",\n" +" \"_SYSTEMD_UNIT\" : \"user@1003.service\",\n" +" \"_SYSTEMD_USER_UNIT\" : \"app@core-03.service\",\n" +" \"_SYSTEMD_SLICE\" : \"user-1003.slice\",\n" +" \"_SYSTEMD_USER_SLICE\" : \"app.slice\",\n" +" \"_SYSTEMD_INVOCATION_ID\" : \"be368b4243d842ea8c06b010e0df62c2\",\n" +" \"_MACHINE_ID\" : \"2e2339725deb4bc198c54ff4a2e8d626\",\n" +" \"_HOSTNAME\" : \"vm-0.test.env\",\n" +" \"_TRANSPORT\" : \"syslog\",\n" +" \"PRIORITY\" : \"6\",\n" +" \"SYSLOG_FACILITY\" : \"23\",\n" +" \"SYSLOG_IDENTIFIER\" : \"tarantool\",\n" +" \"SYSLOG_PID\" : \"101562\",\n" +" \"_PID\" : \"101562\",\n" +" \"MESSAGE\" : \"remote: session_type:background module:common.admin.auth user: type:custom_tdg_audit tag:tdg_severity_INFO description:[119eae0e-a691-42cc-9b4c-f14c499e6726] subj: \\\"anonymous\\\", msg: \\\"Access granted to anonymous user\\\"\",\n" +" \"_SOURCE_REALTIME_TIMESTAMP\" : \"1668725698064202\"\n" +"}" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:369 +msgid "Select events to write to audit log" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:371 +msgid "Tarantool's extensive filtering options help you write only the events you need to the audit log." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:373 +msgid "To select events to write to audit log, use the ``box.cfg.audit_filter`` option. Its value can be a list of events and event groups. The default value for the ``box.cfg.audit_filter`` option is ``compatibility``, which enables logging of all events available before 2.10.0." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:378 +msgid "box.cfg{\n" +" audit_log = 'audit.log',\n" +" audit_filter = 'audit,auth,priv,password_change,access_denied'\n" +" }" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:388 +msgid "Customize your filters" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:390 +msgid "You can customize the filters and use different combinations of filters for your purposes." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:393 +msgid "Filter based on a specific event" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:395 +msgid "You can set only certain events that you need to record." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:397 +msgid "For example, select ``password_change`` to monitor the users who have changed their passwords." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:399 +msgid "box.cfg{\n" +" audit_log = 'audit.log',\n" +" audit_filter = 'password_change'\n" +" }" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:407 +msgid "Filter based on a specific group" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:409 +msgid "You can set one of the groups of events that you need to record." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:411 +msgid "For example, select ``compatibility`` to monitor only events of user authorization, granted privileges, disconnection, user password change, and denied access." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:414 +msgid "box.cfg{\n" +" audit_log = 'audit.log',\n" +" audit_filter = 'compatibility'\n" +" }" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:422 +msgid "Filter based on multiple groups" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:424 +msgid "You can specify multiple groups depending on the purpose." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:426 +msgid "For example, select ``auth`` and ``priv`` to see only events related to authorization and granted privileges." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:428 +msgid "box.cfg{\n" +" audit_log = 'audit.log',\n" +" audit_filter = 'auth,priv'\n" +" }" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:436 +msgid "Filter based on a group and a specific event" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:438 +msgid "You can specify a group and a certain event depending on the purpose." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:440 +msgid "For example, you can select ``priv`` and ``disconnect`` to see only events related to granted privileges and disconnect events." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:443 +msgid "box.cfg{\n" +" audit_log = 'audit.log',\n" +" audit_filter = 'priv,disconnect'\n" +" }" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:451 +#: ../../doc/enterprise/audit_log.rst:569 +#: ../../doc/enterprise/audit_log.rst:604 +msgid "Example" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:453 +msgid "Run the command to filter:" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:455 +msgid "local audit = require('audit')\n" +"\n" +"box.cfg{audit_log = 'audit.log', audit_filter = 'custom,user_create', audit_format = 'csv'}\n" +"-- The Tarantool audit module writes the event because a filter is set for it\n" +"box.schema.user.create('alice')\n" +"-- The Tarantool audit module will not write the event because no filter is set for it\n" +"box.schema.user.drop('alice')" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:468 +msgid "Configure a blocking mode" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:470 +msgid "By default, the ``audit_nonblock`` option is set to ``true`` and Tarantool will not block during logging if the system is not ready to write, dropping the message instead. Using this value may improve logging performance at the cost of losing some log messages. This option only has an effect if the output goes to ``syslog:`` or ``pipe:``. Setting ``audit_nonblock`` to ``true`` is not allowed if the output is to a file. In this case, set ``audit_nonblock`` to ``false``." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:480 +msgid "Configure the format of audit log events" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:482 +msgid "You can choose the format of audit log events -- plain text, CSV or JSON format." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:484 +msgid "Plain text is used by default. This human-readable format can be efficiently compressed. The JSON format is more convenient to receive log events, analyze them and integrate them with other systems if needed. Using the CSV format allows you to view audit log events in tabular form." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:488 +msgid "Use these commands to configure the format of audit log events in Tarantool." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:491 +msgid "Plain text" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:493 +msgid "box.cfg{audit_log = 'audit.log', audit_format = 'plain'}" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:497 +#: ../../doc/enterprise/audit_log.rst:517 +#: ../../doc/enterprise/audit_log.rst:539 +msgid "Example:" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:499 +msgid "remote:\n" +"session_type:background\n" +"module:common.admin.auth\n" +"user: type:custom_tdg_audit\n" +"tag:tdg_severity_INFO\n" +"description:[5e35b406-4274-4903-857b-c80115275940]\n" +"subj: \"anonymous\",\n" +"msg: \"Access granted to anonymous user\"" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:511 +msgid "JSON format" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:513 +msgid "box.cfg{audit_log = 'audit.log', audit_format = 'json'}" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:519 +msgid "{\n" +" \"time\": \"2022-11-17T21:55:49.880+0300\",\n" +" \"remote\": \"\",\n" +" \"session_type\": \"background\",\n" +" \"module\": \"common.admin.auth\",\n" +" \"user\": \"\",\n" +" \"type\": \"custom_tdg_audit\",\n" +" \"tag\": \"tdg_severity_INFO\",\n" +" \"description\": \"[c26cd11a-3342-4ce6-8f0b-a4b222268b9d] subj: \\\"anonymous\\\", msg: \\\"Access granted to anonymous user\\\"\"\n" +"}" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:533 +msgid "CSV format" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:535 +msgid "box.cfg{audit_log = 'audit.log', audit_format = 'csv'}" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:541 +msgid "2022-11-17T21:58:03.131+0300,,background,common.admin.auth,,,custom_tdg_audit,tdg_severity_INFO,\"[b3dfe2a3-ec29-4e61-b747-eb2332c83b2e] subj: \"\"anonymous\"\", msg: \"\"Access granted to anonymous user\"\"\"" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:548 +msgid "Create user-defined events" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:550 +msgid "Tarantool provides an API for writing user-defined audit log events." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:552 +msgid "To add a new event, use the ``audit.log()`` function that takes one of the following values:" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:554 +msgid "Message string. Printed to the audit log with type ``message``. Example: ``audit.log('Hello, World!')``." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:556 +msgid "Format string and arguments. Passed to string format and then output to the audit log with type message. Example: ``audit.log('Hello, %s!', 'World')``." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:559 +msgid "Table with audit log field values. The table must contain at least one field -- description. Example: ``audit.log({type = 'custom_hello', description = 'Hello, World!'})``." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:562 +msgid "Using the field ``audit.new()``, you can create a new log module that allows you to avoid passing all custom audit log fields each time ``audit.log()`` is called. It takes a table of audit log field values (same as ``audit.log()``). The ``type`` of the log module for writing user-defined events must either be ``message`` or have the ``custom_`` prefix." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:571 +msgid "local my_audit = audit.new({type = 'custom_hello', module = 'my_module'})\n" +"my_audit:log('Hello, Alice!')\n" +"my_audit:log({tag = 'admin', description = 'Hello, Bob!'})\n" +"\n" +"-- is equivalent to\n" +"audit.log({type = 'custom_hello', module = 'my_module',\n" +" description = 'Hello, Alice!' })\n" +"audit.log({type = 'custom_hello', module = 'my_module',\n" +" tag = 'admin', description = 'Hello, Bob!'})" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:584 +msgid "Some user-defined audit log fields (``time``, ``remote``, ``session_type``) are set in the same way as for a system event. If a field is not overwritten, it is set to the same value as for a system event." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:588 +msgid "Some audit log fields you can overwrite with ``audit.new()`` and ``audit.log()``:" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:590 +msgid "type" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:591 +msgid "user" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:592 +msgid "module" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:593 +msgid "tag" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:594 +msgid "description" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:598 +msgid "To avoid confusion with system events, the value of the type field must either be ``message`` (default) or begin with ``custom_``. Otherwise you will get the error message. User-defined events are filtered out by default. To enable user-defined audit log events, you must add ``custom`` to ``box.cfg.audit_filter``." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:606 +msgid "local audit = require('audit')\n" +"\n" +"box.cfg{audit_log = 'audit.log', audit_filter = 'custom', audit_format = 'csv'}\n" +"audit.log('Hello, Alice!')\n" +"audit.log('Hello, %s!', 'Bob')\n" +"audit.log({type = 'custom_hello', description = 'Hello, Eve!'})\n" +"audit.log({type = 'custom_farewell', user = 'eve', module = 'custom', description = 'Farewell, Eve!'})\n" +"\n" +"local my_audit = audit.new({module = 'my_module', tag = 'default'})\n" +"my_audit:log({description = 'Message 1'})\n" +"my_audit:log({description = 'Message 2', tag = 'my_tag'})\n" +"my_audit:log({description = 'Message 3', module = 'other_module'})" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:624 +msgid "Use read commands" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:626 +msgid "To easily read the audit log events in the needed form, use the different commands:" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:628 +msgid "``cat`` -- prints one or more files" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:630 +msgid "``grep`` -- prints a specific text" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:632 +msgid "``head`` -- prints the first N lines of the file" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:634 +msgid "``tail`` -- prints the last N lines of the file" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:638 +msgid "These are the basic commands to help you read the logs. If necessary, you can use other commands." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:643 +msgid "Tips" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:646 +msgid "How many events can be recorded?" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:648 +msgid "If you write to a file, the size of the Tarantool audit module is limited by the disk space. If you write to a system logger, the size of the Tarantool audit module is limited by the system logger. If you write to a pipe, the size of the Tarantool audit module is limited by the system buffer if the ``audit_nonblock`` = ``false``; if ``audit_nonblock`` = ``true``, there is no limit. However, it is not recommended to use the entire memory, as this may cause performance degradation and even loss of some logs." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:656 +msgid "How often should audit logs be reviewed?" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:658 +msgid "Consider setting up a schedule in your company. It is recommended to review audit logs at least every 3 months." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:661 +msgid "How long should audit logs be stored?" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:663 +msgid "It is recommended to store audit logs for at least one year." +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:666 +msgid "What is the best way to process audit logs?" +msgstr "" + +#: ../../doc/enterprise/audit_log.rst:668 +msgid "It is recommended to use SIEM systems for this issue." +msgstr "" diff --git a/locale/en/enterprise/cartridge-auth.pot b/locale/en/enterprise/cartridge-auth.pot new file mode 100644 index 0000000000..93eb92152a --- /dev/null +++ b/locale/en/enterprise/cartridge-auth.pot @@ -0,0 +1,21 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/cartridge-auth.rst:4 +msgid "LDAP authorization" +msgstr "" diff --git a/locale/en/enterprise/changelog.pot b/locale/en/enterprise/changelog.pot new file mode 100644 index 0000000000..9260ea67c6 --- /dev/null +++ b/locale/en/enterprise/changelog.pot @@ -0,0 +1,908 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/changelog.rst:4 +msgid "Changelog" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:7 +msgid "Versioning policy" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:9 +msgid "A Tarantool Enterprise SDK version consists of two parts:" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:11 +msgid "-r" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:16 +msgid "For example: ``2.11.1-0-gc42d9735b-r589``." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:18 +msgid "``TARANTOOL_BASE_VERSION`` is the Community version which the Enterprise version is based on." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:19 +msgid "``REVISION`` is the SDK revision. Besides Tarantool itself, it includes the ``tt`` utility, a set of open and closed source modules, and examples. Learn more from :ref:`Package contents `." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:22 +msgid "598" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:24 +msgid "Updated cartridge-cli to `2.12.9 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:25 +msgid "Updated tt-ee to `1.3.1 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:28 +msgid "595" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:30 +msgid "Updated tt-ee to `1.3.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:31 +msgid "Updated cartridge to `2.8.3 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:32 +msgid "Updated cartridge-cli-extensions to `1.1.2 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:33 +msgid "Updated crud to `1.3.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:34 +msgid "Updated queue to `1.3.3 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:35 +msgid "Updated sharded-queue to `0.1.1 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:36 +msgid "Updated membership to `2.4.1 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:37 +msgid "Added tests for Astra Linux 1.7." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:41 +msgid "589" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:43 +msgid "Updated ``tarantool-2.10`` to 2.10.8." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:44 +msgid "Updated ``tarantool-master`` to 3.0.0-alpha3." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:45 +msgid "Updated migrations to `0.6.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:46 +msgid "Updated tt-ee to `1.2.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:47 +msgid "Updated space-explorer to `1.1.8 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:48 +msgid "Updated cartridge-metrics-role to `0.1.1 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:49 +msgid "Updated cartridge to `2.8.2 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:50 +msgid "Updated expirationd to `1.5.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:51 +msgid "Added sideservice `0.1.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:54 +msgid "579" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:56 +msgid "Updated cartridge-cli to `2.12.7 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:57 +msgid "Updated ``tarantool-2.11`` to 2.11.1." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:60 +msgid "577" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:62 +msgid "Added crud `1.2.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:63 +msgid "Added ddl `1.6.3 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:64 +msgid "Added sharded-queue `0.1.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:65 +msgid "Added ddl `1.6.4 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:66 +msgid "Updated tt-ee to `1.1.2 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:67 +msgid "Updated cartridge-cli to `2.12.6 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:70 +msgid "563" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:72 +msgid "Updated ``tarantool-2.10`` to 2.10.7." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:73 +msgid "Updated ``tarantool-2.11`` to 2.11.0." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:74 +msgid "Added kafka `1.6.6 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:75 +msgid "Added vshard `0.1.24 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:76 +msgid "Added metrics `1.0.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:77 +msgid "Added cartridge-metrics-role `0.1.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:78 +msgid "Added cartridge `2.8.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:79 +msgid "Added http `1.5.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:82 +msgid "557" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:84 +msgid "Added checks `3.3.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:85 +msgid "Updated cartridge-cli to `2.12.5 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:88 +msgid "553" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:90 +msgid "Added ``tt-ee`` and ``tt`` environment configuration." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:91 +msgid "Added crud `1.1.1 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:92 +msgid "Added avro-schema `3.1.1 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:93 +msgid "Added expirationd `1.4.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:94 +msgid "Added graphql `0.3.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:95 +msgid "Added graphqlapi `0.0.10 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:96 +msgid "Added metrics `0.17.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:97 +msgid "Added migrations `0.5.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:98 +msgid "Added oracle `1.4.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:99 +msgid "Added cartridge `2.7.9 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:100 +msgid "Added vshard `0.1.23 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:101 +msgid "Added kafka `1.6.5 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:104 +msgid "549" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:106 +msgid "Updated ``tarantool-2.10`` to 2.10.6." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:109 +msgid "545" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:111 +msgid "Updated ``tarantool-2.11`` to 2.11.0-rc2." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:114 +msgid "543" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:116 +msgid "Added the ``tarantool-2.11`` submodule." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:119 +msgid "542" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:121 +msgid "Updated ``tarantool-1.10`` to 1.10.15." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:124 +msgid "541" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:126 +msgid "Updated ``tarantool-master`` to ``3.0.0-entrypoint``." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:129 +msgid "540" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:131 +msgid "Updated ``tarantool-2.10`` to 2.10.5." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:134 +msgid "539" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:136 +msgid "Added vshard `0.1.22 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:139 +msgid "538" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:141 +msgid "Updated ``tarantool-2.8`` to apply 2 hotfixes." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:144 +msgid "537" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:146 +msgid "Fix non-interactive installation of the ``brew`` package." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:148 +msgid "Changed the owner of the ``/usr/local/bin`` directory." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:150 +msgid "Installed ``awscli@1`` instead of ``awscli`` since it takes much less time." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:154 +msgid "536" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:156 +msgid "Added the missing property ``2.10`` for scope ``CACHE`` in CMakeLists.txt." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:159 +msgid "535" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:161 +msgid "Added expirationd `1.3.1 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:164 +msgid "534" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:166 +msgid "Added crud `1.0.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:169 +msgid "533" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:171 +msgid "Use runners with label ``regular`` for builds and the tagged release workflow." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:175 +msgid "532" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:177 +msgid "Added http `1.4.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:178 +msgid "Added space-explorer `1.1.7 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:179 +msgid "Added checks `3.2.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:180 +msgid "Added metrics `0.16.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:181 +msgid "Added cartridge `2.7.8 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:184 +msgid "531" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:186 +msgid "Added the ``-DENABLE_LTO=ON`` flag for tarantool-ee@master branch to CMakeLists.txt" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:190 +msgid "530" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:192 +msgid "Upgraded devtoolset from 8 to 9. It was required for upgrading ld from 2.30 to 2.31+ for LTO." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:197 +msgid "529" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:199 +msgid "Updated tarantool’s master branch to a recent revision." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:202 +msgid "528" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:204 +msgid "Fixed code style in the Linux and macOS workflows." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:207 +msgid "527" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:209 +msgid "Reliably install packages in macOS builds." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:212 +msgid "526" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:214 +msgid "Refactored the way that GC64 builds are defined in the build workflow. There are no changes to the composition of resulting bundles." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:218 +msgid "525" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:220 +msgid "Added alerting failures in builds on stable branches and integration testing to VK Teams chats." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:224 +msgid "524" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:226 +msgid "Updated to fresh tarantool master (``2.11.0-entrypoint-107-ga18449d``)" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:229 +msgid "523" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:231 +msgid "Added cartridge `2.7.7 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:234 +msgid "522" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:236 +msgid "Outdated workflow runs are now canceled to save CI time." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:239 +msgid "521" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:241 +msgid "Added crud `0.14.1 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:242 +msgid "Added expirationd `1.3.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:243 +msgid "Added metrics `0.15.1 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:244 +msgid "Added queue `1.2.2 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:247 +msgid "520" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:249 +msgid "Release SDK by tags:" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:251 +msgid "Run workflow in SDK docker container." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:252 +msgid "Upload SDK files for 1.10, 2.8, 2.10 versions to release folder." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:253 +msgid "Add consistency check for all versions." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:256 +msgid "519" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:258 +msgid "On feature branches, SDK is now rebuilt only on relevant changes." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:261 +msgid "r518" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:263 +msgid "Added frontend core `8.2.1 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:264 +msgid "Added vshard `0.1.21 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:265 +msgid "Added http `1.3.0 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:266 +msgid "Added cartridge `2.7.6 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:269 +msgid "r517" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:271 +msgid "Updated Tarantool EE to `2.10.4 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:274 +msgid "r516" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:276 +msgid "Updated bundled OpenSSL to version 1.1.1q." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:279 +msgid "r515" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:281 +msgid "Removed support of Tarantool 2.7." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:282 +msgid "Started using ``tarantool/actions/prepare-checkout`` to make builds more stable." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:285 +msgid "r514" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:287 +msgid "Remove the local registry and setup using GitHub registry." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:288 +msgid "Sync rocks cache to s3 and back." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:289 +msgid "Setup using shared runners." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:290 +msgid "Refactor and format ``ci-linux.yml`` and ``ci-macos.yml``." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:293 +msgid "r513" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:295 +msgid "Removed kafka 1.5.0 due to a build issue with Tarantool 2.10.3 and higher." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:296 +msgid "Updated kafka to version `1.6.2 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:299 +msgid "r512" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:301 +msgid "Updated tuple-keydef to version `0.0.3 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:304 +msgid "r511" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:306 +msgid "Enabled parallel build of rocks for macOS in CI." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:309 +msgid "r510" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:311 +msgid "Updated Tarantool to :doc:`2.10.3 `." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:312 +msgid "Added a readable error for the case when the flight recoder fails to write data due to insufficient free space on the disk device. Previously, it was sending a `SIGBUS` error (:tarantool-ee-issue:`196`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:315 +msgid "Fixed a crash in the flight recorder caused by non-thread-safe log recording from multiple threads (:tarantool-ee-issue:`226`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:319 +msgid "r502" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:321 +msgid "Updated Tarantool to :doc:`2.10.2 `." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:322 +msgid "Increased resolution of stored entries in flight recorder (:tarantool-ee-issue:`193`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:323 +msgid "Fixed a bug in the flight recorder that resulted in skipping log entries in case ``box.cfg.log_level`` is less than ``flightrec_log_level`` (:tarantool-ee-issue:`201`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:327 +msgid "r498" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:329 +msgid "Updated Tarantool to :doc:`2.10.1 `." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:330 +msgid "Updated Cyrus SASL to version 2.1.28." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:331 +msgid "Updated OpenLDAP to version 2.5.13." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:332 +msgid "Updated LZ4 to version 1.9.3. Fixed `CVE-2021-3520 `__." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:333 +msgid "Fixed replication reconnect failure after disabling SSL encryption (:tarantool-ee-issue:`137`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:334 +msgid "Fixed a crash that occurred while tyring to start an instance that has a compressed memtx space (:tarantool-ee-issue:`171`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:336 +msgid "Fixed `CVE-2022-29242 `__ in GOST SSL engine." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:337 +msgid "Fixed a bug in the flight recorder reader implementation that resulted in a hang or error while trying to open an empty section (:tarantool-ee-issue:`187`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:341 +msgid "r467" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:344 +msgid "Breaking changes" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:346 +msgid "Default audit log format was changed to CSV." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:349 +msgid "Functionality added or changed" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:352 +#: ../../doc/enterprise/changelog.rst:412 +msgid "Enterprise" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:354 +msgid "Implemented user-defined audit events. Now it's possible to log custom messages to the audit log from Lua (:tarantool-ee-issue:`65`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:357 +msgid "**[Breaking change]** Switched the default audit log format to CSV. The format can be switched back to JSON using the new ``box.cfg.audit_format`` configuration option (:tarantool-ee-issue:`66`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:361 +msgid "Implemented the audit log filter. Now, it's possible to enable logging only for a subset of all audit events using the new ``box.cfg.audit_filter`` configuration option (:tarantool-ee-issue:`67`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:366 +#: ../../doc/enterprise/changelog.rst:422 +msgid "Core" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:368 +msgid "Implement constraints and foreign keys. Now a user can create function constraints and foreign key relations (:tarantool-issue:`6436`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:370 +msgid "Changed log level of some information messages from critical to info (:tarantool-issue:`4675`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:372 +msgid "Added predefined system events: ``box.status``, ``box.id``, ``box.election`` and ``box.schema`` (:tarantool-issue:`6260`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:374 +msgid "Introduced transaction isolation levels in Lua and IPROTO (:tarantool-issue:`6930`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:377 +msgid "Vinyl" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:379 +msgid "Disabled the deferred DELETE optimization in Vinyl to avoid possible performance degradation of secondary index reads. Now, to enable the optimization, one has to set the ``defer_deletes`` flag in space options (:tarantool-issue:`4501`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:385 +#: ../../doc/enterprise/changelog.rst:443 +msgid "Lua" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:387 +msgid "Added support of console autocompletion for net.box objects ``stream`` and ``future`` (:tarantool-issue:`6305`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:391 +#: ../../doc/enterprise/changelog.rst:456 +msgid "Datetime" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:393 +msgid "Parse method to allow converting string literals in extended iso-8601" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:394 +msgid "or rfc3339 formats (:tarantool-issue:`6731`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:396 +msgid "The range of supported years has been extended in all parsers to cover" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:396 +msgid "fully -5879610-06-22..5879611-07-11 (:tarantool-issue:`6731`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:399 +msgid "Build" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:401 +msgid "Added bundling of *GNU libunwind* to support backtrace feature on *AARCH64* architecture and distributives that don't provide *libunwind* package." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:404 +msgid "Re-enabled backtrace feature for all *RHEL* distributions by default, except for *AARCH64* architecture and ancient *GCC* versions, which lack compiler features required for backtrace (gh-4611)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:409 +msgid "Bugs fixed" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:414 +msgid "Disabled audit log unless explicitly configured (:tarantool-ee-issue:`39`). Before this change, audit events were written to stderr if ``box.cfg.audit_log`` wasn't set. Now, audit log is disabled in this case." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:417 +msgid "Disabled audit logging of replicated events (:tarantool-ee-issue:`59`). Now, replicated events (for example, user creation) are logged only on the origin, never on a replica." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:424 +msgid "Banned DDL operations in space on_replace triggers, since they could lead to a crash (:tarantool-issue:`6920`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:426 +msgid "Fixed a bug due to which all fibers created with ``fiber_attr_setstacksize()`` leaked until the thread exit. Their stacks also leaked except when ``fiber_set_joinable(..., true)`` was used." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:429 +msgid "Fixed a crash in mvcc connected with secondary index conflict (:tarantool-issue:`6452`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:430 +msgid "Fixed a bug which resulted in wrong space count (:tarantool-issue:`6421`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:431 +msgid "Select in RO transaction now reads confirmed data, like a standalone (auotcommit) select does (:tarantool-issue:`6452`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:435 +msgid "Replication" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:437 +msgid "Fixed potential obsolete data write in synchronious replication due to race in accessing terms while disk write operation is in progress and not yet completed." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:440 +msgid "Fixed replicas failing to bootstrap when master is just re-started (:tarantool-issue:`6966`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:445 +msgid "Fixed the behavior of tarantool console on SIGINT. Now Ctrl+C discards the current input and prints the new prompt (:tarantool-issue:`2717`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:449 +msgid "Triggers" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:451 +msgid "Fixed assertion or segfault when MP_EXT received via net.box (:tarantool-issue:`6766`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:452 +msgid "Now ROUND() properly support INTEGER and DECIMAL as the first argument (:tarantool-issue:`6988`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:458 +msgid "Intervals received after datetime arithmetic operations may be improperly normalized if result was negative" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:461 +msgid "tarantool> date.now() - date.now()\n" +"---\n" +"- -1.000026000 seconds\n" +"..." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:468 +msgid "I.e. 2 immediately called ``date.now()`` produce very close values, whose difference should be close to 0, not 1 second (gh-6882)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:472 +msgid "Net.box" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:474 +msgid "Changed the type of the error returned by net.box on timeout from ClientError to TimedOut (:tarantool-issue:`6144`)." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:478 +msgid "r457" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:480 +msgid "Fixed some binary protocol encryption bugs." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:483 +msgid "r455" +msgstr "" + +#: ../../doc/enterprise/changelog.rst:485 +msgid "Added :ref:`binary protocol encryption `." +msgstr "" + +#: ../../doc/enterprise/changelog.rst:486 +msgid "Added :doc:`tuple field compression `." +msgstr "" diff --git a/locale/en/enterprise/deprecated.pot b/locale/en/enterprise/deprecated.pot new file mode 100644 index 0000000000..315e7ed969 --- /dev/null +++ b/locale/en/enterprise/deprecated.pot @@ -0,0 +1,116 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/deprecated.rst:4 +msgid "Deprecated features" +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:6 +msgid "The ZooKeeper along with ``orchestrator`` are no longer supported. However, they still can be used, if necessary." +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:9 +msgid "The following sections describe the corresponding functionality." +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:14 +msgid "Controlling the cluster via API" +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:16 +msgid "To control the cluster, use the ``orchestrator`` included in the delivery package. The ``orchestrator`` uses ZooKeeper to store and distribute the configuration. The ``orchestrator`` provides the REST API for controlling the cluster. Configurations in the ZooKeeper are changed as a result of calling the ``orchestrator``'s API-functions, which in turn leads to changes in configurations of the Tarantool nodes." +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:23 +msgid "We recommend using a **curl** command line interface to call the API-functions of the ``orchestrator``." +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:26 +msgid "The following example shows how to register a new availability zone (DC):" +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:28 +msgid "$ curl -X POST http://HOST:PORT/api/v1/zone \\\n" +" -d '{\n" +" \"name\": \"Caucasian Boulevard\"\n" +" }'" +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:35 +msgid "To check whether the DC registration was successful, try the following instruction. It retrieves the list of all registered nodes in the JSON format:" +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:38 +msgid "$ curl http://HOST:PORT/api/v1/zone| python -m json.tool" +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:42 +msgid "To apply the new configuration directly on the Tarantool nodes, increase the configuration version number after calling the API function. To do this, use the POST request to ``/api/v1/version``:" +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:46 +msgid "$ curl -X POST http://HOST:PORT/api/v1/version" +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:50 +msgid "Altogether, to update the cluster configuration:" +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:52 +msgid "Call the ``POST/PUT`` method of the ``orchestrator``. As a result, the ZooKeeper nodes are updated, and a subsequent update of the Tarantool nodes is initiated." +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:55 +msgid "Update the configuration version using the ``POST`` request to ``/api/v1/version``. As a result, the configuration is applied to the Tarantool nodes." +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:58 +msgid "See the :ref:`Orchestrator API reference ` for the detailed orchestrator API." +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:63 +msgid "Setting up geo redundancy" +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:65 +msgid "Logically, cluster nodes can belong to some availability zone. Physically, an availability zone is a separate DC, or a rack inside a DC. You can specify a matrix of weights (distances) for the availability zones." +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:69 +msgid "New zones are added by calling a corresponding API method of the orchestrator." +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:71 +msgid "By default, the matrix of weights (distances) for the zones is not configured, and geo-redundancy for such configurations works as follows:" +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:74 +msgid "Data is always written to the master." +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:75 +msgid "If the master is available, then it is used for reading." +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:76 +msgid "If the master is unavailable, then any available replica is used for reading." +msgstr "" + +#: ../../doc/enterprise/deprecated.rst:78 +msgid "When you define a matrix of weights (distances) by calling ``/api/v1/zones/weights``, the automatic scale-out system of the Tarantool DBMS finds a replica which is the closest to the specified router in terms of weights, and starts using this replica for reading. If this replica is not available, then the next nearest replica is selected, taking into account the distances specified in the configuration." +msgstr "" diff --git a/locale/en/enterprise/deprecated/orchestrator_api.pot b/locale/en/enterprise/deprecated/orchestrator_api.pot new file mode 100644 index 0000000000..7f37408e1e --- /dev/null +++ b/locale/en/enterprise/deprecated/orchestrator_api.pot @@ -0,0 +1,805 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:4 +msgid "Orchestrator API reference" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:9 +msgid "Configuring the zones" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:11 +msgid ":ref:`POST /api/v1/zone `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:12 +msgid ":ref:`GET /api/v1/zone/ `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:13 +msgid ":ref:`PUT /api/v1/zone/ `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:14 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:503 +msgid ":ref:`DELETE /api/v1/zone/ `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:20 +msgid "Create a new zone." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:22 +msgid "**Request**" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:24 +msgid "{\n" +"\"name\": \"zone 1\"\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:30 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:56 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:96 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:119 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:172 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:195 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:242 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:282 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:322 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:346 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:394 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:427 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:456 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:479 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:525 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:571 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:606 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:653 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:685 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:710 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:746 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:823 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:848 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:877 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:896 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:923 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:943 +msgid "**Response**" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:32 +msgid "{\n" +"\"error\": {\n" +" \"code\": 0,\n" +" \"message\": \"ok\"\n" +"},\n" +"\"data\": {\n" +" \"id\": 2,\n" +" \"name\": \"zone 2\"\n" +"},\n" +"\"status\": true\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:46 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:78 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:109 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:132 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:185 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:221 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:295 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:335 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:384 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:407 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:469 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:540 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:584 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:643 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:666 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:698 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:734 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:804 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:838 +msgid "**Potential errors**" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:48 +msgid "``zone_exists`` - the specified zone already exists" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:54 +msgid "Return information on the specified zone or on all the zones." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:58 +msgid "{\n" +" \"error\": {\n" +" \"code\": 0,\n" +" \"message\": \"ok\"\n" +" },\n" +" \"data\": [\n" +" {\n" +" \"id\": 1,\n" +" \"name\": \"zone 11\"\n" +" },\n" +" {\n" +" \"id\": 2,\n" +" \"name\": \"zone 2\"\n" +" }\n" +" ],\n" +" \"status\": true\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:80 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:111 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:134 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:223 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:298 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:806 +msgid "``zone_not_found`` - the specified zone is not found" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:86 +msgid "Update information on the zone." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:88 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:151 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:267 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:307 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:448 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:511 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:553 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:598 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:676 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:723 +msgid "**Body**" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:90 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:600 +msgid "{\n" +" \"name\": \"zone 22\"\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:98 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:121 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:174 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:284 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:324 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:396 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:458 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:481 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:573 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:655 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:687 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:712 +msgid "{\n" +" \"error\": {\n" +" \"code\": 0,\n" +" \"message\": \"ok\"\n" +" },\n" +" \"data\": {},\n" +" \"status\": true\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:117 +msgid "Delete a zone if it doesn’t store any nodes." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:135 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:807 +msgid "``zone_in_use`` - the specified zone stores at least one node" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:140 +msgid "Configuring the zone weights" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:142 +msgid ":ref:`GET /api/v1/zones/weights `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:143 +msgid ":ref:`POST /api/v1/zones/weights `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:149 +msgid "Set the zone weights configuration." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:153 +msgid "{\n" +" \"weights\": {\n" +" \"1\": {\n" +" \"2\": 10,\n" +" \"3\": 11\n" +" },\n" +" \"2\": {\n" +" \"1\": 10,\n" +" \"3\": 12\n" +" },\n" +" \"3\": {\n" +" \"1\": 11,\n" +" \"2\": 12\n" +" }\n" +" }\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:187 +msgid "``zones_weights_error`` - configuration error" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:193 +msgid "Return the zone weights configuration." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:197 +msgid "{\n" +" \"error\": {\n" +" \"code\": 0,\n" +" \"message\": \"ok\"\n" +" },\n" +" \"data\": {\n" +" \"1\": {\n" +" \"2\": 10,\n" +" \"3\": 11\n" +" },\n" +" \"2\": {\n" +" \"1\": 10,\n" +" \"3\": 12\n" +" },\n" +" \"3\": {\n" +" \"1\": 11,\n" +" \"2\": 12\n" +" }\n" +" },\n" +" \"status\": true\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:228 +msgid "Configuring registry" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:230 +msgid ":ref:`GET /api/v1/registry/nodes/new `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:231 +msgid ":ref:`POST /api/v1/registry/node `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:232 +msgid ":ref:`PUT /api/v1/registry/node/ `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:233 +msgid ":ref:`GET /api/v1/registry/node/ `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:234 +msgid ":ref:`DELETE /api/v1/registry/node/ `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:240 +msgid "Return all the detected nodes." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:244 +msgid "{\n" +" \"error\": {\n" +" \"code\": 0,\n" +" \"message\": \"ok\"\n" +" },\n" +" \"data\": [\n" +" {\n" +" \"uuid\": \"uuid-2\",\n" +" \"hostname\": \"tnt2.public.i\",\n" +" \"name\": \"tnt2\"\n" +" }\n" +" ],\n" +" \"status\": true\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:265 +msgid "Register the detected node." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:269 +msgid "{\n" +" \"zone_id\": 1,\n" +" \"uuid\": \"uuid-2\",\n" +" \"uri\": \"tnt2.public.i:3301\",\n" +" \"user\": \"user1:pass1\",\n" +" \"repl_user\": \"repl_user1:repl_pass1\",\n" +" \"cfg\": {\n" +" \"listen\": \"0.0.0.0:3301\"\n" +" }\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:297 +msgid "``node_already_registered`` - the specified node is already registered" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:299 +msgid "``node_not_discovered`` - the specified node is not detected" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:305 +msgid "Update the registered node parameters." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:309 +msgid "Pass only those parameters that need to be updated." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:311 +msgid "{\n" +" \"zone_id\": 1,\n" +" \"repl_user\": \"repl_user2:repl_pass2\",\n" +" \"cfg\": {\n" +" \"listen\": \"0.0.0.0:3301\",\n" +" \"memtx_memory\": 100000\n" +" }\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:337 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:386 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:409 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:471 +msgid "``node_not_registered`` - the specified node is not registered" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:343 +msgid "Return information on the nodes in a cluster. If ``node_uuid`` is passed, information on this node only is returned." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:348 +msgid "{\n" +" \"error\": {\n" +" \"code\": 0,\n" +" \"message\": \"ok\"\n" +" },\n" +" \"data\": {\n" +" \"uuid-1\": {\n" +" \"user\": \"user1:pass1\",\n" +" \"hostname\": \"tnt1.public.i\",\n" +" \"repl_user\": \"repl_user2:repl_pass2\",\n" +" \"uri\": \"tnt1.public.i:3301\",\n" +" \"zone_id\": 1,\n" +" \"name\": \"tnt1\",\n" +" \"cfg\": {\n" +" \"listen\": \"0.0.0.0:3301\",\n" +" \"memtx_memory\": 100000\n" +" },\n" +" \"zone\": 1\n" +" },\n" +" \"uuid-2\": {\n" +" \"user\": \"user1:pass1\",\n" +" \"hostname\": \"tnt2.public.i\",\n" +" \"name\": \"tnt2\",\n" +" \"uri\": \"tnt2.public.i:3301\",\n" +" \"repl_user\": \"repl_user1:repl_pass1\",\n" +" \"cfg\": {\n" +" \"listen\": \"0.0.0.0:3301\"\n" +" },\n" +" \"zone\": 1\n" +" }\n" +" },\n" +" \"status\": true\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:392 +msgid "Delete the node if it doesn’t belong to any replica set." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:410 +msgid "``node_in_use`` - the specified node is in use by a replica set" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:415 +msgid "Routers API" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:417 +msgid ":ref:`GET /api/v1/routers `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:418 +msgid ":ref:`POST /api/v1/routers `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:419 +msgid ":ref:`DELETE /api/v1/routers/{uuid} `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:425 +msgid "Return the list of all nodes that constitute the router." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:429 +msgid "{\n" +" \"data\": [\n" +" \"uuid-1\"\n" +" ],\n" +" \"status\": true,\n" +" \"error\": {\n" +" \"code\": 0,\n" +" \"message\": \"ok\"\n" +" }\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:446 +msgid "Assign the router role to the node." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:450 +msgid "{\n" +" \"uuid\": \"uuid-1\"\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:477 +msgid "Release the router role from the node." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:495 +msgid "Configuring replica sets" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:497 +msgid ":ref:`POST /api/v1/replicaset `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:498 +msgid ":ref:`PUT /api/v1/replicaset/ `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:499 +msgid ":ref:`GET /api/v1/replicaset/ `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:500 +msgid ":ref:`DELETE /api/v1/replicaset/ `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:501 +msgid ":ref:`POST /api/v1/replicaset/{replicaset_uuid}/master `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:502 +msgid ":ref:`POST /api/v1/replicaset/{replicaset_uuid}/node `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:509 +msgid "Create a replica set containing all the registered nodes." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:513 +msgid "{\n" +" \"uuid\": \"optional-uuid\",\n" +" \"replicaset\": [\n" +" {\n" +" \"uuid\": \"uuid-1\",\n" +" \"master\": true\n" +" }\n" +" ]\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:527 +msgid "{\n" +" \"error\": {\n" +" \"code\": 0,\n" +" \"message\": \"ok\"\n" +" },\n" +" \"data\": {\n" +" \"replicaset_uuid\": \"cc6568a2-63ca-413d-8e39-704b20adb7ae\"\n" +" },\n" +" \"status\": true\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:542 +msgid "``replicaset_exists`` – the specified replica set already exists" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:543 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:586 +msgid "``replicaset_empty`` – the specified replica set doesn’t contain any nodes" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:544 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:588 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:701 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:737 +msgid "``node_not_registered`` – the specified node is not registered" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:545 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:589 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:738 +msgid "``node_in_use`` – the specified node is in use by another replica set" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:551 +msgid "Update the replica set parameters." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:555 +msgid "{\n" +" \"replicaset\": [\n" +" {\n" +" \"uuid\": \"uuid-1\",\n" +" \"master\": true\n" +" },\n" +" {\n" +" \"uuid\": \"uuid-2\",\n" +" \"master\": false,\n" +" \"off\": true\n" +" }\n" +" ]\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:587 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:645 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:700 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:736 +msgid "``replicaset_not_found`` – the specified replica set is not found" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:595 +msgid "Return information on all the cluster components. If ``replicaset_uuid`` is passed, information on this replica set only is returned." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:608 +msgid "{\n" +" \"error\": {\n" +" \"code\": 0,\n" +" \"message\": \"ok\"\n" +" },\n" +" \"data\": {\n" +" \"cc6568a2-63ca-413d-8e39-704b20adb7ae\": {\n" +" \"uuid-1\": {\n" +" \"hostname\": \"tnt1.public.i\",\n" +" \"off\": false,\n" +" \"repl_user\": \"repl_user2:repl_pass2\",\n" +" \"uri\": \"tnt1.public.i:3301\",\n" +" \"master\": true,\n" +" \"name\": \"tnt1\",\n" +" \"user\": \"user1:pass1\",\n" +" \"zone_id\": 1,\n" +" \"zone\": 1\n" +" },\n" +" \"uuid-2\": {\n" +" \"hostname\": \"tnt2.public.i\",\n" +" \"off\": true,\n" +" \"repl_user\": \"repl_user1:repl_pass1\",\n" +" \"uri\": \"tnt2.public.i:3301\",\n" +" \"master\": false,\n" +" \"name\": \"tnt2\",\n" +" \"user\": \"user1:pass1\",\n" +" \"zone\": 1\n" +" }\n" +" }\n" +" },\n" +" \"status\": true\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:651 +msgid "Delete a replica set." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:668 +msgid "``replicaset_not_found`` - the specified replica set is not found" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:674 +msgid "Switch the master in the replica set." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:678 +msgid "{\n" +" \"instance_uuid\": \"uuid-1\",\n" +" \"hostname_name\": \"hostname:instance_name\"\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:702 +msgid "``node_not_in_replicaset`` – the specified node is not in the specified replica set" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:708 +msgid "Add a node to the replica set." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:725 +msgid "{\n" +" \"instance_uuid\": \"uuid-1\",\n" +" \"hostname_name\": \"hostname:instance_name\",\n" +" \"master\": false,\n" +" \"off\": false\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:744 +msgid "Return statistics on the cluster." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:748 +msgid "{\n" +" \"error\": {\n" +" \"code\": 0,\n" +" \"message\": \"ok\"\n" +" },\n" +" \"data\": {\n" +" \"cluster\": {\n" +" \"routers\": [\n" +" {\n" +" \"zone\": 1,\n" +" \"name\": \"tnt1\",\n" +" \"repl_user\": \"repl_user1:repl_pass1\",\n" +" \"hostname\": \"tnt1.public.i\",\n" +" \"status\": null,\n" +" \"uri\": \"tnt1.public.i:3301\",\n" +" \"user\": \"user1:pass1\",\n" +" \"uuid\": \"uuid-1\",\n" +" \"total_rps\": null\n" +" }\n" +" ],\n" +" \"storages\": [\n" +" {\n" +" \"hostname\": \"tnt1.public.i\",\n" +" \"repl_user\": \"repl_user2:repl_pass2\",\n" +" \"uri\": \"tnt1.public.i:3301\",\n" +" \"name\": \"tnt1\",\n" +" \"total_rps\": null,\n" +" \"status\": 'online',\n" +" \"replicas\": [\n" +" {\n" +" \"user\": \"user1:pass1\",\n" +" \"hostname\": \"tnt2.public.i\",\n" +" \"replication_info\": null,\n" +" \"repl_user\": \"repl_user1:repl_pass1\",\n" +" \"uri\": \"tnt2.public.i:3301\",\n" +" \"uuid\": \"uuid-2\",\n" +" \"status\": 'online',\n" +" \"name\": \"tnt2\",\n" +" \"total_rps\": null,\n" +" \"zone\": 1\n" +" }\n" +" ],\n" +" \"user\": \"user1:pass1\",\n" +" \"zone_id\": 1,\n" +" \"uuid\": \"uuid-1\",\n" +" \"replicaset_uuid\": \"cc6568a2-63ca-413d-8e39-704b20adb7ae\",\n" +" \"zone\": 1\n" +" }\n" +" ]\n" +" }\n" +" },\n" +" \"status\": true\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:812 +msgid "Setting up configuration versions" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:814 +msgid ":ref:`POST /api/v1/version `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:815 +msgid ":ref:`GET /api/v1/version `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:821 +msgid "Set the configuration version." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:825 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:850 +msgid "{\n" +" \"error\": {\n" +" \"code\": 0,\n" +" \"message\": \"ok\"\n" +" },\n" +" \"status\": true,\n" +" \"data\": {\n" +" \"version\": 2\n" +" }\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:840 +msgid "``cfg_error`` - configuration error" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:846 +msgid "Return the configuration version." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:866 +msgid "Configuring sharding" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:868 +msgid ":ref:`POST /api/v1/sharding/cfg `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:869 +msgid ":ref:`GET /api/v1/sharding/cfg `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:875 +msgid "Add a new sharding configuration." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:879 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:898 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:925 +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:945 +msgid "{\n" +" \"error\": {\n" +" \"code\": 0,\n" +" \"message\": \"ok\"\n" +" },\n" +" \"status\": true,\n" +" \"data\": {}\n" +"}" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:894 +msgid "Return the current sharding configuration." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:912 +msgid "Resetting cluster configuration" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:914 +msgid ":ref:`POST /api/v1/clean/cfg `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:915 +msgid ":ref:`POST /api/v1/clean/all `" +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:921 +msgid "Reset the cluster configuration." +msgstr "" + +#: ../../doc/enterprise/deprecated/orchestrator_api.rst:940 +msgid "Reset the cluster configuration and delete information on the cluster nodes from the ZooKeeper catalogues." +msgstr "" diff --git a/locale/en/enterprise/dev.pot b/locale/en/enterprise/dev.pot new file mode 100644 index 0000000000..1a6064e236 --- /dev/null +++ b/locale/en/enterprise/dev.pot @@ -0,0 +1,21 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/dev.rst:4 +msgid "Developer's guide" +msgstr "" diff --git a/locale/en/enterprise/flight_recorder.pot b/locale/en/enterprise/flight_recorder.pot new file mode 100644 index 0000000000..bffaf0fa87 --- /dev/null +++ b/locale/en/enterprise/flight_recorder.pot @@ -0,0 +1,245 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/flight_recorder.rst:4 +msgid "Flight recorder" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:6 +msgid "The flight recorder available in the Enterprise Edition is an event collection tool that gathers various information about a working Tarantool instance, such as:" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:9 +msgid "logs" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:11 +msgid "metrics" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:13 +msgid "requests and responses" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:15 +msgid "This information helps you investigate incidents related to :ref:`crashing ` a Tarantool instance." +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:22 +msgid "Enabling the flight recorder" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:24 +msgid "The flight recorder is disabled by default and can be enabled and configured for a specific Tarantool instance. To enable the flight recorder, set the ``flightrec_enabled`` :doc:`configuration option ` to ``true``. This option is :ref:`dynamic ` and can be changed at runtime by calling ``box.cfg{}``:" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:30 +msgid "box.cfg{ flightrec_enabled = true }" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:34 +msgid "After ``flightrec_enabled`` is set to ``true``, the flight recorder starts collecting data in the flight recording file ``current.ttfr``. This file is stored in the :ref:`memtx_dir ` directory. If the instance crashes and reboots, Tarantool rotates the flight recording: ``current.ttfr`` is renamed to ``.ttfr`` (for example, ``20230411T050721.ttfr``) and the new ``current.ttfr`` file is created for collecting data. In the case of correct shutdown (for example, using ``os.exit()``), Tarantool continues writing to the existing ``current.ttfr`` file after restart." +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:44 +msgid "Note that old flight recordings should be removed manually." +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:51 +msgid "Configuration" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:53 +msgid "This section describes options related to the flight recorder configuration. Note that all options are :ref:`dynamic ` and can be changed at runtime." +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:77 +msgid "Logs" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:79 +msgid "This section describes the flight recorder settings related to :ref:`logging `. For example, you can configure a more detailed logging level in the flight recorder for deeper analysis." +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:82 +msgid ":ref:`flightrec_logs_size `" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:83 +msgid ":ref:`flightrec_logs_max_msg_size `" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:84 +msgid ":ref:`flightrec_logs_log_level `" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:90 +msgid "Specifies the size (in bytes) of the log storage. You can set this option to ``0`` to disable the log storage." +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:93 +#: ../../doc/enterprise/flight_recorder.rst:105 +#: ../../doc/enterprise/flight_recorder.rst:120 +#: ../../doc/enterprise/flight_recorder.rst:144 +#: ../../doc/enterprise/flight_recorder.rst:191 +#: ../../doc/enterprise/flight_recorder.rst:204 +#: ../../doc/enterprise/flight_recorder.rst:216 +msgid "Type: integer" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:94 +#: ../../doc/enterprise/flight_recorder.rst:192 +msgid "Default: 10485760" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:95 +msgid "Environment variable: TT_FLIGHTREC_LOGS_SIZE" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:102 +msgid "Specifies the maximum size (in bytes) of the log message. The log message is truncated if its size exceeds this limit." +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:106 +msgid "Default: 4096" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:107 +msgid "Maximum: 16384" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:108 +msgid "Environment variable: TT_FLIGHTREC_LOGS_MAX_MSG_SIZE" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:115 +msgid "Specifies the level of detail the log has. You can learn more about log levels from the :ref:`log_level ` option description. Note that the ``flightrec_logs_log_level`` value might differ from ``log_level``." +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:121 +msgid "Default: 6" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:122 +msgid "Environment variable: TT_FLIGHTREC_LOGS_LOG_LEVEL" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:128 +msgid "Metrics" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:130 +msgid "This section describes the flight recorder settings related to collecting :ref:`metrics `." +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:133 +msgid ":ref:`flightrec_metrics_period `" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:134 +msgid ":ref:`flightrec_metrics_interval `" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:140 +msgid "Specifies the time period (in seconds) that defines how long metrics are stored from the moment of dump. So, this value defines how much historical metrics data is collected up to the moment of crash. The frequency of metric dumps is defined by :ref:`flightrec_metrics_interval `." +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:145 +msgid "Default: 180" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:146 +msgid "Environment variable: TT_FLIGHTREC_METRICS_PERIOD" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:153 +msgid "Specifies the time interval (in seconds) that defines the frequency of dumping metrics. This value shouldn't exceed :ref:`flightrec_metrics_period `." +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:156 +msgid "Type: number" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:157 +msgid "Default: 1.0" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:158 +msgid "Minimum: 0.001" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:159 +msgid "Environment variable: TT_FLIGHTREC_METRICS_INTERVAL" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:163 +msgid "Given that the average size of a metrics entry is 2 kB, you can estimate the size of the metrics storage as follows:" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:166 +msgid "(flightrec_metrics_period / flightrec_metrics_interval) * 2 kB" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:175 +msgid "Requests" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:177 +msgid "This section lists the flight recorder settings related to storing the :ref:`request and response ` data." +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:180 +msgid ":ref:`flightrec_requests_size `" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:181 +msgid ":ref:`flightrec_requests_max_req_size `" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:182 +msgid ":ref:`flightrec_requests_max_res_size `" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:188 +msgid "Specifies the size (in bytes) of storage for the request and response data. You can set this parameter to ``0`` to disable a storage of requests and responses." +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:193 +msgid "Environment variable: TT_FLIGHTREC_REQUESTS_SIZE" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:201 +msgid "Specifies the maximum size (in bytes) of a request entry. A request entry is truncated if this size is exceeded." +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:205 +#: ../../doc/enterprise/flight_recorder.rst:217 +msgid "Default: 16384" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:206 +msgid "Environment variable: TT_FLIGHTREC_REQUESTS_MAX_REQ_SIZE" +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:213 +msgid "Specifies the maximum size (in bytes) of a response entry. A response entry is truncated if this size is exceeded." +msgstr "" + +#: ../../doc/enterprise/flight_recorder.rst:218 +msgid "Environment variable: TT_FLIGHTREC_REQUESTS_MAX_RES_SIZE" +msgstr "" diff --git a/locale/en/enterprise/index.pot b/locale/en/enterprise/index.pot new file mode 100644 index 0000000000..448355f3a5 --- /dev/null +++ b/locale/en/enterprise/index.pot @@ -0,0 +1,57 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/index.rst:4 +msgid "Tarantool Enterprise Edition" +msgstr "" + +#: ../../doc/enterprise/index.rst:10 +msgid "This section describes the Enterprise Edition of Tarantool software -- a Lua application server integrated with a DBMS for deploying fault-tolerant distributed data storages." +msgstr "" + +#: ../../doc/enterprise/index.rst:14 +msgid "The Enterprise Edition provides an `extended feature set `__ for developing and managing clustered Tarantool applications, for example:" +msgstr "" + +#: ../../doc/enterprise/index.rst:17 +msgid "Static package for standalone Linux systems." +msgstr "" + +#: ../../doc/enterprise/index.rst:18 +msgid "Tarantool bindings to OpenLDAP." +msgstr "" + +#: ../../doc/enterprise/index.rst:19 +msgid "Security :ref:`audit log `." +msgstr "" + +#: ../../doc/enterprise/index.rst:20 +msgid "Enterprise database connectivity: Oracle and any ODBC-supported DBMS (for example, MySQL, Microsoft SQL Server)." +msgstr "" + +#: ../../doc/enterprise/index.rst:23 +msgid "SSL support for :ref:`traffic encryption `." +msgstr "" + +#: ../../doc/enterprise/index.rst:24 +msgid ":doc:`Tuple compression `." +msgstr "" + +#: ../../doc/enterprise/index.rst:25 +msgid ":doc:`Non-blocking DDL `." +msgstr "" diff --git a/locale/en/enterprise/read_views.pot b/locale/en/enterprise/read_views.pot new file mode 100644 index 0000000000..f3f94d834f --- /dev/null +++ b/locale/en/enterprise/read_views.pot @@ -0,0 +1,218 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/read_views.rst:4 +msgid "Read views" +msgstr "" + +#: ../../doc/enterprise/read_views.rst:6 +msgid "A read view is an in-memory snapshot of the entire database that isn't affected by future :ref:`data modifications `. Read views provide access to database spaces and their indexes and enable you to retrieve data using the same ``select`` and ``pairs`` operations." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:11 +msgid "Read views can be used to make complex analytical queries. This reduces the load on the main database and improves RPS for a single Tarantool instance." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:14 +msgid "To improve memory consumption and performance, Tarantool creates read views using the copy-on-write technique. In this case, duplication of the entire data set is not required: Tarantool duplicates only blocks modified after a read view is created." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:21 +msgid "Tarantool Enterprise Edition supports read views starting from v2.11.0 and enables the ability to work with them using both :ref:`Lua ` and :ref:`C API `." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:31 +msgid "Limitations" +msgstr "" + +#: ../../doc/enterprise/read_views.rst:33 +msgid "Read views have the following limitations:" +msgstr "" + +#: ../../doc/enterprise/read_views.rst:35 +msgid "Only the :ref:`memtx ` engine is supported." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:36 +msgid "Only TREE and HASH :ref:`indexes ` are supported." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:37 +msgid "Pagination is not supported (the :ref:`after ` option)." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:44 +msgid "Working with read views" +msgstr "" + +#: ../../doc/enterprise/read_views.rst:49 +msgid "Creating a read view" +msgstr "" + +#: ../../doc/enterprise/read_views.rst:51 +msgid "To create a read view, call the :ref:`box.read_view.open() ` function. The snippet below shows how to create a read view with the ``read_view1`` name." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:54 +msgid "tarantool> read_view1 = box.read_view.open({name = 'read_view1'})" +msgstr "" + +#: ../../doc/enterprise/read_views.rst:58 +msgid "After creating a read view, you can see the information about it by calling :ref:`read_view_object:info() `." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:61 +msgid "tarantool> read_view1:info()\n" +"---\n" +"- timestamp: 66.606817935\n" +" signature: 24\n" +" is_system: false\n" +" status: open\n" +" vclock: {1: 24}\n" +" name: read_view1\n" +" id: 1\n" +"..." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:74 +msgid "To list all the created read views, call the :ref:`box.read_view.list() ` function." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:81 +msgid "Querying data" +msgstr "" + +#: ../../doc/enterprise/read_views.rst:83 +msgid "After creating a read view, you can access database spaces using the :ref:`read_view_object.space ` field. This field provides access to a space object that exposes the :ref:`select `, :ref:`get `, and :ref:`pairs ` methods with the same behavior as corresponding ``box.space`` methods." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:90 +msgid "The example below shows how to select 4 records from the ``bands`` space:" +msgstr "" + +#: ../../doc/enterprise/read_views.rst:92 +msgid "tarantool> read_view1.space.bands:select({}, {limit = 4})\n" +"---\n" +"- - [1, 'Roxette', 1986]\n" +" - [2, 'Scorpions', 1965]\n" +" - [3, 'Ace of Base', 1987]\n" +" - [4, 'The Beatles', 1960]\n" +"..." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:102 +msgid "Similarly, you can retrieve data by the specific index." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:104 +msgid "tarantool> read_view1.space.bands.index.year:select({}, {limit = 4})\n" +"---\n" +"- - [4, 'The Beatles', 1960]\n" +" - [2, 'Scorpions', 1965]\n" +" - [1, 'Roxette', 1986]\n" +" - [3, 'Ace of Base', 1987]\n" +"..." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:119 +msgid "Closing a read view" +msgstr "" + +#: ../../doc/enterprise/read_views.rst:121 +msgid "When a read view is no longer needed, close it using the :ref:`read_view_object:close() ` method because a read view may consume a substantial amount of memory." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:125 +#: ../../doc/enterprise/read_views.rst:198 +msgid "tarantool> read_view1:close()\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:131 +msgid "Otherwise, a read view is closed implicitly when the read view object is collected by the Lua garbage collector." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:133 +msgid "After the read view is closed, its :ref:`status ` is set to ``closed``. On an attempt to use it, an error is raised." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:141 +msgid "Example" +msgstr "" + +#: ../../doc/enterprise/read_views.rst:144 +msgid "A Tarantool session below demonstrates how to open a read view, get data from this view, and close it. To repeat these steps, you need to bootstrap a Tarantool instance as described in :ref:`Using data operations ` (you can skip creating secondary indexes)." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:150 +msgid "Insert test data." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:152 +msgid "tarantool> bands:insert{1, 'Roxette', 1986}\n" +" bands:insert{2, 'Scorpions', 1965}\n" +" bands:insert{3, 'Ace of Base', 1987}\n" +" bands:insert{4, 'The Beatles', 1960}" +msgstr "" + +#: ../../doc/enterprise/read_views.rst:159 +msgid "Create a read view by calling the ``open`` function. Then, make sure that the read view status is ``open``." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:162 +msgid "tarantool> read_view1 = box.read_view.open({name = 'read_view1'})\n" +"\n" +"tarantool> read_view1.status\n" +"---\n" +"- open\n" +"..." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:171 +msgid "Change data in a database using the ``delete`` and ``update`` operations." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:173 +msgid "tarantool> bands:delete(4)\n" +"---\n" +"- [4, 'The Beatles', 1960]\n" +"...\n" +"tarantool> bands:update({2}, {{'=', 2, 'Pink Floyd'}})\n" +"---\n" +"- [2, 'Pink Floyd', 1965]\n" +"..." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:184 +msgid "Query a read view to make sure it contains a snapshot of data before a database is updated." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:186 +msgid "tarantool> read_view1.space.bands:select()\n" +"---\n" +"- - [1, 'Roxette', 1986]\n" +" - [2, 'Scorpions', 1965]\n" +" - [3, 'Ace of Base', 1987]\n" +" - [4, 'The Beatles', 1960]\n" +"..." +msgstr "" + +#: ../../doc/enterprise/read_views.rst:196 +msgid "Close a read view." +msgstr "" diff --git a/locale/en/enterprise/read_views/c_api.pot b/locale/en/enterprise/read_views/c_api.pot new file mode 100644 index 0000000000..ff2436ce2d --- /dev/null +++ b/locale/en/enterprise/read_views/c_api.pot @@ -0,0 +1,334 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/read_views/c_api.rst:4 +msgid "Read views: C API" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:6 +msgid "This topic describes the C API for working with :ref:`read views `. The C API is MT-safe and provides the ability to use a read view from any thread, not only from the :ref:`main (TX) thread `." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:10 +msgid "The C API has the following specifics:" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:12 +msgid "The :ref:`space.upgrade ` function is not applied to retrieved tuples even if a space upgrade is in progress." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:14 +msgid "Tuples stored in :ref:`compressed spaces ` are not decompressed - they are returned as :ref:`raw MessagePack ` (``MP_EXT/MP_COMPRESSION``)." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:18 +msgid "You can learn how to call C code using stored procedures in the :ref:`C tutorial`." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:25 +msgid "Data types" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:27 +msgid "The opaque data types below represent raw read views and an iterator over data in a raw read view. Note that there is no special data type for tuples retrieved from a read view. Tuples are returned as raw MessagePack data (``const char *``)." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:33 +msgid "A raw database read view." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:37 +msgid "A space in a raw read view." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:41 +msgid "An index in a raw read view." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:45 +msgid "An iterator over data in a raw read view." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:52 +msgid "Creating and destroying read views" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:54 +msgid "To create or destroy a read view, use the functions below." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:60 +msgid "Open a raw read view with the specified name and get a pointer to this read view. In the case of error, returns ``NULL`` and sets :ref:`box_error_last()`. This function may be called from the main (TX) thread only." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:64 +#: ../../doc/enterprise/read_views/c_api.rst:64 +msgid "(optional) a read view name; if ``name`` is not specified, a read view name is set to ``unknown``" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +#: ../../doc/enterprise/read_views/c_api.rst:0 +msgid "Returns" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:66 +#: ../../doc/enterprise/read_views/c_api.rst:76 +#: ../../doc/enterprise/read_views/c_api.rst:76 +#: ../../doc/enterprise/read_views/c_api.rst:100 +#: ../../doc/enterprise/read_views/c_api.rst:100 +#: ../../doc/enterprise/read_views/c_api.rst:113 +#: ../../doc/enterprise/read_views/c_api.rst:113 +msgid "a pointer to a read view" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:73 +msgid "Close a raw read view and release all resources associated with it. This function may be called from the main (TX) thread only." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:81 +msgid "Read views created using ``box_raw_read_view_new`` are displayed in :ref:`box.read_view.list() ` along with read views :ref:`created in Lua `." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:87 +msgid "Spaces and indexes" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:89 +msgid "To fetch data from a read view, you need to specify an index to fetch the data from. The following functions are available for looking up spaces and indexes in a read view object." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:97 +msgid "Find a space by ID in a raw read view. If not found, returns ``NULL`` and sets :ref:`box_error_last()`." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:101 +#: ../../doc/enterprise/read_views/c_api.rst:128 +msgid "a space identifier" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:103 +#: ../../doc/enterprise/read_views/c_api.rst:117 +#: ../../doc/enterprise/read_views/c_api.rst:140 +#: ../../doc/enterprise/read_views/c_api.rst:140 +msgid "a pointer to a space" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:110 +msgid "Find a space by name in a raw read view. If not found, returns ``NULL`` and sets :ref:`box_error_last()`." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:114 +#: ../../doc/enterprise/read_views/c_api.rst:114 +msgid "a space name" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:115 +msgid "a space name length" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:124 +msgid "Find an index by ID in a read view's space. If not found, returns ``NULL`` and sets :ref:`box_error_last()`." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:127 +#: ../../doc/enterprise/read_views/c_api.rst:127 +msgid "a pointer to a read view's space" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:130 +#: ../../doc/enterprise/read_views/c_api.rst:144 +msgid "a pointer to an index" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:137 +msgid "Find an index by name in a read view's space. If not found, returns ``NULL`` and sets :ref:`box_error_last()`." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:141 +#: ../../doc/enterprise/read_views/c_api.rst:141 +msgid "an index name" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:142 +msgid "an index name length" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:151 +msgid "Iteration and lookup" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:153 +msgid "The functions below provide the ability to look up a tuple by the key or create an iterator over a read view index." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:157 +msgid "Methods of the read view iterator are safe to call from any thread, but they may be used in one thread at the same time. This means that an iterator should be thread-local." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:164 +msgid "Look up a tuple in a read view's index. If found, the ``data`` and ``size`` out arguments return a pointer to and the size of tuple data. If not found, ``*data`` is set to ``NULL`` and ``*size`` is set to ``0``." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:168 +#: ../../doc/enterprise/read_views/c_api.rst:168 +msgid "a pointer to a read view's index" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:169 +#: ../../doc/enterprise/read_views/c_api.rst:169 +#: ../../doc/enterprise/read_views/c_api.rst:191 +#: ../../doc/enterprise/read_views/c_api.rst:191 +msgid "a pointer to the first byte of the MsgPack data that represents the search key" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:170 +#: ../../doc/enterprise/read_views/c_api.rst:170 +#: ../../doc/enterprise/read_views/c_api.rst:192 +#: ../../doc/enterprise/read_views/c_api.rst:192 +msgid "a pointer to the byte following the last byte of the MsgPack data that represents the search key" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:171 +#: ../../doc/enterprise/read_views/c_api.rst:171 +msgid "a pointer to the tuple data" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:172 +#: ../../doc/enterprise/read_views/c_api.rst:172 +msgid "the size of tuple data" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:174 +#: ../../doc/enterprise/read_views/c_api.rst:194 +#: ../../doc/enterprise/read_views/c_api.rst:210 +msgid "``0`` on success; in the case of error, returns ``-1`` and sets :ref:`box_error_last()`" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:183 +msgid "Create an iterator over a raw read view index. The initialized iterator object returned by this function remains valid and may be safely used until it's destroyed or the read view is closed. When the iterator object is no longer needed, it should be destroyed using :ref:`box_raw_read_view_iterator_destroy() `." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:188 +#: ../../doc/enterprise/read_views/c_api.rst:188 +msgid "an iterator over a raw read view index" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:189 +#: ../../doc/enterprise/read_views/c_api.rst:189 +msgid "a pointer to a read view index" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:190 +msgid "an iteration direction represented by the :ref:`iterator_type `" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:202 +msgid "Retrieve the current tuple and advance the given iterator over a raw read view index. The pointer to and the size of tuple data are returned in the ``data`` and the ``size`` out arguments. The data returned by this function remains valid and may be safely used until the read view is closed." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:206 +#: ../../doc/enterprise/read_views/c_api.rst:206 +#: ../../doc/enterprise/read_views/c_api.rst:222 +#: ../../doc/enterprise/read_views/c_api.rst:222 +msgid "an iterator over a read view index" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:207 +#: ../../doc/enterprise/read_views/c_api.rst:207 +msgid "a pointer to the tuple data; at the end of iteration, ``*data`` is set to ``NULL``" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:208 +#: ../../doc/enterprise/read_views/c_api.rst:208 +msgid "the size of tuple data; at the end of iteration, ``*size`` is set to ``0``" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:218 +msgid "Destroy an iterator over a raw read view index. The iterator object should not be used after calling this function, but the data returned by the iterator may be safely dereferenced until the read view is closed." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:231 +msgid "Space format" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:233 +msgid "A space object's methods below provide the ability to get names and types of space fields." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:240 +msgid "Get the number of fields defined in the format of a read view space." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:242 +#: ../../doc/enterprise/read_views/c_api.rst:242 +#: ../../doc/enterprise/read_views/c_api.rst:256 +#: ../../doc/enterprise/read_views/c_api.rst:256 +#: ../../doc/enterprise/read_views/c_api.rst:271 +#: ../../doc/enterprise/read_views/c_api.rst:271 +msgid "a pointer to a read view space" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:244 +msgid "the number of fields" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:252 +msgid "Get the name of a field defined in the format of a read view space. If the field number is greater than the total number of fields defined in the format, ``NULL`` is returned. The string returned by this function is guaranteed to remain valid until the read view is closed." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:257 +#: ../../doc/enterprise/read_views/c_api.rst:272 +msgid "the field number (starts with ``0``)" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:259 +msgid "the name of a field" +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:267 +msgid "Get the type of a field defined in the format of a read view space. If the field number is greater than the total number of fields defined in the format, ``NULL`` is returned. The string returned by this function is guaranteed to remain valid until the read view is closed." +msgstr "" + +#: ../../doc/enterprise/read_views/c_api.rst:274 +msgid "the type of a field" +msgstr "" diff --git a/locale/en/enterprise/read_views/lua_api.pot b/locale/en/enterprise/read_views/lua_api.pot new file mode 100644 index 0000000000..1d7ec261e5 --- /dev/null +++ b/locale/en/enterprise/read_views/lua_api.pot @@ -0,0 +1,143 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/read_views/lua_api.rst:4 +msgid "Read views: Lua API" +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:6 +msgid "This topic describes the Lua API for working with :ref:`read views `." +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:12 +msgid "Create a :ref:`new read view `." +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:14 +msgid "(optional) configurations options for a read view. For example, the ``name`` option specifies a read view name. If ``name`` is not specified, a read view name is set to ``unknown``." +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:0 +#: ../../doc/enterprise/read_views/lua_api.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:18 +msgid "a created read view object" +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:0 +#: ../../doc/enterprise/read_views/lua_api.rst:0 +#: ../../doc/enterprise/read_views/lua_api.rst:0 +#: ../../doc/enterprise/read_views/lua_api.rst:0 +#: ../../doc/enterprise/read_views/lua_api.rst:0 +#: ../../doc/enterprise/read_views/lua_api.rst:0 +#: ../../doc/enterprise/read_views/lua_api.rst:0 +#: ../../doc/enterprise/read_views/lua_api.rst:0 +#: ../../doc/enterprise/read_views/lua_api.rst:0 +#: ../../doc/enterprise/read_views/lua_api.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:19 +msgid "read_view_object" +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:21 +msgid "**Example:**" +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:23 +msgid "tarantool> read_view1 = box.read_view.open({name = 'read_view1'})" +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:31 +msgid "An object that represents a :ref:`read view `." +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:37 +msgid "Get information about a read view such as a name, status, or ID. All the available fields are listed below in the object options." +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:40 +msgid "information about a read view" +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:41 +#: ../../doc/enterprise/read_views/lua_api.rst:101 +msgid "table" +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:47 +msgid "Close a read view. After the read view is closed, its :ref:`status ` is set to ``closed``. On an attempt to use it, an error is raised." +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:55 +msgid "A read view status. The possible values are ``open`` and ``closed``." +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:58 +#: ../../doc/enterprise/read_views/lua_api.rst:75 +msgid "string" +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:64 +msgid "A unique numeric identifier of a read view." +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:66 +#: ../../doc/enterprise/read_views/lua_api.rst:93 +#: ../../doc/enterprise/read_views/lua_api.rst:109 +msgid "number" +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:72 +msgid "A read view name. You can specify a read view name in the :ref:`box.read_view.open() ` arguments." +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:81 +msgid "Determine whether a read view is system. For example, system read views can be created to make a :ref:`checkpoint ` or join a new :ref:`replica `." +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:85 +msgid "boolean" +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:91 +msgid "The :ref:`fiber.clock() ` value at the moment of opening a read view." +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:99 +msgid "The :ref:`box.info.vclock ` value at the moment of opening a read view." +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:107 +msgid "The :ref:`box.info.signature ` value at the moment of opening a read view." +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:115 +msgid "Get access to database spaces included in a read view. You can use this field to :ref:`query space data `." +msgstr "" + +#: ../../doc/enterprise/read_views/lua_api.rst:118 +msgid "space object" +msgstr "" diff --git a/locale/en/enterprise/rocksref.pot b/locale/en/enterprise/rocksref.pot new file mode 100644 index 0000000000..a947f73a78 --- /dev/null +++ b/locale/en/enterprise/rocksref.pot @@ -0,0 +1,121 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/rocksref.rst:5 +msgid "Modules" +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:7 +msgid "This section covers open and closed source Lua modules for Tarantool Enterprise Edition included in the distribution as an offline rocks repository." +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:12 +msgid "Open source modules" +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:14 +msgid "`avro-schema `_ is an assembly of `Apache Avro `_ schema tools;" +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:18 +msgid ":ref:`checks ` is a type checker of functional arguments. This library that declares a ``checks()`` function and ``checkers`` table that allow to check the parameters passed to a Lua function in a fast and unobtrusive way." +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:22 +msgid "`http `_ is an on-board HTTP-server, which comes in addition to Tarantool's out-of-the-box HTTP client, and must be installed as described in the :ref:`installation section `." +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:26 +msgid "`icu-date `_ is a date-and-time formatting library for Tarantool based on International Components for Unicode;" +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:29 +msgid "`kafka `_ is a full-featured high-performance ``kafka`` library for Tarantool based on ``librdkafka``;" +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:32 +msgid "`luacheck `_ is a static analyzer and linter for Lua, preconfigured for Tarantool." +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:34 +msgid "`luarapidxml `_ is a fast XML parser." +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:36 +msgid "`luatest `_ is a Tarantool test framework written in Lua." +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:38 +msgid ":ref:`membership ` builds a mesh from multiple Tarantool instances based on gossip protocol. The mesh monitors itself, helps members discover everyone else in the group and get notified about their status changes with low latency. It is built upon the ideas from Consul or, more precisely, the SWIM algorithm." +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:43 +msgid ":ref:`metrics ` is a collection of useful monitoring metrics." +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:45 +msgid "`tracing `_ is a module for debugging performance issues." +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:47 +msgid ":ref:`vshard ` is an automatic sharding system that enables horizontal scaling for Tarantool DBMS instances." +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:53 +msgid "Closed source modules" +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:55 +msgid ":doc:`ldap ` allows you to authenticate in a LDAP server and perform searches." +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:57 +msgid ":doc:`odbc ` is an ODBC connector for Tarantool based on unixODBC." +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:59 +msgid ":doc:`oracle ` is an Oracle connector for Lua applications through which they can send and receive data to and from Oracle databases. The advantage of the Tarantool-Oracle integration is that anyone can handle all the tasks with Oracle DBMSs (control, manipulation, storage, access) with the same high-level language (Lua) and with minimal delay." +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:65 +msgid ":doc:`task ` is a module for managing background tasks in a Tarantool cluster." +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:72 +msgid "Installing and using modules" +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:74 +msgid "To use a module, install the following:" +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:76 +msgid "All the necessary third-party software packages (if any). See the module's prerequisites for the list." +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:79 +msgid "The module itself on every Tarantool instance:" +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:81 +msgid "$ tt rocks install MODULE_NAME [MODULE_VERSION]" +msgstr "" + +#: ../../doc/enterprise/rocksref.rst:85 +msgid "See the :ref:`tt rocks reference ` to learn more about managing Lua modules." +msgstr "" diff --git a/locale/en/enterprise/security.pot b/locale/en/enterprise/security.pot new file mode 100644 index 0000000000..7e0dcc3704 --- /dev/null +++ b/locale/en/enterprise/security.pot @@ -0,0 +1,1025 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/security.rst:4 +msgid "Security hardening guide" +msgstr "" + +#: ../../doc/enterprise/security.rst:6 +msgid "This guide explains how to enhance security in your Tarantool Enterprise Edition's cluster using built-in features and provides general recommendations on security hardening. If you need to perform a security audit of a Tarantool Enterprise cluster, refer to the :doc:`security checklist `." +msgstr "" + +#: ../../doc/enterprise/security.rst:12 +msgid "Tarantool Enterprise Edition does not provide a dedicated API for security control. All the necessary configurations can be done via an administrative console or initialization code." +msgstr "" + +#: ../../doc/enterprise/security.rst:16 +msgid "Tarantool Enterprise Edition has the following built-in security features:" +msgstr "" + +#: ../../doc/enterprise/security.rst:18 +msgid ":ref:`authentication `" +msgstr "" + +#: ../../doc/enterprise/security.rst:19 +msgid ":ref:`access control `" +msgstr "" + +#: ../../doc/enterprise/security.rst:20 +msgid ":ref:`audit log `" +msgstr "" + +#: ../../doc/enterprise/security.rst:21 +msgid ":ref:`traffic encryption `" +msgstr "" + +#: ../../doc/enterprise/security.rst:27 +msgid "Authentication" +msgstr "" + +#: ../../doc/enterprise/security.rst:29 +msgid "Tarantool Enterprise Edition supports password-based authentication and allows for two types of connections:" +msgstr "" + +#: ../../doc/enterprise/security.rst:32 +msgid "Via an :doc:`administrative console `." +msgstr "" + +#: ../../doc/enterprise/security.rst:33 +msgid "Over a binary port for read and write operations and procedure invocation." +msgstr "" + +#: ../../doc/enterprise/security.rst:35 +msgid "For more information on authentication and connection types, see the :doc:`Security ` section of the Tarantool manual." +msgstr "" + +#: ../../doc/enterprise/security.rst:38 +msgid "In addition, Tarantool provides the following functionality:" +msgstr "" + +#: ../../doc/enterprise/security.rst:40 +msgid ":ref:`Sessions ` -- states which associate connections with users and make Tarantool API available to them after authentication." +msgstr "" + +#: ../../doc/enterprise/security.rst:43 +msgid "Authentication :ref:`triggers `, which execute actions on authentication events." +msgstr "" + +#: ../../doc/enterprise/security.rst:45 +msgid "Third-party (external) authentication protocols and services such as LDAP or Active Directory -- supported in the web interface, but unavailable on the binary-protocol level." +msgstr "" + +#: ../../doc/enterprise/security.rst:52 +msgid "Access control" +msgstr "" + +#: ../../doc/enterprise/security.rst:54 +msgid "Tarantool Enterprise Edition provides the means for administrators to prevent unauthorized access to the database and to certain functions." +msgstr "" + +#: ../../doc/enterprise/security.rst:57 +msgid "Tarantool recognizes:" +msgstr "" + +#: ../../doc/enterprise/security.rst:59 +msgid "different users (guests and administrators)" +msgstr "" + +#: ../../doc/enterprise/security.rst:60 +msgid "privileges associated with users" +msgstr "" + +#: ../../doc/enterprise/security.rst:61 +msgid "roles (containers for privileges) granted to users" +msgstr "" + +#: ../../doc/enterprise/security.rst:63 +msgid "The following system spaces are used to store users and privileges:" +msgstr "" + +#: ../../doc/enterprise/security.rst:65 +msgid "The ``_user`` space to store usernames and hashed passwords for authentication." +msgstr "" + +#: ../../doc/enterprise/security.rst:66 +msgid "The ``_priv`` space to store privileges for access control." +msgstr "" + +#: ../../doc/enterprise/security.rst:68 +msgid "For more information, see the :ref:`Access control ` section." +msgstr "" + +#: ../../doc/enterprise/security.rst:71 +msgid "Users who create **objects** (spaces, indexes, users, roles, sequences, and functions) in the database become their **owners** and automatically acquire privileges for what they create. For more information, see the :ref:`Owners and privileges ` section." +msgstr "" + +#: ../../doc/enterprise/security.rst:80 +msgid "Authentication restrictions" +msgstr "" + +#: ../../doc/enterprise/security.rst:82 +msgid "Tarantool Enterprise Edition provides the ability to apply additional restrictions for user authentication. For example, you can specify the minimum time between authentication attempts or disable access for guest users." +msgstr "" + +#: ../../doc/enterprise/security.rst:86 +#: ../../doc/enterprise/security.rst:145 +msgid "The following :doc:`configuration options ` are available:" +msgstr "" + +#: ../../doc/enterprise/security.rst:88 +msgid ":ref:`auth_delay `" +msgstr "" + +#: ../../doc/enterprise/security.rst:89 +msgid ":ref:`disable_guest `" +msgstr "" + +#: ../../doc/enterprise/security.rst:96 +msgid "Specifies a period of time (in seconds) that a specific user should wait for the next attempt after failed authentication." +msgstr "" + +#: ../../doc/enterprise/security.rst:99 +msgid "With the configuration below, Tarantool refuses the authentication attempt if the previous attempt was less than 5 seconds ago." +msgstr "" + +#: ../../doc/enterprise/security.rst:102 +msgid "box.cfg{ auth_delay = 5 }" +msgstr "" + +#: ../../doc/enterprise/security.rst:107 +#: ../../doc/enterprise/security.rst:124 +#: ../../doc/enterprise/security.rst:167 +#: ../../doc/enterprise/security.rst:180 +#: ../../doc/enterprise/security.rst:193 +#: ../../doc/enterprise/security.rst:206 +#: ../../doc/enterprise/security.rst:219 +#: ../../doc/enterprise/security.rst:244 +#: ../../doc/enterprise/security.rst:263 +#: ../../doc/enterprise/security.rst:301 +msgid "Since version: 2.11" +msgstr "" + +#: ../../doc/enterprise/security.rst:108 +msgid "Type: number" +msgstr "" + +#: ../../doc/enterprise/security.rst:109 +#: ../../doc/enterprise/security.rst:169 +#: ../../doc/enterprise/security.rst:246 +#: ../../doc/enterprise/security.rst:265 +msgid "Default: 0" +msgstr "" + +#: ../../doc/enterprise/security.rst:110 +msgid "Environment variable: TT_AUTH_DELAY" +msgstr "" + +#: ../../doc/enterprise/security.rst:111 +#: ../../doc/enterprise/security.rst:128 +#: ../../doc/enterprise/security.rst:171 +#: ../../doc/enterprise/security.rst:184 +#: ../../doc/enterprise/security.rst:197 +#: ../../doc/enterprise/security.rst:210 +#: ../../doc/enterprise/security.rst:223 +#: ../../doc/enterprise/security.rst:248 +#: ../../doc/enterprise/security.rst:267 +#: ../../doc/enterprise/security.rst:306 +msgid "Dynamic: **yes**" +msgstr "" + +#: ../../doc/enterprise/security.rst:118 +msgid "If **true**, disables access over remote connections from unauthenticated or :ref:`guest access ` users. This option affects both :doc:`net.box ` and :ref:`replication ` connections." +msgstr "" + +#: ../../doc/enterprise/security.rst:125 +#: ../../doc/enterprise/security.rst:181 +#: ../../doc/enterprise/security.rst:194 +#: ../../doc/enterprise/security.rst:207 +#: ../../doc/enterprise/security.rst:220 +msgid "Type: boolean" +msgstr "" + +#: ../../doc/enterprise/security.rst:126 +#: ../../doc/enterprise/security.rst:182 +#: ../../doc/enterprise/security.rst:195 +#: ../../doc/enterprise/security.rst:208 +#: ../../doc/enterprise/security.rst:221 +msgid "Default: false" +msgstr "" + +#: ../../doc/enterprise/security.rst:127 +msgid "Environment variable: TT_DISABLE_GUEST" +msgstr "" + +#: ../../doc/enterprise/security.rst:135 +msgid "Password policy" +msgstr "" + +#: ../../doc/enterprise/security.rst:137 +msgid "A password policy allows you to improve database security by enforcing the use of strong passwords, setting up a maximum password age, and so on. When you create a new user with :doc:`box.schema.user.create ` or update the password of an existing user with :doc:`box.schema.user.passwd `, the password is checked against the configured password policy settings." +msgstr "" + +#: ../../doc/enterprise/security.rst:147 +msgid ":ref:`password_min_length `" +msgstr "" + +#: ../../doc/enterprise/security.rst:148 +msgid ":ref:`password_enforce_uppercase `" +msgstr "" + +#: ../../doc/enterprise/security.rst:149 +msgid ":ref:`password_enforce_lowercase `" +msgstr "" + +#: ../../doc/enterprise/security.rst:150 +msgid ":ref:`password_enforce_digits `" +msgstr "" + +#: ../../doc/enterprise/security.rst:151 +msgid ":ref:`password_enforce_specialchars `" +msgstr "" + +#: ../../doc/enterprise/security.rst:152 +msgid ":ref:`password_lifetime_days `" +msgstr "" + +#: ../../doc/enterprise/security.rst:153 +msgid ":ref:`password_history_length `" +msgstr "" + +#: ../../doc/enterprise/security.rst:159 +msgid "Specifies the minimum number of characters for a password." +msgstr "" + +#: ../../doc/enterprise/security.rst:161 +msgid "The following example shows how to set the minimum password length to 10." +msgstr "" + +#: ../../doc/enterprise/security.rst:163 +msgid "box.cfg{ password_min_length = 10 }" +msgstr "" + +#: ../../doc/enterprise/security.rst:168 +#: ../../doc/enterprise/security.rst:245 +#: ../../doc/enterprise/security.rst:264 +msgid "Type: integer" +msgstr "" + +#: ../../doc/enterprise/security.rst:170 +msgid "Environment variable: TT_PASSWORD_MIN_LENGTH" +msgstr "" + +#: ../../doc/enterprise/security.rst:178 +msgid "If **true**, a password should contain uppercase letters (A-Z)." +msgstr "" + +#: ../../doc/enterprise/security.rst:183 +msgid "Environment variable: TT_PASSWORD_ENFORCE_UPPERCASE" +msgstr "" + +#: ../../doc/enterprise/security.rst:191 +msgid "If **true**, a password should contain lowercase letters (a-z)." +msgstr "" + +#: ../../doc/enterprise/security.rst:196 +msgid "Environment variable: TT_PASSWORD_ENFORCE_LOWERCASE" +msgstr "" + +#: ../../doc/enterprise/security.rst:204 +msgid "If **true**, a password should contain digits (0-9)." +msgstr "" + +#: ../../doc/enterprise/security.rst:209 +msgid "Environment variable: TT_PASSWORD_ENFORCE_DIGITS" +msgstr "" + +#: ../../doc/enterprise/security.rst:217 +msgid "If **true**, a password should contain at least one special character (such as ``&|?!@$``)." +msgstr "" + +#: ../../doc/enterprise/security.rst:222 +msgid "Environment variable: TT_PASSWORD_ENFORCE_SPECIALCHARS" +msgstr "" + +#: ../../doc/enterprise/security.rst:230 +msgid "Specifies the maximum period of time (in days) a user can use the same password. When this period ends, a user gets the \"Password expired\" error on a login attempt. To restore access for such users, use :doc:`box.schema.user.passwd `." +msgstr "" + +#: ../../doc/enterprise/security.rst:236 +msgid "The default 0 value means that a password never expires." +msgstr "" + +#: ../../doc/enterprise/security.rst:238 +msgid "The example below shows how to set a maximum password age to 365 days." +msgstr "" + +#: ../../doc/enterprise/security.rst:240 +msgid "box.cfg{ password_lifetime_days = 365 }" +msgstr "" + +#: ../../doc/enterprise/security.rst:247 +msgid "Environment variable: TT_PASSWORD_LIFETIME_DAYS" +msgstr "" + +#: ../../doc/enterprise/security.rst:255 +msgid "Specifies the number of unique new user passwords before an old password can be reused." +msgstr "" + +#: ../../doc/enterprise/security.rst:257 +msgid "In the example below, a new password should differ from the last three passwords." +msgstr "" + +#: ../../doc/enterprise/security.rst:259 +msgid "box.cfg{ password_history_length = 3 }" +msgstr "" + +#: ../../doc/enterprise/security.rst:266 +msgid "Environment variable: TT_PASSWORD_HISTORY_LENGTH" +msgstr "" + +#: ../../doc/enterprise/security.rst:270 +msgid "Tarantool uses the ``auth_history`` field in the :doc:`box.space._user ` system space to store user passwords." +msgstr "" + +#: ../../doc/enterprise/security.rst:280 +msgid "Authentication protocol" +msgstr "" + +#: ../../doc/enterprise/security.rst:282 +msgid "By default, Tarantool uses the `CHAP `_ protocol to authenticate users and applies ``SHA-1`` hashing to :ref:`passwords `. Note that CHAP stores password hashes in the ``_user`` space unsalted. If an attacker gains access to the database, they may crack a password, for example, using a `rainbow table `_." +msgstr "" + +#: ../../doc/enterprise/security.rst:289 +msgid "In the Enterprise Edition, you can enable `PAP `_ authentication with the ``SHA256`` hashing algorithm. For PAP, a password is salted with a user-unique salt before saving it in the database, which keeps the database protected from cracking using a rainbow table." +msgstr "" + +#: ../../doc/enterprise/security.rst:295 +msgid "To enable PAP, specify the ``box.cfg.auth_type`` option as follows:" +msgstr "" + +#: ../../doc/enterprise/security.rst:297 +msgid "box.cfg{ auth_type = 'pap-sha256' }" +msgstr "" + +#: ../../doc/enterprise/security.rst:302 +msgid "Type: string" +msgstr "" + +#: ../../doc/enterprise/security.rst:303 +msgid "Default value: 'chap-sha1'" +msgstr "" + +#: ../../doc/enterprise/security.rst:304 +msgid "Possible values: 'chap-sha1', 'pap-sha256'" +msgstr "" + +#: ../../doc/enterprise/security.rst:305 +msgid "Environment variable: TT_AUTH_TYPE" +msgstr "" + +#: ../../doc/enterprise/security.rst:308 +msgid "For new users, the :doc:`box.schema.user.create ` method will generate authentication data using ``PAP-SHA256``. For existing users, you need to reset a password using :doc:`box.schema.user.passwd ` to use the new authentication protocol." +msgstr "" + +#: ../../doc/enterprise/security.rst:316 +msgid "Given that ``PAP`` transmits a password as plain text, Tarantool requires configuring :ref:`SSL/TLS ` for a connection." +msgstr "" + +#: ../../doc/enterprise/security.rst:320 +msgid "The examples below show how to specify the authentication protocol on the client side:" +msgstr "" + +#: ../../doc/enterprise/security.rst:322 +msgid "For :doc:`net.box `, you can specify the authentication protocol using the ``auth_type`` URI parameter or the corresponding connection option:" +msgstr "" + +#: ../../doc/enterprise/security.rst:326 +msgid "-- URI parameters\n" +"conn = require('net.box').connect(\n" +" 'username:password@localhost:3301?auth_type=pap-sha256')\n" +"\n" +"-- URI parameters table\n" +"conn = require('net.box').connect({\n" +" uri = 'username:password@localhost:3301',\n" +" params = {auth_type = 'pap-sha256'},\n" +"})\n" +"\n" +"-- Connection options\n" +"conn = require('net.box').connect('localhost:3301', {\n" +" user = 'username',\n" +" password = 'password',\n" +" auth_type = 'pap-sha256',\n" +"})" +msgstr "" + +#: ../../doc/enterprise/security.rst:345 +msgid "For :ref:`replication configuration `, the authentication protocol can be specified in URI parameters:" +msgstr "" + +#: ../../doc/enterprise/security.rst:348 +msgid "-- URI parameters\n" +"box.cfg{\n" +" replication = {\n" +" 'replicator:password@localhost:3301?auth_type=pap-sha256',\n" +" },\n" +"}\n" +"\n" +"-- URI parameters table\n" +"box.cfg{\n" +" replication = {\n" +" {\n" +" uri = 'replicator:password@localhost:3301',\n" +" params = {auth_type = 'pap-sha256'},\n" +" },\n" +" },\n" +"}" +msgstr "" + +#: ../../doc/enterprise/security.rst:367 +msgid "If the authentication protocol isn't specified explicitly on the client side, the client uses the protocol configured on the server via ``box.cfg.auth_type``." +msgstr "" + +#: ../../doc/enterprise/security.rst:376 +msgid "Audit log" +msgstr "" + +#: ../../doc/enterprise/security.rst:378 +msgid "Tarantool Enterprise Edition has a built-in audit log that records events such as:" +msgstr "" + +#: ../../doc/enterprise/security.rst:380 +msgid "authentication successes and failures" +msgstr "" + +#: ../../doc/enterprise/security.rst:381 +msgid "connection closures" +msgstr "" + +#: ../../doc/enterprise/security.rst:382 +msgid "creation, removal, enabling, and disabling of users" +msgstr "" + +#: ../../doc/enterprise/security.rst:383 +msgid "changes of passwords, privileges, and roles" +msgstr "" + +#: ../../doc/enterprise/security.rst:384 +msgid "denials of access to database objects" +msgstr "" + +#: ../../doc/enterprise/security.rst:386 +msgid "The audit log contains:" +msgstr "" + +#: ../../doc/enterprise/security.rst:388 +msgid "timestamps" +msgstr "" + +#: ../../doc/enterprise/security.rst:389 +msgid "usernames of users who performed actions" +msgstr "" + +#: ../../doc/enterprise/security.rst:390 +msgid "event types (e.g. ``user_create``, ``user_enable``, ``disconnect``, etc)" +msgstr "" + +#: ../../doc/enterprise/security.rst:391 +msgid "descriptions" +msgstr "" + +#: ../../doc/enterprise/security.rst:393 +msgid "You can configure the following audit log parameters:" +msgstr "" + +#: ../../doc/enterprise/security.rst:395 +msgid "``audit_log = `` which is similar to the :ref:`log ` parameter. This parameter tells Tarantool to record audit events to a specific file." +msgstr "" + +#: ../../doc/enterprise/security.rst:398 +msgid "``audit_nonblock`` which is similar to the :ref:`log_nonblock ` parameter." +msgstr "" + +#: ../../doc/enterprise/security.rst:402 +msgid "For more information on logging, see the following:" +msgstr "" + +#: ../../doc/enterprise/security.rst:404 +msgid "the :doc:`Logs ` section" +msgstr "" + +#: ../../doc/enterprise/security.rst:405 +msgid "the :ref:`Logging ` section in the configuration reference" +msgstr "" + +#: ../../doc/enterprise/security.rst:406 +msgid "the :ref:`Tarantool audit module ` topic" +msgstr "" + +#: ../../doc/enterprise/security.rst:408 +msgid "Access permissions to audit log files can be set up as to any other Unix file system object -- via ``chmod``." +msgstr "" + +#: ../../doc/enterprise/security.rst:414 +msgid "Traffic encryption" +msgstr "" + +#: ../../doc/enterprise/security.rst:416 +msgid "Since version 2.10.0, Tarantool Enterprise Edition has the built-in support for using SSL to encrypt the client-server communications over :ref:`binary connections `, that is, between Tarantool instances in a cluster or connecting to an instance via connectors using :doc:`net.box `." +msgstr "" + +#: ../../doc/enterprise/security.rst:419 +msgid "Tarantool uses the OpenSSL library that is included in the delivery package. Please note that SSL connections use only TLSv1.2." +msgstr "" + +#: ../../doc/enterprise/security.rst:425 +msgid "Configuration" +msgstr "" + +#: ../../doc/enterprise/security.rst:427 +msgid "To configure traffic encryption, you need to set the special :ref:`URI parameters ` for a particular connection. The parameters can be set for the following ``box.cfg`` options and ``nex.box`` method:" +msgstr "" + +#: ../../doc/enterprise/security.rst:430 +msgid ":ref:`box.cfg.listen ` -- on the server side." +msgstr "" + +#: ../../doc/enterprise/security.rst:431 +msgid ":ref:`box.cfg.replication `--on the client side." +msgstr "" + +#: ../../doc/enterprise/security.rst:432 +msgid ":ref:`net_box_object.connect() `--on the client side." +msgstr "" + +#: ../../doc/enterprise/security.rst:434 +msgid "Below is the list of the parameters. In the :ref:`next section `, you can find details and examples on what should be configured on both the server side and the client side." +msgstr "" + +#: ../../doc/enterprise/security.rst:437 +msgid "``transport`` -- enables SSL encryption for a connection if set to ``ssl``. The default value is ``plain``, which means the encryption is off. If the parameter is not set, the encryption is off too. Other encryption-related parameters can be used only if the ``transport = 'ssl'`` is set." +msgstr "" + +#: ../../doc/enterprise/security.rst:441 +msgid "Example:" +msgstr "" + +#: ../../doc/enterprise/security.rst:443 +msgid "c = require('net.box').connect({\n" +" uri = 'localhost:3301',\n" +" params = {transport = 'ssl'}\n" +"})" +msgstr "" + +#: ../../doc/enterprise/security.rst:450 +msgid "``ssl_key_file`` -- a path to a private SSL key file. Mandatory for a server. For a client, it's mandatory if the ``ssl_ca_file`` parameter is set for a server; otherwise, optional. If the private key is encrypted, provide a password for it in the ``ssl_password`` or ``ssl_password_file`` parameter." +msgstr "" + +#: ../../doc/enterprise/security.rst:455 +msgid "``ssl_cert_file`` -- a path to an SSL certificate file. Mandatory for a server. For a client, it's mandatory if the ``ssl_ca_file`` parameter is set for a server; otherwise, optional." +msgstr "" + +#: ../../doc/enterprise/security.rst:459 +msgid "``ssl_ca_file`` -- a path to a trusted certificate authorities (CA) file. Optional. If not set, the peer won't be checked for authenticity." +msgstr "" + +#: ../../doc/enterprise/security.rst:461 +msgid "Both a server and a client can use the ``ssl_ca_file`` parameter:" +msgstr "" + +#: ../../doc/enterprise/security.rst:463 +msgid "If it's on the server side, the server verifies the client." +msgstr "" + +#: ../../doc/enterprise/security.rst:464 +msgid "If it's on the client side, the client verifies the server." +msgstr "" + +#: ../../doc/enterprise/security.rst:465 +msgid "If both sides have the CA files, the sever and the client verify each other." +msgstr "" + +#: ../../doc/enterprise/security.rst:467 +msgid "``ssl_ciphers`` -- a colon-separated (``:``) list of SSL cipher suites the connection can use. See the :ref:`enterprise-iproto-encryption-ciphers` section for details. Optional. Note that the list is not validated: if a cipher suite is unknown, Tarantool just ignores it, doesn't establish the connection and writes to the log that no shared cipher found." +msgstr "" + +#: ../../doc/enterprise/security.rst:470 +msgid "``ssl_password`` -- a password for an encrypted private SSL key. Optional. Alternatively, the password can be provided in ``ssl_password_file``." +msgstr "" + +#: ../../doc/enterprise/security.rst:473 +msgid "``ssl_password_file`` -- a text file with one or more passwords for encrypted private SSL keys (each on a separate line). Optional. Alternatively, the password can be provided in ``ssl_password``." +msgstr "" + +#: ../../doc/enterprise/security.rst:476 +msgid "Tarantool applies the ``ssl_password`` and ``ssl_password_file`` parameters in the following order:" +msgstr "" + +#: ../../doc/enterprise/security.rst:478 +msgid "If ``ssl_password`` is provided, Tarantool tries to decrypt the private key with it." +msgstr "" + +#: ../../doc/enterprise/security.rst:479 +msgid "If ``ssl_password`` is incorrect or isn't provided, Tarantool tries all passwords from ``ssl_password_file`` one by one in the order they are written." +msgstr "" + +#: ../../doc/enterprise/security.rst:481 +msgid "If ``ssl_password`` and all passwords from ``ssl_password_file`` are incorrect, or none of them is provided, Tarantool treats the private key as unencrypted." +msgstr "" + +#: ../../doc/enterprise/security.rst:484 +msgid "Configuration example:" +msgstr "" + +#: ../../doc/enterprise/security.rst:486 +msgid "box.cfg{ listen = {\n" +" uri = 'localhost:3301',\n" +" params = {\n" +" transport = 'ssl',\n" +" ssl_key_file = '/path_to_key_file',\n" +" ssl_cert_file = '/path_to_cert_file',\n" +" ssl_ciphers = 'HIGH:!aNULL',\n" +" ssl_password = 'topsecret'\n" +" }\n" +"}}" +msgstr "" + +#: ../../doc/enterprise/security.rst:502 +msgid "Supported ciphers" +msgstr "" + +#: ../../doc/enterprise/security.rst:504 +msgid "Tarantool Enterprise supports the following cipher suites:" +msgstr "" + +#: ../../doc/enterprise/security.rst:506 +msgid "ECDHE-ECDSA-AES256-GCM-SHA384" +msgstr "" + +#: ../../doc/enterprise/security.rst:507 +msgid "ECDHE-RSA-AES256-GCM-SHA384" +msgstr "" + +#: ../../doc/enterprise/security.rst:508 +msgid "DHE-RSA-AES256-GCM-SHA384" +msgstr "" + +#: ../../doc/enterprise/security.rst:509 +msgid "ECDHE-ECDSA-CHACHA20-POLY1305" +msgstr "" + +#: ../../doc/enterprise/security.rst:510 +msgid "ECDHE-RSA-CHACHA20-POLY1305" +msgstr "" + +#: ../../doc/enterprise/security.rst:511 +msgid "DHE-RSA-CHACHA20-POLY1305" +msgstr "" + +#: ../../doc/enterprise/security.rst:512 +msgid "ECDHE-ECDSA-AES128-GCM-SHA256" +msgstr "" + +#: ../../doc/enterprise/security.rst:513 +msgid "ECDHE-RSA-AES128-GCM-SHA256" +msgstr "" + +#: ../../doc/enterprise/security.rst:514 +msgid "DHE-RSA-AES128-GCM-SHA256" +msgstr "" + +#: ../../doc/enterprise/security.rst:515 +msgid "ECDHE-ECDSA-AES256-SHA384" +msgstr "" + +#: ../../doc/enterprise/security.rst:516 +msgid "ECDHE-RSA-AES256-SHA384" +msgstr "" + +#: ../../doc/enterprise/security.rst:517 +msgid "DHE-RSA-AES256-SHA256" +msgstr "" + +#: ../../doc/enterprise/security.rst:518 +msgid "ECDHE-ECDSA-AES128-SHA256" +msgstr "" + +#: ../../doc/enterprise/security.rst:519 +msgid "ECDHE-RSA-AES128-SHA256" +msgstr "" + +#: ../../doc/enterprise/security.rst:520 +msgid "DHE-RSA-AES128-SHA256" +msgstr "" + +#: ../../doc/enterprise/security.rst:521 +msgid "ECDHE-ECDSA-AES256-SHA" +msgstr "" + +#: ../../doc/enterprise/security.rst:522 +msgid "ECDHE-RSA-AES256-SHA" +msgstr "" + +#: ../../doc/enterprise/security.rst:523 +msgid "DHE-RSA-AES256-SHA" +msgstr "" + +#: ../../doc/enterprise/security.rst:524 +msgid "ECDHE-ECDSA-AES128-SHA" +msgstr "" + +#: ../../doc/enterprise/security.rst:525 +msgid "ECDHE-RSA-AES128-SHA" +msgstr "" + +#: ../../doc/enterprise/security.rst:526 +msgid "DHE-RSA-AES128-SHA" +msgstr "" + +#: ../../doc/enterprise/security.rst:527 +msgid "AES256-GCM-SHA384" +msgstr "" + +#: ../../doc/enterprise/security.rst:528 +msgid "AES128-GCM-SHA256" +msgstr "" + +#: ../../doc/enterprise/security.rst:529 +msgid "AES256-SHA256" +msgstr "" + +#: ../../doc/enterprise/security.rst:530 +msgid "AES128-SHA256" +msgstr "" + +#: ../../doc/enterprise/security.rst:531 +msgid "AES256-SHA" +msgstr "" + +#: ../../doc/enterprise/security.rst:532 +msgid "AES128-SHA" +msgstr "" + +#: ../../doc/enterprise/security.rst:533 +msgid "GOST2012-GOST8912-GOST8912" +msgstr "" + +#: ../../doc/enterprise/security.rst:534 +msgid "GOST2001-GOST89-GOST89" +msgstr "" + +#: ../../doc/enterprise/security.rst:536 +msgid "Tarantool Enterprise static build has the embeded engine to support the GOST cryptographic algorithms. If you use these algorithms for traffic encryption, specify the corresponding cipher suite in the ``ssl_ciphers`` parameter, for example:" +msgstr "" + +#: ../../doc/enterprise/security.rst:539 +msgid "box.cfg{ listen = {\n" +" uri = 'localhost:3301',\n" +" params = {\n" +" transport = 'ssl',\n" +" ssl_key_file = '/path_to_key_file',\n" +" ssl_cert_file = '/path_to_cert_file',\n" +" ssl_ciphers = 'GOST2012-GOST8912-GOST8912'\n" +" }\n" +"}}" +msgstr "" + +#: ../../doc/enterprise/security.rst:551 +msgid "For detailed information on SSL ciphers and their syntax, refer to `OpenSSL documentation `__." +msgstr "" + +#: ../../doc/enterprise/security.rst:554 +msgid "Using environment variables" +msgstr "" + +#: ../../doc/enterprise/security.rst:556 +msgid "The URI parameters for traffic encryption can also be set via environment variables. For example:" +msgstr "" + +#: ../../doc/enterprise/security.rst:558 +msgid "export TT_LISTEN=\"localhost:3301?transport=ssl&ssl_cert_file=/path_to_cert_file&ssl_key_file=/path_to_key_file\"" +msgstr "" + +#: ../../doc/enterprise/security.rst:562 +msgid "For details, refer to the Tarantool :ref:`configuration reference `." +msgstr "" + +#: ../../doc/enterprise/security.rst:567 +msgid "Server-client configuration details" +msgstr "" + +#: ../../doc/enterprise/security.rst:569 +msgid "When configuring the traffic encryption, you need to specify the necessary parameters on both the server side and the client side. Below you can find the summary on the options and parameters to be used and :ref:`examples of configuration `." +msgstr "" + +#: ../../doc/enterprise/security.rst:572 +msgid "**Server side**" +msgstr "" + +#: ../../doc/enterprise/security.rst:574 +msgid "Is configured via the ``box.cfg.listen`` option." +msgstr "" + +#: ../../doc/enterprise/security.rst:575 +msgid "Mandatory URI parameters: ``transport``, ``ssl_key_file`` and ``ssl_cert_file``." +msgstr "" + +#: ../../doc/enterprise/security.rst:576 +msgid "Optional URI parameters: ``ssl_ca_file``, ``ssl_ciphers``, ``ssl_password``, and ``ssl_password_file``." +msgstr "" + +#: ../../doc/enterprise/security.rst:579 +msgid "**Client side**" +msgstr "" + +#: ../../doc/enterprise/security.rst:581 +msgid "Is configured via the ``box.cfg.replication`` option (see :ref:`details `) or ``net_box_object.connect()``." +msgstr "" + +#: ../../doc/enterprise/security.rst:583 +msgid "Parameters:" +msgstr "" + +#: ../../doc/enterprise/security.rst:585 +msgid "If the server side has only the ``transport``, ``ssl_key_file`` and ``ssl_cert_file`` parameters set, on the client side, you need to specify only ``transport = ssl`` as the mandatory parameter. All other URI parameters are optional." +msgstr "" + +#: ../../doc/enterprise/security.rst:589 +msgid "If the server side also has the ``ssl_ca_file`` parameter set, on the client side, you need to specify ``transport``, ``ssl_key_file`` and ``ssl_cert_file`` as the mandatory parameters. Other parameters -- ``ssl_ca_file``, ``ssl_ciphers``, ``ssl_password``, and ``ssl_password_file`` -- are optional." +msgstr "" + +#: ../../doc/enterprise/security.rst:596 +msgid "Configuration examples" +msgstr "" + +#: ../../doc/enterprise/security.rst:598 +msgid "Suppose, there is a :ref:`master-replica ` set with two Tarantool instances:" +msgstr "" + +#: ../../doc/enterprise/security.rst:600 +#: ../../doc/enterprise/security.rst:609 +#: ../../doc/enterprise/security.rst:642 +msgid "127.0.0.1:3301 -- master (server)" +msgstr "" + +#: ../../doc/enterprise/security.rst:601 +msgid "127.0.0.1:3302 -- replica (client)." +msgstr "" + +#: ../../doc/enterprise/security.rst:603 +msgid "Examples below show the configuration related to connection encryption for two cases: when the trusted certificate authorities (CA) file is not set on the server side and when it does. Only mandatory URI parameters are mentioned in these examples." +msgstr "" + +#: ../../doc/enterprise/security.rst:607 +msgid "**Without CA**" +msgstr "" + +#: ../../doc/enterprise/security.rst:611 +msgid "box.cfg{\n" +" listen = {\n" +" uri = '127.0.0.1:3301',\n" +" params = {\n" +" transport = 'ssl',\n" +" ssl_key_file = '/path_to_key_file',\n" +" ssl_cert_file = '/path_to_cert_file'\n" +" }\n" +" }\n" +"}" +msgstr "" + +#: ../../doc/enterprise/security.rst:624 +#: ../../doc/enterprise/security.rst:658 +msgid "127.0.0.1:3302 -- replica (client)" +msgstr "" + +#: ../../doc/enterprise/security.rst:626 +msgid "box.cfg{\n" +" listen = {\n" +" uri = '127.0.0.1:3302',\n" +" params = {transport = 'ssl'}\n" +" },\n" +" replication = {\n" +" uri = 'username:password@127.0.0.1:3301',\n" +" params = {transport = 'ssl'}\n" +" },\n" +" read_only = true\n" +"}" +msgstr "" + +#: ../../doc/enterprise/security.rst:640 +msgid "**With CA**" +msgstr "" + +#: ../../doc/enterprise/security.rst:644 +msgid "box.cfg{\n" +" listen = {\n" +" uri = '127.0.0.1:3301',\n" +" params = {\n" +" transport = 'ssl',\n" +" ssl_key_file = '/path_to_key_file',\n" +" ssl_cert_file = '/path_to_cert_file',\n" +" ssl_ca_file = '/path_to_ca_file'\n" +" }\n" +" }\n" +"}" +msgstr "" + +#: ../../doc/enterprise/security.rst:660 +msgid "box.cfg{\n" +" listen = {\n" +" uri = '127.0.0.1:3302',\n" +" params = {\n" +" transport = 'ssl',\n" +" ssl_key_file = '/path_to_key_file',\n" +" ssl_cert_file = '/path_to_cert_file'\n" +" }\n" +" },\n" +" replication = {\n" +" uri = 'username:password@127.0.0.1:3301',\n" +" params = {\n" +" transport = 'ssl',\n" +" ssl_key_file = '/path_to_key_file',\n" +" ssl_cert_file = '/path_to_cert_file'\n" +" }\n" +" },\n" +" read_only = true\n" +"}" +msgstr "" + +#: ../../doc/enterprise/security.rst:685 +msgid "Recommendations on security hardening" +msgstr "" + +#: ../../doc/enterprise/security.rst:687 +msgid "This section lists recommendations that can help you harden the cluster's security." +msgstr "" + +#: ../../doc/enterprise/security.rst:692 +msgid "Encrypting traffic" +msgstr "" + +#: ../../doc/enterprise/security.rst:694 +msgid "Since version 2.10.0, Tarantool Enterprise Edition has built-in support for using SSL to encrypt the client-server communications over binary connections, that is, between Tarantool instances in a cluster. For details on enabling SSL encryption, see the :ref:`enterprise-iproto-encryption` section of this guide." +msgstr "" + +#: ../../doc/enterprise/security.rst:697 +msgid "In case the built-in encryption is not set for particular connections, consider the following security recommendations:" +msgstr "" + +#: ../../doc/enterprise/security.rst:699 +msgid "setting up connection tunneling, or" +msgstr "" + +#: ../../doc/enterprise/security.rst:700 +msgid "encrypting the actual data stored in the database." +msgstr "" + +#: ../../doc/enterprise/security.rst:702 +msgid "For more information on data encryption, see the :doc:`crypto module reference `." +msgstr "" + +#: ../../doc/enterprise/security.rst:705 +msgid "The `HTTP server module `_ provided by rocks does not support the HTTPS protocol. To set up a secure connection for a client (e.g., REST service), consider hiding the Tarantool instance (router if it is a cluster of instances) behind an Nginx server and setting up an SSL certificate for it." +msgstr "" + +#: ../../doc/enterprise/security.rst:711 +msgid "To make sure that no information can be intercepted 'from the wild', run nginx on the same physical server as the instance and set up their communication over a Unix socket. For more information, see the :doc:`socket module reference `." +msgstr "" + +#: ../../doc/enterprise/security.rst:719 +msgid "Firewall configuration" +msgstr "" + +#: ../../doc/enterprise/security.rst:721 +msgid "To protect the cluster from any unwanted network activity 'from the wild', configure the firewall on each server to allow traffic on ports listed in :ref:`Network requirements `." +msgstr "" + +#: ../../doc/enterprise/security.rst:725 +msgid "If you are using static IP addresses, whitelist them, again, on each server as the cluster has a full mesh network topology. Consider blacklisting all the other addresses on all servers except the router (running behind the Nginx server)." +msgstr "" + +#: ../../doc/enterprise/security.rst:729 +msgid "Tarantool Enterprise does not provide defense against DoS or DDoS attacks. Consider using third-party software instead." +msgstr "" + +#: ../../doc/enterprise/security.rst:735 +msgid "Data integrity" +msgstr "" + +#: ../../doc/enterprise/security.rst:737 +msgid "Tarantool Enterprise Edition does not keep checksums or provide the means to control data integrity. However, it ensures data persistence using a write-ahead log, regularly snapshots the entire data set to disk, and checks the data format whenever it reads the data back from the disk. For more information, see the :ref:`Data persistence ` section." +msgstr "" diff --git a/locale/en/enterprise/setup.pot b/locale/en/enterprise/setup.pot new file mode 100644 index 0000000000..47901dbdef --- /dev/null +++ b/locale/en/enterprise/setup.pot @@ -0,0 +1,242 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-08 07:55+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/setup.rst:5 +msgid "Setup" +msgstr "" + +#: ../../doc/enterprise/setup.rst:7 +msgid "This chapter explains how to download and set up Tarantool Enterprise Edition and run a sample application provided with it." +msgstr "" + +#: ../../doc/enterprise/setup.rst:14 +msgid "System requirements" +msgstr "" + +#: ../../doc/enterprise/setup.rst:16 +msgid "The recommended system requirements for running Tarantool Enterprise are as follows." +msgstr "" + +#: ../../doc/enterprise/setup.rst:23 +msgid "Hardware requirements" +msgstr "" + +#: ../../doc/enterprise/setup.rst:25 +msgid "To fully ensure the fault tolerance of a distributed data storage system, at least **three** physical computers or virtual servers are required." +msgstr "" + +#: ../../doc/enterprise/setup.rst:28 +msgid "For testing/development purposes, the system can be deployed using a smaller number of servers; however, it is not recommended to use such configurations for production." +msgstr "" + +#: ../../doc/enterprise/setup.rst:35 +msgid "Software requirements" +msgstr "" + +#: ../../doc/enterprise/setup.rst:37 +msgid "As host operating systems, Tarantool Enterprise Edition supports **Red Hat Enterprise Linux** and **CentOS** versions 7.5 and higher." +msgstr "" + +#: ../../doc/enterprise/setup.rst:42 +msgid "Tarantool Enterprise can run on other ``systemd``-based Linux distributions but it is not tested on them and may not work as expected." +msgstr "" + +#: ../../doc/enterprise/setup.rst:45 +msgid "``glibc`` 2.17-260.el7_6.6 and higher is required. Take care to check and update, if needed:" +msgstr "" + +#: ../../doc/enterprise/setup.rst:48 +msgid "$ rpm -q glibc\n" +"glibc-2.17-196.el7_4.2\n" +"$ yum update glibc" +msgstr "" + +#: ../../doc/enterprise/setup.rst:58 +msgid "Network requirements" +msgstr "" + +#: ../../doc/enterprise/setup.rst:60 +msgid "Hereinafter, **\"storage servers\"** or **\"Tarantool servers\"** are the computers used to store and process data, and **\"administration server\"** is the computer used by the system operator to install and configure the product." +msgstr "" + +#: ../../doc/enterprise/setup.rst:64 +msgid "The Tarantool cluster has a full mesh topology, therefore all Tarantool servers should be able to communicate and send traffic from and to TCP/UDP ports used by the cluster's instances (see ``advertise_uri: :`` and ``config: advertise_uri: ':'`` in ``/etc/tarantool/conf.d/*.yml`` for each instance). For example:" +msgstr "" + +#: ../../doc/enterprise/setup.rst:70 +msgid "# /etc/tarantool/conf.d/*.yml\n" +"\n" +"myapp.s2-replica:\n" +" advertise_uri: localhost:3305 # this is a TCP/UDP port\n" +" http_port: 8085\n" +"\n" +"all:\n" +" ...\n" +" hosts:\n" +" storage-1:\n" +" config:\n" +" advertise_uri: 'vm1:3301' # this is a TCP/UDP port\n" +" http_port: 8081" +msgstr "" + +#: ../../doc/enterprise/setup.rst:86 +msgid "To configure remote monitoring or to connect via the administrative console, the administration server should be able to access the following TCP ports on Tarantool servers:" +msgstr "" + +#: ../../doc/enterprise/setup.rst:90 +msgid "22 to use the SSH protocol," +msgstr "" + +#: ../../doc/enterprise/setup.rst:91 +msgid "ports specified in instance configuration to monitor the HTTP-metrics." +msgstr "" + +#: ../../doc/enterprise/setup.rst:93 +msgid "Additionally, it is recommended to apply the following settings for ``sysctl`` on all Tarantool servers:" +msgstr "" + +#: ../../doc/enterprise/setup.rst:96 +msgid "$ # TCP KeepAlive setting\n" +"$ sysctl -w net.ipv4.tcp_keepalive_time=60\n" +"$ sysctl -w net.ipv4.tcp_keepalive_intvl=5\n" +"$ sysctl -w net.ipv4.tcp_keepalive_probes=5" +msgstr "" + +#: ../../doc/enterprise/setup.rst:103 +msgid "This optional setup of the Linux network stack helps speed up the troubleshooting of network connectivity when the server physically fails. To achieve maximum performance, you may also need to configure other network stack parameters that are not specific to the Tarantool DBMS. For more information, please refer to the `Network Performance Tuning Guide `_ section of the RHEL7 user documentation." +msgstr "" + +#: ../../doc/enterprise/setup.rst:114 +msgid "Package contents" +msgstr "" + +#: ../../doc/enterprise/setup.rst:116 +msgid "The latest release packages of Tarantool Enterprise are available in the `customer zone `_ at Tarantool website. Please contact ``support@tarantool.io`` for access." +msgstr "" + +#: ../../doc/enterprise/setup.rst:120 +msgid "Each package is distributed as a ``tar + gzip`` archive and includes the following components and features:" +msgstr "" + +#: ../../doc/enterprise/setup.rst:123 +msgid "Static Tarantool binary for simplified deployment in Linux environments." +msgstr "" + +#: ../../doc/enterprise/setup.rst:124 +msgid "``tt`` command-line utility that provides a unified command-line interface for managing Tarantool-based applications. See :ref:`tt-cli` for details." +msgstr "" + +#: ../../doc/enterprise/setup.rst:126 +msgid "|tcm_full_name| -- a web-based interface for managing Tarantool EE clusters. See :ref:`tcm` for details." +msgstr "" + +#: ../../doc/enterprise/setup.rst:128 +msgid "Selection of open and closed source modules." +msgstr "" + +#: ../../doc/enterprise/setup.rst:129 +msgid "Sample application walking you through all included modules" +msgstr "" + +#: ../../doc/enterprise/setup.rst:131 +msgid "Archive contents:" +msgstr "" + +#: ../../doc/enterprise/setup.rst:133 +msgid "``tarantool`` is the main executable of Tarantool." +msgstr "" + +#: ../../doc/enterprise/setup.rst:134 +msgid "``tt`` command-line utility." +msgstr "" + +#: ../../doc/enterprise/setup.rst:135 +msgid "``tcm`` is the |tcm_full_name| executable." +msgstr "" + +#: ../../doc/enterprise/setup.rst:136 +msgid "``tarantoolctl`` is the utility script for installing supplementary modules and connecting to the administrative console." +msgstr "" + +#: ../../doc/enterprise/setup.rst:141 +msgid "``tarantoolctl`` is deprecated in favor of the :ref:`tt CLI utility `." +msgstr "" + +#: ../../doc/enterprise/setup.rst:143 +msgid "``examples/`` is the directory containing sample applications:" +msgstr "" + +#: ../../doc/enterprise/setup.rst:145 +msgid "``pg_writethrough_cache/`` is an application showcasing how Tarantool can cache data written to, for example, a PostgreSQL database;" +msgstr "" + +#: ../../doc/enterprise/setup.rst:147 +msgid "``ora_writebehind_cache/`` is an application showcasing how Tarantool can cache writes and queue them to, for example, an Oracle database;" +msgstr "" + +#: ../../doc/enterprise/setup.rst:149 +msgid "``docker/`` is an application designed to be easily packed into a Docker container;" +msgstr "" + +#: ../../doc/enterprise/setup.rst:152 +msgid "``rocks/`` is the directory containing a selection of additional open and closed source modules included in the distribution as an offline rocks repository. See the :ref:`rocks reference ` for details." +msgstr "" + +#: ../../doc/enterprise/setup.rst:155 +msgid "``templates/`` is the directory containing template files for your application development environment." +msgstr "" + +#: ../../doc/enterprise/setup.rst:157 +msgid "``deprecated/`` is a set of modules that are no longer supported:" +msgstr "" + +#: ../../doc/enterprise/setup.rst:159 +msgid "``vshard-zookeeper-orchestrator`` is a Python application for launching ``orchestrator``," +msgstr "" + +#: ../../doc/enterprise/setup.rst:161 +msgid "``zookeeper-scm`` files are the ZooKeeper integration modules (require ``usr/`` libraries)." +msgstr "" + +#: ../../doc/enterprise/setup.rst:169 +msgid "Installation" +msgstr "" + +#: ../../doc/enterprise/setup.rst:171 +msgid "The delivered ``tar + gzip`` archive should be uploaded to a server and unpacked:" +msgstr "" + +#: ../../doc/enterprise/setup.rst:173 +msgid "$ tar xvf tarantool-enterprise-sdk-.tar.gz" +msgstr "" + +#: ../../doc/enterprise/setup.rst:177 +msgid "No further installation is required as the unpacked binaries are almost ready to go. Go to the directory with the binaries (``tarantool-enterprise``) and add them to the executable path by running the script provided by the distribution:" +msgstr "" + +#: ../../doc/enterprise/setup.rst:181 +msgid "$ source ./env.sh" +msgstr "" + +#: ../../doc/enterprise/setup.rst:185 +msgid "Make sure you have enough privileges to run the script and that the file is executable. Otherwise, try ``chmod`` and ``chown`` commands to adjust it." +msgstr "" + +#: ../../doc/enterprise/setup.rst:188 +msgid "Next, set up your development environment as described in :ref:`the developer's guide `." +msgstr "" diff --git a/locale/en/enterprise/space_upgrade.pot b/locale/en/enterprise/space_upgrade.pot new file mode 100644 index 0000000000..09a4745a5f --- /dev/null +++ b/locale/en/enterprise/space_upgrade.pot @@ -0,0 +1,557 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/space_upgrade.rst:4 +msgid "Upgrading space schema" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:6 +msgid "In Tarantool, :ref:`migration ` refers to any change in a data schema, for example, creating an index, adding a field, or changing a field format. If you need to change a data schema, there are several possible cases:" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:10 +msgid "Schema migration does not require data migration: adding a field with the ``is_nullable`` parameter to the end of the space, creating an index." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:13 +msgid "Schema migration requires data migration. For example, it is necessary when you have to iterate over the entire space to convert columns to a new format or remove the column completely." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:16 +msgid "To solve the task of migrating the data, you can:" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:18 +msgid ":ref:`Migrate data ` to a new space manually." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:20 +msgid "Use the ``space:upgrade()`` feature." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:23 +msgid "Space upgrade overview" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:25 +msgid "The ``space:upgrade()`` feature allows users to upgrade the format of a space and the tuples stored in it without blocking the database." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:31 +msgid "How to apply space upgrade" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:33 +msgid "First, specify an upgrade function -- a function that will convert the tuples in the space to a new format. The requirements for this function are listed below." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:36 +msgid "The upgrade function takes two arguments. The first argument is a tuple to be upgraded. The second one is optional. It contains some additional information stored in plain Lua object. If omitted, the second argument is ``nil``." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:40 +msgid "The function returns a new tuple or a Lua table. For example, it can add a new field to the tuple. The new tuple must conform to the new space format set by the upgrade operation." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:43 +msgid "The function should be registered with :doc:`box.schema.func.create `. It should also be stored, deterministic, and written in Lua." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:47 +msgid "The function should not change the primary key of the tuple." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:49 +msgid "The function should be idempotent: ``f(f(t)) = f(t)``. This is necessary because the function is applied to all tuples returned to the user, and some of them may have already been upgraded in the background." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:52 +msgid "Then define a new space format. This step is optional. However, it could be useful if, for example, you want to add a new column with data. For details, check the :ref:`Usage Example ` section." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:56 +msgid "The next optional step is to choose an upgrade mode. There are three modes: ``upgrade``, ``dryrun``, and ``dryrun+upgrade``. The default value is ``upgrade``. To check an upgrade function without applying any changes, choose the ``dryrun`` mode. To run a space upgrade without testing the function, pick the ``upgrade`` mode. If you want to apply both the test and the actual upgrade, use the ``dryrun+upgrade`` option. For details, see the :ref:`Upgrade Modes ` section." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:65 +msgid "How the upgrade works" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:67 +msgid "The user defines an upgrade function. Each tuple of the chosen space is passed through the function. The function converts the tuple from the old format to a new one. The function is applied to all tuples stored in the space in the background. Besides, the function is applied to all tuples returned to the user via the box API (for example, ``select``, ``get``). Therefore, it appears that the space upgrades instantly." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:74 +msgid "Keep in mind that ``space:upgrade`` differs from the :doc:`space_object:format() ` in the following ways:" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:83 +msgid "Difference" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:84 +msgid "``space:upgrade()``" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:85 +msgid "``space:format()``" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:87 +msgid "Non-blocking" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:88 +msgid "Yes. It returns tuples in the new format, whether or not they have already been converted." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:89 +msgid "Yes." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:91 +msgid "Set a format incompatible with the current one" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:92 +msgid "Yes. Works for non-indexed field types only." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:93 +msgid "No, only expand the format in a compatible way." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:95 +msgid "Visibility of changes" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:96 +msgid "Immediately. All changes are visible and replicated immediately. New data should conform to the new format immediately after the call." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:98 +msgid "After data validation. Data validation starts in the background, it does not block the database. Inserting data incompatible with the new format is allowed before validation is completed -- in this case ``space.format`` fails." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:103 +msgid "Cancel (error/restart)" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:104 +msgid "Writes the state to the system table. Restart: the operation continues. Error: the operation should be restarted manually, any other attempt to change the table fails." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:107 +msgid "Leaves no traces." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:109 +msgid "Set the upgrade function" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:110 +msgid "Yes. The upgrade may take a while to traverse the space and transform tuples." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:111 +msgid "No." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:116 +msgid "At the moment, the feature is not supported for :ref:`vinyl ` spaces." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:120 +msgid "User API" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:122 +msgid "The ``space:upgrade()`` method is added to the :doc:`space object `:" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:0 +#: ../../doc/enterprise/space_upgrade.rst:0 +#: ../../doc/enterprise/space_upgrade.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:126 +msgid "upgrade function name (string) or ID (integer). For details, see the :ref:`upgrade function requirements ` section." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:129 +msgid "additional information passed to the upgrade function in the second argument. The option accepts any Lua value that can be encoded in MsgPack, which means that the :doc:`msgpack.encode(arg) ` should succeed. For example, one can pass a scalar or a Lua table. The default value is ``nil``." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:135 +msgid "new space format. The requirements for this are the same as for any other :doc:`space:format() `. If the field is omitted, the space format will remain the same as before the upgrade." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:139 +msgid ":ref:`upgrade mode `. Possible values: ``upgrade``, ``dryrun``, ``dryrun+upgrade``. The default value is ``upgrade``." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:142 +msgid "the flag indicates whether to wait until the upgrade operation is complete before exiting the function. The default value is ``false`` -- the function is blocked until the upgrade operation is finished." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:0 +msgid "Return" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:147 +msgid "object describing the status of the operation (also known as ``future``). The methods of the object are described below." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:154 +msgid "Shows information about the state of the upgrade operation." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:156 +msgid "dry run mode flag. Possible values: ``true`` for a dry run, ``nil`` for an actual upgrade." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:159 +msgid ":ref:`upgrade status `. Possible values: ``inprogress``, ``waitrw``, ``error``, ``replica``, ``done``." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:162 +msgid "name of the upgrade function. It is the same as passed to the ``space:upgrade`` method. The field is ``nil`` if the ``status`` is ``done``." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:166 +msgid "additional information passed to the upgrade function. It is the same as for the ``space:upgrade`` method. The field is ``nil`` if it is omitted in the ``space:upgrade``." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:170 +msgid "UUID of the instance running the upgrade (see :doc:`box.info.uuid `). The field is ``nil`` if the ``status`` is ``done``." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:174 +msgid "error message if the ``status`` is ``error``, otherwise ``nil``." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:176 +msgid "completion percentage if the ``status`` is ``inprogress``/``waitrw``, otherwise ``nil``." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:0 +#: ../../doc/enterprise/space_upgrade.rst:0 +#: ../../doc/enterprise/space_upgrade.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:179 +msgid "a table with information about the state of the upgrade operation" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:0 +#: ../../doc/enterprise/space_upgrade.rst:0 +#: ../../doc/enterprise/space_upgrade.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:180 +msgid "table" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:182 +msgid "The fields can also be accessed directly, without calling the ``info()`` method. For example, ``future.status`` is the same as ``future:info().status``." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:187 +msgid "Waits until the upgrade operation is completed or a timeout occurs. An operation is considered completed if its status is ``done`` or ``error``." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:190 +msgid "if the ``timeout`` argument is omitted, the method waits as long as it takes." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:192 +msgid "returns ``true`` if the operation has been completed, ``false`` on timeout" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:193 +msgid "boolean" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:197 +msgid "Cancels the upgrade operation if it is currently running. Otherwise, an exception is thrown. A canceled upgrade operation completes with an error." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:200 +msgid "none" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:201 +msgid "void" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:203 +msgid "Running ``space:upgrade()`` with ``is_async = false`` or the ``is_async`` field not set is equal to:" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:205 +msgid "local future = space:upgrade({func = 'my_func', is_async = true})\n" +"future:wait()\n" +"return future" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:211 +msgid "If called without arguments, ``space:upgrade()`` returns a future object for the active upgrade operation. If there is none, it returns ``nil``." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:217 +msgid "Upgrade modes" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:219 +msgid "There are three upgrade modes: ``dryrun``, ``dryrun+upgrade``, and ``upgrade``. Regardless of the mode selected, the upgrade does not block execution. Once in a while, the background fiber commits the upgraded tuples and yields." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:223 +msgid "Calling ``space:upgrade`` without arguments always returns the current state of the space upgrade, never the state of a dry run. If there is a dry run working in the background, ``space:upgrade`` will still return ``nil``. Unlike an actual space upgrade, the future object returned by a dry run upgrade can't be recovered if it is lost. So a dry run is aborted if it is garbage collected." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:230 +msgid "In ``dryrun+upgrade`` mode: if the future object is garbage collected by Lua before the end of the dry run and the start of the upgrade, then the dry run will be canceled, and no upgrade will be started." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:234 +msgid "Upgrade modes:" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:236 +msgid "``upgrade`` mode: the background fiber iterates over the space, applies the upgrade function, checks that obtained tuples fit the new space format, and updates the tuples. This mode prevents the space from being altered. The mode can only be performed on the master instance." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:241 +msgid "``dryrun`` mode: the dry-run mode is used to check the upgrade function. The mode does not apply any changes to the target space. It starts a background fiber. The fiber:" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:244 +msgid "Iterates over the target space." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:245 +msgid "Attempts to apply the upgrade function to each tuple stored in the space." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:246 +msgid "Checks if the returned tuple matches the new format." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:247 +msgid "Checks if the function is idempotent." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:248 +msgid "Checks that the function does not modify the primary key." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:250 +msgid "For details, see the :ref:`upgrade function requirements ` section." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:252 +msgid "To start a dry run, pass ``mode='dryrun'`` to the ``space:upgrade`` method. In this case, the future object has the ``dryrun`` field set to ``true``. The possible statuses are ``inprogress`` and ``dryrun``. ``replica`` and ``waitrw`` states are never set for a dry run future object." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:257 +msgid "The ``dryrun`` mode is not persisted. Restarting the instance does not restart a dry run. A dry run only works on the original instance, never on replicas. Unlike a real upgrade, a dry run does not prevent the space from being altered. The space can even be dropped. In this case, the dry run will complete with an error." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:262 +msgid "``dryrun+upgrade`` mode: it starts a dry run, which, if completed successfully, triggers an actual upgrade. The future object returned by ``space:upgrade`` remains valid throughout the process. It starts as the future object of the dry run. Then, under the hood, it is converted into an upgrade future object. Waiting on it would wait for both the dry run and the upgrade to complete. During the dry run, the future object has the ``dryrun`` field set to ``true``. When the actual upgrade starts, the ``dryrun`` field is set to ``nil``. The mode can only be performed on the master instance." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:273 +msgid "States" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:275 +msgid "An upgrade operation has one of the following upgrade states:" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:277 +msgid "``inprogress`` -- the upgrade operation is running in the background. The function is applied to all tuples returned to the user." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:280 +msgid "``waitrw`` -- the instance was switched to the read-only mode (for example, by using ``box.cfg.read_only``), so the upgrade couldn't proceed. The upgrade process will resume as soon as the instance switches back to read-write mode. Nevertheless, the upgrade function is applied to all tuples returned to the user." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:285 +msgid "``error`` -- the upgrade operation failed with an error. See the ``error`` field for the error message. See the log for the tuple that caused the error. No alter operation is allowed, except for another upgrade, supposed to fix the problem. Nevertheless, the upgrade function is applied to all tuples returned to the user. The space is writable." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:290 +msgid "``done`` -- the upgrade operation is successfully completed. The upgrade function is not applied to tuples returned to the user anymore. The function can be deleted." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:293 +msgid "``replica`` -- the upgrade operation is either running or completed with an error on another instance. See the ``owner`` field for the UUID of the instance running the upgrade. Nevertheless, the upgrade function is applied to all tuples returned to the user." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:303 +msgid "Interaction with alter" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:305 +msgid "While a space upgrade is in progress, the space can't be altered or dropped. The attempt to do that will throw an exception. Restarting an upgrade is allowed in case the currently running upgrade is canceled or completed with an error. It means the manual restart is possible if the upgrade operation is in the :ref:`error state `." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:310 +msgid "If a space upgrade was canceled or failed with an error, the space can't be altered or dropped. The only option is to restart the upgrade using a different upgrade function or format." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:314 +msgid "Interaction with recovery" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:316 +msgid "The space upgrade state is persisted. It is stored in the ``_space`` system table. If an instance with a space upgrade in progress (``inprogress`` state) is shut down, it restarts the space upgrade after recovery. If a space upgrade fails (switches to the ``error`` state), it remains in the error state after recovery." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:321 +msgid "Interaction with replication" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:323 +msgid "The changes made to a space by a space upgrade are replicated. Just as on the instance where the upgrade is performed, the upgrade function is applied to all tuples returned to the user on the replicas. However, the upgrade operation is not performed on the replicas in the background. The replicas wait for the upgrade operation to complete on the master. They can't alter or drop the space. Normally, they can't cancel or restart the upgrade operation either." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:329 +msgid "There is an emergency exception when the master is permanently dead. It is possible to restart a space upgrade that started on another instance. The restart is possible if the upgrade owner UUID (see the ``owner`` field) has been deleted from the ``_cluster`` system table." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:336 +msgid "Except the ``dryrun`` mode, the upgrade can only be performed on the master. If the instance is no longer the master, the upgrade is suspended until the instance is master again. Restarting the upgrade on a new master works only if the old one has been removed from the replica set (``_cluster`` system space)." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:344 +msgid "Usage example" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:346 +msgid "Suppose there are two columns in the space `test` -- ``id`` (unsigned) and ``data`` (string). The example shows how to upgrade the schema and add another column to the space using ``space:upgrade()``. The new column contains the ``id`` values converted to string. Each step takes a while." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:350 +msgid "The test space is generated with the following script:" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:352 +msgid "local log = require('log')\n" +"box.cfg{\n" +" checkpoint_count = 1,\n" +" memtx_memory = 5 * 1024 * 1024 * 1024,\n" +"}\n" +"box.schema.space.create('test')\n" +"box.space.test:format{\n" +" {name = 'id', type = 'unsigned'},\n" +" {name = 'data', type = 'string'},\n" +"}\n" +"box.space.test:create_index('pk')\n" +"local count = 20 * 1000 * 1000\n" +"local progress = 0\n" +"box.begin()\n" +"for i = 1, count do\n" +" box.space.test:insert{i, 'data' .. i}\n" +"\n" +" if i % 1000 == 0 then\n" +" box.commit()\n" +" local p = math.floor(i / count * 100)\n" +" if progress ~= p then\n" +" progress = p\n" +" log.info('Generating test data set... %d%% done', p)\n" +" end\n" +" box.begin()\n" +" end\n" +"end\n" +"box.commit()\n" +"box.snapshot()\n" +"os.exit(0)" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:385 +msgid "To upgrade the space, connect to the server and then run the commands below:" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:387 +msgid "localhost:3301> box.schema.func.create('convert', {\n" +" > language = 'lua',\n" +" > is_deterministic = true,\n" +" > body = [[function(t)\n" +" > if #t == 2 then\n" +" > return t:update({{'!', 2, tostring(t.id)}})\n" +" > else\n" +" > return t\n" +" > end\n" +" > end]],\n" +" > })\n" +"localhost:3301> box.space.test:upgrade({\n" +" > func = 'convert',\n" +" > format = {\n" +" > {name = 'id', type = 'unsigned'},\n" +" > {name = 'id_string', type = 'string'},\n" +" > {name = 'data', type = 'string'},\n" +" > },\n" +" > })" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:410 +msgid "While the upgrade is in progress, you can track the state of the upgrade. To check the status, connect to Tarantool from another console and run the following commands:" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:413 +msgid "localhost:3311> box.space.test:upgrade()\n" +"---\n" +"- status: inprogress\n" +" progress: 8%\n" +" owner: 579a9e99-427e-4e99-9e2e-216bbd3098a7\n" +" func: convert\n" +"..." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:424 +msgid "Even though the upgrade is only 8% complete, selecting the data from the space returns the converted tuples:" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:426 +msgid "localhost:3311> box.space.test:select({}, {iterator = 'req', limit = 5})\n" +"---\n" +"- - [20000000, '20000000', 'data20000000']\n" +" - [19999999, '19999999', 'data19999999']\n" +" - [19999998, '19999998', 'data19999998']\n" +" - [19999997, '19999997', 'data19999997']\n" +" - [19999996, '19999996', 'data19999996']\n" +"..." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:439 +msgid "The tuples contain the new field even though the space upgrade is still running." +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:442 +msgid "Wait for the space upgrade to complete using the command below:" +msgstr "" + +#: ../../doc/enterprise/space_upgrade.rst:444 +msgid "localhost:3311> box.space.test:upgrade():wait()" +msgstr "" diff --git a/locale/en/enterprise/system_metrics.pot b/locale/en/enterprise/system_metrics.pot new file mode 100644 index 0000000000..07d7c786b8 --- /dev/null +++ b/locale/en/enterprise/system_metrics.pot @@ -0,0 +1,435 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/system_metrics.rst:4 +msgid "Monitoring system metrics" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:12 +msgid "Option" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:12 +msgid "Description" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:12 +msgid "SNMP type" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:12 +msgid "Units of measure" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:12 +msgid "Threshold" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:14 +msgid "Version" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:14 +msgid "Tarantool version" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:14 +msgid "DisplayString" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:16 +msgid "IsAlive" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:16 +msgid "instance availability indicator" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:16 +#: ../../doc/enterprise/system_metrics.rst:42 +#: ../../doc/enterprise/system_metrics.rst:60 +msgid "Integer" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:18 +msgid "(listing)" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:16 +msgid "0 - unavailable" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:18 +msgid "1 - available" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:20 +msgid "MemoryLua" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:20 +msgid "storage space used by Lua" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:20 +#: ../../doc/enterprise/system_metrics.rst:22 +#: ../../doc/enterprise/system_metrics.rst:25 +#: ../../doc/enterprise/system_metrics.rst:27 +#: ../../doc/enterprise/system_metrics.rst:30 +#: ../../doc/enterprise/system_metrics.rst:37 +#: ../../doc/enterprise/system_metrics.rst:44 +#: ../../doc/enterprise/system_metrics.rst:46 +#: ../../doc/enterprise/system_metrics.rst:49 +#: ../../doc/enterprise/system_metrics.rst:51 +#: ../../doc/enterprise/system_metrics.rst:54 +#: ../../doc/enterprise/system_metrics.rst:57 +#: ../../doc/enterprise/system_metrics.rst:62 +#: ../../doc/enterprise/system_metrics.rst:64 +#: ../../doc/enterprise/system_metrics.rst:67 +msgid "Gauge32" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:20 +#: ../../doc/enterprise/system_metrics.rst:22 +#: ../../doc/enterprise/system_metrics.rst:25 +#: ../../doc/enterprise/system_metrics.rst:27 +#: ../../doc/enterprise/system_metrics.rst:30 +msgid "Mbyte" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:20 +msgid "900" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:22 +msgid "MemoryData" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:22 +msgid "storage space used for storing data" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:22 +#: ../../doc/enterprise/system_metrics.rst:27 +msgid "set the value manually" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:25 +msgid "MemoryNet" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:25 +msgid "storage space used for network I/O" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:25 +msgid "1024" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:27 +msgid "MemoryIndex" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:27 +msgid "storage space used for storing indexes" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:30 +msgid "MemoryCache" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:30 +msgid "storage space used for storing caches (for vinyl engine only)" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:33 +msgid "ReplicationLag" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:33 +msgid "lag time since the last sync between (the maximum value in case there are multiple fibers)" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:33 +msgid "Integer32" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:33 +msgid "sec." +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:33 +msgid "5" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:37 +msgid "FiberCount" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:37 +msgid "number of fibers" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:37 +#: ../../doc/enterprise/system_metrics.rst:44 +#: ../../doc/enterprise/system_metrics.rst:46 +#: ../../doc/enterprise/system_metrics.rst:49 +#: ../../doc/enterprise/system_metrics.rst:51 +#: ../../doc/enterprise/system_metrics.rst:54 +#: ../../doc/enterprise/system_metrics.rst:57 +#: ../../doc/enterprise/system_metrics.rst:62 +#: ../../doc/enterprise/system_metrics.rst:64 +#: ../../doc/enterprise/system_metrics.rst:67 +#: ../../doc/enterprise/system_metrics.rst:70 +#: ../../doc/enterprise/system_metrics.rst:72 +#: ../../doc/enterprise/system_metrics.rst:74 +#: ../../doc/enterprise/system_metrics.rst:76 +#: ../../doc/enterprise/system_metrics.rst:78 +#: ../../doc/enterprise/system_metrics.rst:80 +#: ../../doc/enterprise/system_metrics.rst:82 +#: ../../doc/enterprise/system_metrics.rst:84 +#: ../../doc/enterprise/system_metrics.rst:86 +#: ../../doc/enterprise/system_metrics.rst:88 +msgid "pc." +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:37 +msgid "1000" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:39 +msgid "CurrentTime" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:39 +msgid "current time, in seconds, starting at January, 1st, 1970" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:39 +msgid "Unsigned32" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:39 +msgid "Unix timestamp, in sec." +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:42 +msgid "StorageStatus" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:42 +msgid "status of a replica set" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:42 +#: ../../doc/enterprise/system_metrics.rst:60 +msgid "listing" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:42 +#: ../../doc/enterprise/system_metrics.rst:60 +msgid "> 1" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:44 +msgid "StorageAlerts" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:44 +msgid "number of alerts for storage nodes" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:44 +#: ../../doc/enterprise/system_metrics.rst:62 +msgid ">= 1" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:46 +msgid "StorageTotalBkts" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:46 +msgid "total number of buckets in the storage" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:46 +#: ../../doc/enterprise/system_metrics.rst:49 +#: ../../doc/enterprise/system_metrics.rst:51 +#: ../../doc/enterprise/system_metrics.rst:54 +#: ../../doc/enterprise/system_metrics.rst:57 +#: ../../doc/enterprise/system_metrics.rst:64 +#: ../../doc/enterprise/system_metrics.rst:67 +msgid "< 0" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:49 +msgid "StorageActiveBkts" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:49 +msgid "number of buckets in the ACTIVE state" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:51 +msgid "StorageGarbageBkts" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:51 +msgid "number of buckets in the GARBAGE state" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:54 +msgid "StorageReceivingBkts" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:54 +msgid "number of buckets in the RECEIVING state" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:57 +msgid "StorageSendingBkts" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:57 +msgid "number of buckets in the SENDING state" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:60 +msgid "RouterStatus" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:60 +msgid "status of the ``router``" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:62 +msgid "RouterAlerts" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:62 +msgid "number of alerts for the router" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:64 +msgid "RouterKnownBkts" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:64 +msgid "number of buckets within the known destination replica sets" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:67 +msgid "RouterUnknownBkts" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:67 +msgid "number of buckets that are unknown to the ``router``" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:70 +msgid "RequestCount" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:70 +msgid "total number of requests" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:70 +#: ../../doc/enterprise/system_metrics.rst:72 +#: ../../doc/enterprise/system_metrics.rst:74 +#: ../../doc/enterprise/system_metrics.rst:76 +#: ../../doc/enterprise/system_metrics.rst:78 +#: ../../doc/enterprise/system_metrics.rst:80 +#: ../../doc/enterprise/system_metrics.rst:82 +#: ../../doc/enterprise/system_metrics.rst:84 +#: ../../doc/enterprise/system_metrics.rst:86 +#: ../../doc/enterprise/system_metrics.rst:88 +msgid "Counter64" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:72 +msgid "InsertCount" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:72 +msgid "total number of insert requests" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:74 +msgid "DeleteCount" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:74 +msgid "total number of delete requests" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:76 +msgid "ReplaceCount" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:76 +msgid "total number of replace requests" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:78 +msgid "UpdateCount" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:78 +msgid "total number of update requests" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:80 +msgid "SelectCount" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:80 +msgid "total number of select requests" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:82 +msgid "EvalCount" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:82 +msgid "number of calls made via Eval" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:84 +msgid "CallCount" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:84 +msgid "number of calls made via ``call``" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:86 +msgid "ErrorCount" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:86 +msgid "number of errors in Tarantool" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:88 +msgid "AuthCount" +msgstr "" + +#: ../../doc/enterprise/system_metrics.rst:88 +msgid "number of completed authentication operations" +msgstr "" diff --git a/locale/en/enterprise/tuple_compression.pot b/locale/en/enterprise/tuple_compression.pot new file mode 100644 index 0000000000..5cd3ab5614 --- /dev/null +++ b/locale/en/enterprise/tuple_compression.pot @@ -0,0 +1,252 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/tuple_compression.rst:4 +msgid "Tuple compression" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:6 +msgid "Tuple compression, introduced in Tarantool Enterprise Edition 2.10.0, aims to save memory space. Typically, it decreases the volume of stored data by 15%. However, the exact volume saved depends on the type of data." +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:10 +msgid "The following compression algorithms are supported:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:12 +msgid "`lz4 `_" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:13 +msgid "`zstd `_" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:14 +msgid "`zlib `_ (since :doc:`2.11.0 `)" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:16 +msgid "To learn about the performance costs of each algorithm, check :ref:`Tuple compression performance `." +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:19 +msgid "Tarantool doesn't compress tuples themselves, just the fields inside these tuples. You can only compress non-indexed fields. Compression works best when JSON is stored in the field." +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:25 +msgid "The :ref:`compress ` module provides the API for compressing and decompressing data." +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:31 +msgid "Enabling compression for a new space" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:33 +msgid "First, create a space:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:35 +msgid "box.schema.space.create('bands')" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:39 +msgid "Then, create an index for this space, for example:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:41 +msgid "box.space.bands:create_index('primary', {parts = {{1, 'unsigned'}}})" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:45 +msgid "Create a format to declare field names and types. In the example below, the ``band_name`` and ``year`` fields have the ``zstd`` and ``lz4`` compression formats, respectively. The first field (``id``) has the index, so it cannot be compressed." +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:49 +msgid "box.space.bands:format({\n" +" {name = 'id', type = 'unsigned'},\n" +" {name = 'band_name', type = 'string', compression = 'zstd'},\n" +" {name = 'year', type = 'unsigned', compression = 'lz4'}\n" +" })" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:57 +msgid "Now, the new tuples that you add to the space ``bands`` will be compressed. When you read a compressed tuple, you do not need to decompress it back yourself." +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:65 +msgid "Checking which fields are compressed" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:67 +msgid "To check which fields in a space are compressed, run :ref:`space_object:format() ` on the space. If a field is compressed, the format includes the compression algorithm, for example:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:71 +msgid "tarantool> box.space.bands:format()\n" +" ---\n" +" - [{'name': 'id', 'type': 'unsigned'},\n" +" {'type': 'string', 'compression': 'zstd', 'name': 'band_name'},\n" +" {'type': 'unsigned', 'compression': 'lz4', 'name': 'year'}]\n" +" ..." +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:85 +msgid "Enabling compression for existing spaces" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:87 +msgid "You can enable compression for existing fields. All the tuples added after that will have this field compressed. However, this doesn't affect the tuples already stored in the space. You need to make the snapshot and restart Tarantool to compress the existing tuples." +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:92 +msgid "Here's an example of how to compress existing fields:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:94 +msgid "Create a space without compression and add several tuples:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:96 +msgid "box.schema.space.create('bands')\n" +"\n" +"box.space.bands:format({\n" +" { name = 'id', type = 'unsigned' },\n" +" { name = 'band_name', type = 'string' },\n" +" { name = 'year', type = 'unsigned' }\n" +"})\n" +"\n" +"box.space.bands:create_index('primary', { parts = { 'id' } })\n" +"\n" +"box.space.bands:insert { 1, 'Roxette', 1986 }\n" +"box.space.bands:insert { 2, 'Scorpions', 1965 }\n" +"box.space.bands:insert { 3, 'Ace of Base', 1987 }\n" +"box.space.bands:insert { 4, 'The Beatles', 1960 }" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:113 +msgid "Suppose that you want fields 2 and 3 to be compressed from now on. To enable compression, change the format as follows:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:116 +msgid "local new_format = box.space.bands:format()\n" +"\n" +"new_format[2].compression = 'zstd'\n" +"new_format[3].compression = 'lz4'\n" +"\n" +"box.space.bands:format(new_format)" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:125 +msgid "From now on, all the tuples that you add to the space have fields 2 and 3 compressed." +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:127 +msgid "To finalize the change, create a snapshot by running :ref:`box.snapshot() ` and restart Tarantool. As a result, all old tuples will also be compressed in memory during recovery." +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:133 +msgid ":doc:`space:upgrade() ` provides the ability to enable compression and update the existing tuples in the background. To achieve this, you need to pass a new space format in the ``format`` argument of ``space:upgrade()``." +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:141 +msgid "Tuple compression performance" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:143 +msgid "Below are the results of a `synthetic test `_ that illustrate how tuple compression affects performance. The test was carried out on a simple Tarantool space containing 100,000 tuples, each having a field with a sample JSON roughly 600 bytes large. The test compared the speed of running ``select`` and ``replace`` operations on uncompressed and compressed data as well as the overall data size of the space. Performance is measured in requests per second." +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:156 +msgid "Compression type" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:157 +msgid "``select``, RPS" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:158 +msgid "``replace``, RPS" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:159 +msgid "Space size, bytes" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:160 +msgid "None" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:161 +msgid "4,486k" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:162 +msgid "1,109k" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:163 +msgid "41,168,548" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:164 +msgid "``zstd``" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:165 +msgid "308k" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:166 +msgid "26k" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:167 +msgid "21,368,548" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:168 +msgid "``lz4``" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:169 +msgid "1,765k" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:170 +msgid "672k" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:171 +msgid "25,268,548" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:172 +msgid "``zlib``" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:173 +msgid "325k" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:174 +msgid "107k" +msgstr "" + +#: ../../doc/enterprise/tuple_compression.rst:175 +msgid "20,768,548" +msgstr "" diff --git a/locale/en/enterprise/tuple_compression/api/compress.pot b/locale/en/enterprise/tuple_compression/api/compress.pot new file mode 100644 index 0000000000..a9e770dbc1 --- /dev/null +++ b/locale/en/enterprise/tuple_compression/api/compress.pot @@ -0,0 +1,29 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/tuple_compression/api/compress.rst:4 +msgid "Module compress" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/compress.rst:8 +msgid "**Since:** :doc:`2.11.0 `" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/compress.rst:10 +msgid "The ``compress`` module provides a set of submodules for compressing and decompressing data using different algorithms:" +msgstr "" diff --git a/locale/en/enterprise/tuple_compression/api/lz4.pot b/locale/en/enterprise/tuple_compression/api/lz4.pot new file mode 100644 index 0000000000..3bf70a9f1c --- /dev/null +++ b/locale/en/enterprise/tuple_compression/api/lz4.pot @@ -0,0 +1,228 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:4 +msgid "Submodule compress.lz4" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:9 +msgid "Overview" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:11 +msgid "The ``compress.lz4`` submodule provides the ability to compress and decompress data using the `lz4 `_ algorithm. You can use the ``lz4`` compressor as follows:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:14 +msgid "Create a compressor instance using the :ref:`compress.lz4.new() ` function:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:16 +msgid "local lz4_compressor = require('compress.lz4').new()\n" +"-- or --\n" +"local lz4_compressor = require('compress').lz4.new()" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:22 +msgid "Optionally, you can pass compression options (:ref:`lz4_opts `) specific for ``lz4``:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:24 +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:90 +msgid "local lz4_compressor = require('compress.lz4').new({\n" +" acceleration = 1000,\n" +" decompress_buffer_size = 2097152\n" +"})\n" +"" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:28 +msgid "To compress the specified data, use the :ref:`compress() ` method:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:30 +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:118 +msgid "compressed_data = lz4_compressor:compress('Hello world!')\n" +"" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:34 +msgid "To decompress data, call :ref:`decompress() `:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:36 +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:135 +msgid "decompressed_data = lz4_compressor:decompress(compressed_data)\n" +"" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:45 +msgid "API Reference" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:55 +msgid "**Functions**" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:58 +msgid ":ref:`compress.lz4.new() `" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:59 +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:81 +msgid "Create a ``lz4`` compressor instance." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:61 +msgid "**Objects**" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:64 +msgid ":ref:`lz4_compressor `" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:65 +msgid "A ``lz4`` compressor instance." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:67 +msgid ":ref:`lz4_opts `" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:68 +msgid "Configuration options of the ``lz4`` compressor." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:75 +msgid "compress.lz4.new()" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:0 +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:0 +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:83 +msgid "``lz4`` compression options (see :ref:`lz4_opts `)" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:0 +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:0 +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:85 +msgid "a new ``lz4`` compressor instance (see :ref:`lz4_compressor `)" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:0 +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:0 +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:86 +msgid "userdata" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:88 +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:116 +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:133 +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:150 +msgid "**Example**" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:98 +msgid "lz4_compressor" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:102 +msgid "A compressor instance that exposes the API for compressing and decompressing data using the ``lz4`` algorithm. To create the ``lz4`` compressor, call :ref:`compress.lz4.new() `." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:109 +msgid "Compress the specified data." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:111 +msgid "data to be compressed" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:113 +msgid "compressed data" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:114 +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:131 +msgid "string" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:126 +msgid "Decompress the specified data." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:128 +msgid "data to be decompressed" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:130 +msgid "decompressed data" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:143 +msgid "lz4_opts" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:147 +msgid "Configuration options of the :ref:`lz4_compressor `. These options can be passed to the :ref:`compress.lz4.new() ` function." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:152 +msgid "local lz4_compressor = require('compress.lz4').new({\n" +" acceleration = 1000,\n" +" decompress_buffer_size = 2097152\n" +"})\n" +"\n" +"" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:160 +msgid "Specifies the acceleration factor that enables you to adjust the compression ratio and speed. The higher acceleration factor increases the compression speed but decreases the compression ratio." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:163 +msgid "Default: 1" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:164 +msgid "Maximum: 65537" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:165 +msgid "Minimum: 1" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:172 +msgid "Specifies the decompress buffer size (in bytes). If the size of decompressed data is larger than this value, the compressor returns an error on decompression." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/lz4.rst:175 +msgid "Default: 1048576" +msgstr "" diff --git a/locale/en/enterprise/tuple_compression/api/zlib.pot b/locale/en/enterprise/tuple_compression/api/zlib.pot new file mode 100644 index 0000000000..5a826dbb88 --- /dev/null +++ b/locale/en/enterprise/tuple_compression/api/zlib.pot @@ -0,0 +1,250 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:4 +msgid "Submodule compress.zlib" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:9 +msgid "Overview" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:11 +msgid "The ``compress.zlib`` submodule provides the ability to compress and decompress data using the `zlib `_ algorithm. You can use the ``zlib`` compressor as follows:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:14 +msgid "Create a compressor instance using the :ref:`compress.zlib.new() ` function:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:16 +msgid "local zlib_compressor = require('compress.zlib').new()\n" +"-- or --\n" +"local zlib_compressor = require('compress').zlib.new()" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:22 +msgid "Optionally, you can pass compression options (:ref:`zlib_opts `) specific for ``zlib``:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:24 +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:90 +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:152 +msgid "local zlib_compressor = require('compress.zlib').new({\n" +" level = 5,\n" +" mem_level = 5,\n" +" strategy = 'filtered'\n" +"})\n" +"" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:28 +msgid "To compress the specified data, use the :ref:`compress() ` method:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:30 +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:118 +msgid "compressed_data = zlib_compressor:compress('Hello world!')\n" +"" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:34 +msgid "To decompress data, call :ref:`decompress() `:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:36 +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:135 +msgid "decompressed_data = zlib_compressor:decompress(compressed_data)\n" +"" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:45 +msgid "API Reference" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:55 +msgid "**Functions**" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:58 +msgid ":ref:`compress.zlib.new() `" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:59 +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:81 +msgid "Create a ``zlib`` compressor instance." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:61 +msgid "**Objects**" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:64 +msgid ":ref:`zlib_compressor `" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:65 +msgid "A ``zlib`` compressor instance." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:67 +msgid ":ref:`zlib_opts `" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:68 +msgid "Configuration options of the ``zlib`` compressor." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:75 +msgid "compress.zlib.new()" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:0 +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:0 +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:83 +msgid "``zlib`` compression options (see :ref:`zlib_opts `)" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:0 +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:0 +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:85 +msgid "a new ``zlib`` compressor instance (see :ref:`zlib_compressor `)" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:0 +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:0 +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:86 +msgid "userdata" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:88 +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:116 +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:133 +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:150 +msgid "**Example**" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:98 +msgid "zlib_compressor" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:102 +msgid "A compressor instance that exposes the API for compressing and decompressing data using the ``zlib`` algorithm. To create the ``zlib`` compressor, call :ref:`compress.zlib.new() `." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:109 +msgid "Compress the specified data." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:111 +msgid "data to be compressed" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:113 +msgid "compressed data" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:114 +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:131 +msgid "string" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:126 +msgid "Decompress the specified data." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:128 +msgid "data to be decompressed" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:130 +msgid "decompressed data" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:143 +msgid "zlib_opts" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:147 +msgid "Configuration options of the :ref:`zlib_compressor `. These options can be passed to the :ref:`compress.zlib.new() ` function." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:160 +msgid "Specifies the ``zlib`` compression level that enables you to adjust the compression ratio and speed. The lower level improves the compression speed at the cost of compression ratio." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:163 +msgid "Default: 6" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:164 +msgid "Minimum: 0 (no compression)" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:165 +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:177 +msgid "Maximum: 9" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:172 +msgid "Specifies how much memory is allocated for the ``zlib`` compressor. The larger value improves the compression speed and ratio." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:175 +msgid "Default: 8" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:176 +msgid "Minimum: 1" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:184 +msgid "Specifies the compression strategy. The possible values:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:186 +msgid "``default`` - for normal data." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:187 +msgid "``huffman_only`` - forces Huffman encoding only (no string match). The fastest compression algorithm but not very effective in compression for most of the data." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:188 +msgid "``filtered`` - for data produced by a filter or predictor. Filtered data consists mostly of small values with a somewhat random distribution. This compression algorithm is tuned to compress them better." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:189 +msgid "``rle`` - limits match distances to one (run-length encoding). ``rle`` is designed to be almost as fast as ``huffman_only`` but gives better compression for PNG image data." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zlib.rst:190 +msgid "``fixed`` - prevents the use of dynamic Huffman codes and provides a simpler decoder for special applications." +msgstr "" diff --git a/locale/en/enterprise/tuple_compression/api/zstd.pot b/locale/en/enterprise/tuple_compression/api/zstd.pot new file mode 100644 index 0000000000..f95731b69e --- /dev/null +++ b/locale/en/enterprise/tuple_compression/api/zstd.pot @@ -0,0 +1,215 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:4 +msgid "Submodule compress.zstd" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:9 +msgid "Overview" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:11 +msgid "The ``compress.zstd`` submodule provides the ability to compress and decompress data using the `zstd `_ algorithm. You can use the ``zstd`` compressor as follows:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:14 +msgid "Create a compressor instance using the :ref:`compress.zstd.new() ` function:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:16 +msgid "local zstd_compressor = require('compress.zstd').new()\n" +"-- or --\n" +"local zstd_compressor = require('compress').zstd.new()" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:22 +msgid "Optionally, you can pass compression options (:ref:`zstd_opts `) specific for ``zstd``:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:24 +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:90 +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:152 +msgid "local zstd_compressor = require('compress.zstd').new({\n" +" level = 5\n" +"})\n" +"" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:28 +msgid "To compress the specified data, use the :ref:`compress() ` method:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:30 +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:118 +msgid "compressed_data = zstd_compressor:compress('Hello world!')\n" +"" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:34 +msgid "To decompress data, call :ref:`decompress() `:" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:36 +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:135 +msgid "decompressed_data = zstd_compressor:decompress(compressed_data)\n" +"" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:45 +msgid "API Reference" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:55 +msgid "**Functions**" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:58 +msgid ":ref:`compress.zstd.new() `" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:59 +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:81 +msgid "Create a ``zstd`` compressor instance." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:61 +msgid "**Objects**" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:64 +msgid ":ref:`zstd_compressor `" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:65 +msgid "A ``zstd`` compressor instance." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:67 +msgid ":ref:`zstd_opts `" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:68 +msgid "Configuration options of the ``zstd`` compressor." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:75 +msgid "compress.zstd.new()" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:0 +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:0 +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:83 +msgid "``zstd`` compression options (see :ref:`zstd_opts `)" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:0 +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:0 +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:85 +msgid "a new ``zstd`` compressor instance (see :ref:`zstd_compressor `)" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:0 +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:0 +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:86 +msgid "userdata" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:88 +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:116 +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:133 +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:150 +msgid "**Example**" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:98 +msgid "zstd_compressor" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:102 +msgid "A compressor instance that exposes the API for compressing and decompressing data using the ``zstd`` algorithm. To create the ``zstd`` compressor, call :ref:`compress.zstd.new() `." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:109 +msgid "Compress the specified data." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:111 +msgid "data to be compressed" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:113 +msgid "compressed data" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:114 +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:131 +msgid "string" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:126 +msgid "Decompress the specified data." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:128 +msgid "data to be decompressed" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:130 +msgid "decompressed data" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:143 +msgid "zstd_opts" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:147 +msgid "Configuration options of the :ref:`zstd_compressor `. These options can be passed to the :ref:`compress.zstd.new() ` function." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:160 +msgid "Specifies the ``zstd`` compression level that enables you to adjust the compression ratio and speed. The lower level improves the compression speed at the cost of compression ratio. For example, you can use level 1 if speed is most important and level 22 if size is most important." +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:164 +msgid "Default: 3" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:165 +msgid "Minimum: -131072" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:166 +msgid "Maximum: 22" +msgstr "" + +#: ../../doc/enterprise/tuple_compression/api/zstd.rst:170 +msgid "Assigning 0 to ``level`` resets its value to the default (3)." +msgstr "" diff --git a/locale/en/enterprise/wal_extensions.pot b/locale/en/enterprise/wal_extensions.pot new file mode 100644 index 0000000000..e374088840 --- /dev/null +++ b/locale/en/enterprise/wal_extensions.pot @@ -0,0 +1,200 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/enterprise/wal_extensions.rst:4 +msgid "WAL extensions" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:6 +msgid "WAL extensions available in Tarantool Enterprise Edition allow you to add auxiliary information to each :ref:`write-ahead log ` record. For example, you can enable storing an old and new tuple for each CRUD operation performed. This information might be helpful for implementing a CDC (Change Data Capture) utility that transforms a data replication stream." +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:15 +msgid "Configuration" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:17 +msgid "To configure WAL extensions, use the ``wal_ext`` :ref:`configuration property `. Inside the ``wal_ext`` block, you can enable storing old and new tuples as follows:" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:20 +msgid "Set the ``old`` and ``new`` options to ``true`` to store old and new tuples in a write-ahead log for all spaces." +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:22 +msgid "box.cfg {\n" +" wal_ext = { old = true, new = true }\n" +"}" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:28 +msgid "To adjust these options for specific spaces, use the ``spaces`` option." +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:30 +msgid "box.cfg {\n" +" wal_ext = {\n" +" old = true, new = true,\n" +" spaces = {\n" +" space1 = { old = false },\n" +" space2 = { new = false }\n" +" }\n" +" }\n" +"}" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:43 +msgid "The configuration for specific spaces has priority over the global configuration, so only new tuples are added to the log for ``space1`` and only old tuples for ``space2``." +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:46 +msgid "Note that records with additional fields are :ref:`replicated ` as follows:" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:48 +msgid "If a replica doesn't support the extended format configured on a master, auxiliary fields are skipped." +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:49 +msgid "If a replica and master have different configurations for WAL records, a master's configuration is ignored." +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:55 +#: ../../doc/enterprise/wal_extensions.rst:68 +msgid "Example" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:57 +msgid "The table below demonstrates how write-ahead log records might look for the specific :ref:`CRUD operations ` if storing old and new tuples is enabled for the ``bands`` space." +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:67 +msgid "Operation" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:69 +msgid "WAL information" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:70 +msgid "insert" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:71 +msgid "``bands:insert{4, 'The Beatles', 1960}``" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:0 +msgid "**new_tuple**: [4, 'The Beatles', 1960]" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:0 +msgid "tuple: [4, 'The Beatles', 1960]" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:74 +msgid "delete" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:75 +msgid "``bands:delete{4}``" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:0 +msgid "key: [4]" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:0 +msgid "**old_tuple**: [4, 'The Beatles', 1960]" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:78 +msgid "update" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:79 +msgid "``bands:update({2}, {{'=', 2, 'Pink Floyd'}})``" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:0 +msgid "**new_tuple**: [2, 'Pink Floyd', 1965]" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:0 +msgid "**old_tuple**: [2, 'Scorpions', 1965]" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:0 +msgid "key: [2]" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:0 +msgid "tuple: [['=', 2, 'Pink Floyd']]" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:84 +msgid "upsert" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:85 +msgid "``bands:upsert({2, 'Pink Floyd', 1965}, {{'=', 2, 'The Doors'}})``" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:0 +msgid "**new_tuple**: [2, 'The Doors', 1965]" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:0 +msgid "**old_tuple**: [2, 'Pink Floyd', 1965]" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:0 +msgid "operations: [['=', 2, 'The Doors']]" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:0 +msgid "tuple: [2, 'Pink Floyd', 1965]" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:90 +msgid "replace" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:91 +msgid "``bands:replace{1, 'The Beatles', 1960}``" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:0 +msgid "**old_tuple**: [1, 'Roxette', 1986]" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:0 +msgid "**new_tuple**: [1, 'The Beatles', 1960]" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:0 +msgid "tuple: [1, 'The Beatles', 1960]" +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:96 +msgid "Storing both old and new tuples is especially useful for the ``update`` operation because a write-ahead log record contains only a key value." +msgstr "" + +#: ../../doc/enterprise/wal_extensions.rst:101 +msgid "You can use the :doc:`tt cat ` command to see the contents of a write-ahead log." +msgstr "" diff --git a/locale/en/getting_started/index.pot b/locale/en/getting_started/index.pot new file mode 100644 index 0000000000..b7dba1c09e --- /dev/null +++ b/locale/en/getting_started/index.pot @@ -0,0 +1,29 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/getting_started/index.rst:7 +msgid "Getting started" +msgstr "" + +#: ../../doc/getting_started/index.rst:11 +msgid "The :ref:`Creating your first Tarantool database ` section will get you acquainted with Tarantool. We will start Tarantool, create a data schema, and write our first data. You'll get an understanding of the technology and learn about the basic terms and features." +msgstr "" + +#: ../../doc/getting_started/index.rst:16 +msgid "To continue exploring Tarantool and its ecosystem, you might want to check out Tarantool :doc:`tutorials and guides <../how-to/index>`." +msgstr "" diff --git a/locale/en/how-to/app/c_tutorial.pot b/locale/en/how-to/app/c_tutorial.pot new file mode 100644 index 0000000000..735f2ea9db --- /dev/null +++ b/locale/en/how-to/app/c_tutorial.pot @@ -0,0 +1,639 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/app/c_tutorial.rst:2 +msgid "C tutorial" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:7 +msgid "C stored procedures" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:9 +msgid "Tarantool can call C code with :ref:`modules `, or with :ref:`ffi `, or with C stored procedures. This tutorial only is about the third option, C stored procedures. In fact the routines are always \"C functions\" but the phrase \"stored procedure\" is commonly used for historical reasons." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:16 +msgid "In this tutorial, which can be followed by anyone with a Tarantool development package and a C compiler, there are five tasks:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:19 +msgid ":ref:`easy.c ` -- prints \"hello world\";" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:20 +msgid ":ref:`harder.c ` -- decodes a passed parameter value;" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:21 +msgid ":ref:`hardest.c ` -- uses the C API to do a DBMS insert;" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:22 +msgid ":ref:`read.c ` -- uses the C API to do a DBMS select;" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:23 +msgid ":ref:`write.c ` -- uses the C API to do a DBMS replace." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:25 +msgid "After following the instructions, and seeing that the results are what is described here, users should feel confident about writing their own stored procedures." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:30 +msgid "Preparation" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:32 +msgid "Check that these items exist on the computer:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:34 +msgid "Tarantool 2.1 or later" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:35 +msgid "A gcc compiler, any modern version should work" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:36 +msgid "``module.h`` and files #included in it" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:37 +msgid "``msgpuck.h``" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:38 +msgid "``libmsgpuck.a`` (only for some recent msgpuck versions)" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:40 +msgid "The ``module.h`` file will exist if Tarantool was installed from source. Otherwise Tarantool's \"developer\" package must be installed. For example on Ubuntu say:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:44 +msgid "$ sudo apt-get install tarantool-dev" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:48 +msgid "or on Fedora say:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:50 +msgid "$ dnf -y install tarantool-devel" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:54 +msgid "The ``msgpuck.h`` file will exist if Tarantool was installed from source. Otherwise the \"msgpuck\" package must be installed from `https://github.com/tarantool/msgpuck `_." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:58 +msgid "Both ``module.h`` and ``msgpuck.h`` must be on the include path for the C compiler to see them. For example, if ``module.h`` address is ``/usr/local/include/tarantool/module.h``, and ``msgpuck.h`` address is ``/usr/local/include/msgpuck/msgpuck.h``, and they are not currently on the include path, say:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:64 +msgid "$ export CPATH=/usr/local/include/tarantool:/usr/local/include/msgpuck" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:68 +msgid "The ``libmsgpuck.a`` static library is necessary with msgpuck versions produced after February 2017. If and only if you encounter linking problems when using the gcc statements in the examples for this tutorial, you should put ``libmsgpuck.a`` on the path (``libmsgpuck.a`` is produced from both msgpuck and Tarantool source downloads so it should be easy to find). For example, instead of \":code:`gcc -shared -o harder.so -fPIC harder.c`\" for the second example below, you will need to say \":code:`gcc -shared -o harder.so -fPIC harder.c libmsgpuck.a`\"." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:77 +msgid "Requests will be done using Tarantool as a :ref:`client `. Start Tarantool, and enter these requests." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:81 +msgid "box.cfg{listen=3306}\n" +"box.schema.space.create('capi_test')\n" +"box.space.capi_test:create_index('primary')\n" +"net_box = require('net.box')\n" +"capi_connection = net_box:new(3306)" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:89 +msgid "In plainer language: create a space named ``capi_test``, and make a connection to self named ``capi_connection``." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:92 +msgid "Leave the client running. It will be necessary to enter more requests later." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:97 +msgid "easy.c" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:99 +msgid "Start another shell. Change directory (``cd``) so that it is the same as the directory that the client is running on." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:102 +msgid "Create a file. Name it ``easy.c``. Put these six lines in it." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:104 +msgid "#include \"module.h\"\n" +"int easy(box_function_ctx_t *ctx, const char *args, const char *args_end)\n" +"{\n" +" printf(\"hello world\\n\");\n" +" return 0;\n" +"}\n" +"int easy2(box_function_ctx_t *ctx, const char *args, const char *args_end)\n" +"{\n" +" printf(\"hello world -- easy2\\n\");\n" +" return 0;\n" +"}" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:119 +msgid "Compile the program, producing a library file named ``easy.so``:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:121 +msgid "$ gcc -shared -o easy.so -fPIC easy.c" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:125 +#: ../../doc/how-to/app/c_tutorial.rst:214 +#: ../../doc/how-to/app/c_tutorial.rst:302 +#: ../../doc/how-to/app/c_tutorial.rst:406 +#: ../../doc/how-to/app/c_tutorial.rst:488 +msgid "Now go back to the client and execute these requests:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:127 +msgid "box.schema.func.create('easy', {language = 'C'})\n" +"box.schema.user.grant('guest', 'execute', 'function', 'easy')\n" +"capi_connection:call('easy')" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:133 +msgid "If these requests appear unfamiliar, re-read the descriptions of :doc:`/reference/reference_lua/box_schema/func_create`, :doc:`/reference/reference_lua/box_schema/user_grant` and :ref:`conn:call() `." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:139 +msgid "The function that matters is ``capi_connection:call('easy')``." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:141 +msgid "Its first job is to find the 'easy' function, which should be easy because by default Tarantool looks on the current directory for a file named ``easy.so``." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:145 +msgid "Its second job is to call the 'easy' function. Since the ``easy()`` function in ``easy.c`` begins with ``printf(\"hello world\\n\")``, the words \"hello world\" will appear on the screen." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:149 +msgid "Its third job is to check that the call was successful. Since the ``easy()`` function in ``easy.c`` ends with :code:`return 0`, there is no error message to display and the request is over." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:153 +#: ../../doc/how-to/app/c_tutorial.rst:331 +msgid "The result should look like this:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:155 +msgid "tarantool> capi_connection:call('easy')\n" +"hello world\n" +"---\n" +"- []\n" +"..." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:163 +msgid "Now let's call the other function in easy.c -- ``easy2()``. This is almost the same as the ``easy()`` function, but there's a detail: when the file name is not the same as the function name, then we have to specify :samp:`{file-name}.{function-name}`." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:169 +msgid "box.schema.func.create('easy.easy2', {language = 'C'})\n" +"box.schema.user.grant('guest', 'execute', 'function', 'easy.easy2')\n" +"capi_connection:call('easy.easy2')" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:175 +msgid "... and this time the result will be \"hello world -- easy2\"." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:177 +msgid "Conclusion: calling a C function is easy." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:182 +msgid "harder.c" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:184 +msgid "Go back to the shell where the ``easy.c`` program was created." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:186 +msgid "Create a file. Name it ``harder.c``. Put these 17 lines in it:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:188 +msgid "#include \"module.h\"\n" +"#include \"msgpuck.h\"\n" +"int harder(box_function_ctx_t *ctx, const char *args, const char *args_end)\n" +"{\n" +" uint32_t arg_count = mp_decode_array(&args);\n" +" printf(\"arg_count = %d\\n\", arg_count);\n" +" uint32_t field_count = mp_decode_array(&args);\n" +" printf(\"field_count = %d\\n\", field_count);\n" +" uint32_t val;\n" +" int i;\n" +" for (i = 0; i < field_count; ++i)\n" +" {\n" +" val = mp_decode_uint(&args);\n" +" printf(\"val=%d.\\n\", val);\n" +" }\n" +" return 0;\n" +"}" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:208 +msgid "Compile the program, producing a library file named ``harder.so``:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:210 +msgid "$ gcc -shared -o harder.so -fPIC harder.c" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:216 +msgid "box.schema.func.create('harder', {language = 'C'})\n" +"box.schema.user.grant('guest', 'execute', 'function', 'harder')\n" +"passable_table = {}\n" +"table.insert(passable_table, 1)\n" +"table.insert(passable_table, 2)\n" +"table.insert(passable_table, 3)\n" +"capi_connection:call('harder', {passable_table})" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:226 +msgid "This time the call is passing a Lua table (``passable_table``) to the ``harder()`` function. The ``harder()`` function will see it, it's in the :code:`char *args` parameter." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:230 +msgid "At this point the ``harder()`` function will start using functions defined in `msgpuck.h `_. The routines that begin with \"mp\" are msgpuck functions that handle data formatted according to the `MsgPack `_ specification. Passes and returns are always done with this format so one must become acquainted with msgpuck to become proficient with the C API." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:238 +msgid "For now, though, it's enough to know that ``mp_decode_array()`` returns the number of elements in an array, and ``mp_decode_uint`` returns an unsigned integer, from :code:`args`. And there's a side effect: when the decoding finishes, :code:`args` has changed and is now pointing to the next element." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:244 +msgid "Therefore the first displayed line will be \"arg_count = 1\" because there was only one item passed: ``passable_table``. |br| The second displayed line will be \"field_count = 3\" because there are three items in the table. |br| The next three lines will be \"1\" and \"2\" and \"3\" because those are the values in the items in the table." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:251 +msgid "And now the screen looks like this:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:253 +msgid "tarantool> capi_connection:call('harder', passable_table)\n" +"arg_count = 1\n" +"field_count = 3\n" +"val=1.\n" +"val=2.\n" +"val=3.\n" +"---\n" +"- []\n" +"..." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:265 +msgid "Conclusion: decoding parameter values passed to a C function is not easy at first, but there are routines to do the job, and they're documented, and there aren't very many of them." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:273 +msgid "hardest.c" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:275 +msgid "Go back to the shell where the ``easy.c`` and the ``harder.c`` programs were created." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:278 +msgid "Create a file. Name it ``hardest.c``. Put these 13 lines in it:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:280 +msgid "#include \"module.h\"\n" +"#include \"msgpuck.h\"\n" +"int hardest(box_function_ctx_t *ctx, const char *args, const char *args_end)\n" +"{\n" +" uint32_t space_id = box_space_id_by_name(\"capi_test\", strlen(\"capi_test\"));\n" +" char tuple[1024]; /* Must be big enough for mp_encode results */\n" +" char *tuple_pointer = tuple;\n" +" tuple_pointer = mp_encode_array(tuple_pointer, 2);\n" +" tuple_pointer = mp_encode_uint(tuple_pointer, 10000);\n" +" tuple_pointer = mp_encode_str(tuple_pointer, \"String 2\", 8);\n" +" int n = box_insert(space_id, tuple, tuple_pointer, NULL);\n" +" return n;\n" +"}" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:296 +msgid "Compile the program, producing a library file named ``hardest.so``:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:298 +msgid "$ gcc -shared -o hardest.so -fPIC hardest.c" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:304 +msgid "box.schema.func.create('hardest', {language = \"C\"})\n" +"box.schema.user.grant('guest', 'execute', 'function', 'hardest')\n" +"box.schema.user.grant('guest', 'read,write', 'space', 'capi_test')\n" +"capi_connection:call('hardest')" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:311 +msgid "This time the C function is doing three things:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:313 +msgid "finding the numeric identifier of the ``capi_test`` space by calling ``box_space_id_by_name()``;" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:315 +msgid "formatting a tuple using more ``msgpuck.h`` functions;" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:316 +msgid "inserting a tuple using ``box_insert()``." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:320 +msgid "``char tuple[1024];`` is used here as just a quick way of saying \"allocate more than enough bytes\". For serious programs the developer must be careful to allow enough space for all the bytes that the ``mp_encode`` routines will use up." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:325 +msgid "Now, still on the client, execute this request:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:327 +msgid "box.space.capi_test:select()" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:333 +msgid "tarantool> box.space.capi_test:select()\n" +"---\n" +"- - [10000, 'String 2']\n" +"..." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:340 +msgid "This proves that the ``hardest()`` function succeeded, but where did :ref:`box_space_id_by_name() ` and :ref:`box_insert() ` come from? Answer: the :ref:`C API `." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:348 +msgid "read.c" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:350 +msgid "Go back to the shell where the ``easy.c`` and the ``harder.c`` and the ``hardest.c`` programs were created." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:353 +msgid "Create a file. Name it ``read.c``. Put these 43 lines in it:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:355 +msgid "#include \"module.h\"\n" +"#include \n" +"int read(box_function_ctx_t *ctx, const char *args, const char *args_end)\n" +"{\n" +" char tuple_buf[1024]; /* where the raw MsgPack tuple will be stored */\n" +" uint32_t space_id = box_space_id_by_name(\"capi_test\", strlen(\"capi_test\"));\n" +" uint32_t index_id = 0; /* The number of the space's first index */\n" +" uint32_t key = 10000; /* The key value that box_insert() used */\n" +" mp_encode_array(tuple_buf, 0); /* clear */\n" +" box_tuple_format_t *fmt = box_tuple_format_default();\n" +" box_tuple_t *tuple = NULL;\n" +" char key_buf[16]; /* Pass key_buf = encoded key = 1000 */\n" +" char *key_end = key_buf;\n" +" key_end = mp_encode_array(key_end, 1);\n" +" key_end = mp_encode_uint(key_end, key);\n" +" assert(key_end <= key_buf + sizeof(key_buf));\n" +" /* Get the tuple. There's no box_select() but there's this. */\n" +" int r = box_index_get(space_id, index_id, key_buf, key_end, &tuple);\n" +" assert(r == 0);\n" +" assert(tuple != NULL);\n" +" /* Get each field of the tuple + display what you get. */\n" +" int field_no; /* The first field number is 0. */\n" +" for (field_no = 0; field_no < 2; ++field_no)\n" +" {\n" +" const char *field = box_tuple_field(tuple, field_no);\n" +" assert(field != NULL);\n" +" assert(mp_typeof(*field) == MP_STR || mp_typeof(*field) == MP_UINT);\n" +" if (mp_typeof(*field) == MP_UINT)\n" +" {\n" +" uint32_t uint_value = mp_decode_uint(&field);\n" +" printf(\"uint value=%u.\\n\", uint_value);\n" +" }\n" +" else /* if (mp_typeof(*field) == MP_STR) */\n" +" {\n" +" const char *str_value;\n" +" uint32_t str_value_length;\n" +" str_value = mp_decode_str(&field, &str_value_length);\n" +" printf(\"string value=%.*s.\\n\", str_value_length, str_value);\n" +" }\n" +" }\n" +" return 0;\n" +"}" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:400 +msgid "Compile the program, producing a library file named ``read.so``:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:402 +msgid "$ gcc -shared -o read.so -fPIC read.c" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:408 +msgid "box.schema.func.create('read', {language = \"C\"})\n" +"box.schema.user.grant('guest', 'execute', 'function', 'read')\n" +"box.schema.user.grant('guest', 'read,write', 'space', 'capi_test')\n" +"capi_connection:call('read')" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:415 +msgid "This time the C function is doing four things:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:417 +#: ../../doc/how-to/app/c_tutorial.rst:499 +msgid "once again, finding the numeric identifier of the ``capi_test`` space by calling ``box_space_id_by_name()``;" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:419 +msgid "formatting a search key = 10000 using more ``msgpuck.h`` functions;" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:420 +msgid "getting a tuple using ``box_index_get()``;" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:421 +msgid "going through the tuple's fields with ``box_tuple_get()`` and then decoding each field depending on its type. In this case, since what we are getting is the tuple that we inserted with ``hardest.c``, we know in advance that the type is either MP_UINT or MP_STR; however, it's very common to have a case statement here with one option for each possible type." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:428 +msgid "The result of ``capi_connection:call('read')`` should look like this:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:430 +msgid "tarantool> capi_connection:call('read')\n" +"uint value=10000.\n" +"string value=String 2.\n" +"---\n" +"- []\n" +"..." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:439 +msgid "This proves that the ``read()`` function succeeded. Once again the important functions that start with `box` -- :ref:`box_index_get() ` and :ref:`box_tuple_field() ` -- came from the :ref:`C API `." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:448 +msgid "write.c" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:450 +msgid "Go back to the shell where the programs ``easy.c``, ``harder.c``, ``hardest.c`` and ``read.c`` were created." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:453 +msgid "Create a file. Name it ``write.c``. Put these 24 lines in it:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:455 +msgid "#include \"module.h\"\n" +"#include \n" +"int write(box_function_ctx_t *ctx, const char *args, const char *args_end)\n" +"{\n" +" static const char *space = \"capi_test\";\n" +" char tuple_buf[1024]; /* Must be big enough for mp_encode results */\n" +" uint32_t space_id = box_space_id_by_name(space, strlen(space));\n" +" if (space_id == BOX_ID_NIL) {\n" +" return box_error_set(__FILE__, __LINE__, ER_PROC_C,\n" +" \"Can't find space %s\", \"capi_test\");\n" +" }\n" +" char *tuple_end = tuple_buf;\n" +" tuple_end = mp_encode_array(tuple_end, 2);\n" +" tuple_end = mp_encode_uint(tuple_end, 1);\n" +" tuple_end = mp_encode_uint(tuple_end, 22);\n" +" box_txn_begin();\n" +" if (box_replace(space_id, tuple_buf, tuple_end, NULL) != 0)\n" +" return -1;\n" +" box_txn_commit();\n" +" fiber_sleep(0.001);\n" +" struct tuple *tuple = box_tuple_new(box_tuple_format_default(),\n" +" tuple_buf, tuple_end);\n" +" return box_return_tuple(ctx, tuple);\n" +"}" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:482 +msgid "Compile the program, producing a library file named ``write.so``:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:484 +msgid "$ gcc -shared -o write.so -fPIC write.c" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:490 +msgid "box.schema.func.create('write', {language = \"C\"})\n" +"box.schema.user.grant('guest', 'execute', 'function', 'write')\n" +"box.schema.user.grant('guest', 'read,write', 'space', 'capi_test')\n" +"capi_connection:call('write')" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:497 +msgid "This time the C function is doing six things:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:501 +msgid "making a new tuple;" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:502 +msgid "starting a transaction;" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:503 +msgid "replacing a tuple in ``box.space.capi_test``" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:504 +msgid "ending a transaction;" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:505 +msgid "the final line is a replacement for the loop in ``read.c`` -- instead of getting each field and printing it, use the ``box_return_tuple(...)`` function to return the entire tuple to the caller and let the caller display it." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:510 +msgid "The result of ``capi_connection:call('write')`` should look like this:" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:512 +msgid "tarantool> capi_connection:call('write')\n" +"---\n" +"- [[1, 22]]\n" +"..." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:519 +msgid "This proves that the ``write()`` function succeeded. Once again the important functions that start with `box` -- :ref:`box_txn_begin() `, :ref:`box_txn_commit() ` and :ref:`box_return_tuple() ` -- came from the :ref:`C API `." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:526 +msgid "Conclusion: the long description of the whole C API is there for a good reason. All of the functions in it can be called from C functions which are called from Lua. So C \"stored procedures\" have full access to the database." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:533 +msgid "Cleaning up" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:535 +msgid "Get rid of each of the function tuples with :doc:`/reference/reference_lua/box_schema/func_drop`." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:537 +msgid "Get rid of the ``capi_test`` space with :ref:`box.schema.capi_test:drop() `." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:539 +msgid "Remove the ``.c`` and ``.so`` files that were created for this tutorial." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:543 +msgid "An example in the test suite" +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:545 +msgid "Download the source code of Tarantool. Look in a subdirectory :code:`test/box`. Notice that there is a file named :code:`tuple_bench.test.lua` and another file named :code:`tuple_bench.c`. Examine the Lua file and observe that it is calling a function in the C file, using the same techniques that this tutorial has shown." +msgstr "" + +#: ../../doc/how-to/app/c_tutorial.rst:552 +msgid "Conclusion: parts of the standard test suite use C stored procedures, and they must work, because releases don't happen if Tarantool doesn't pass the tests." +msgstr "" diff --git a/locale/en/how-to/app/cookbook.pot b/locale/en/how-to/app/cookbook.pot new file mode 100644 index 0000000000..1a65d3afeb --- /dev/null +++ b/locale/en/how-to/app/cookbook.pot @@ -0,0 +1,881 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/app/cookbook.rst:5 +msgid "Lua cookbook recipes" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:7 +msgid "Here are contributions of Lua programs for some frequent or tricky situations." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:9 +msgid "You can execute any of these programs by copying the code into a ``.lua`` file, and then entering :samp:`chmod +x ./{program-name}.lua` and :samp:`./{program-name}.lua` on the terminal." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:13 +msgid "The first line is a \"hashbang\":" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:15 +msgid "#!/usr/bin/env tarantool" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:19 +msgid "This runs Tarantool Lua application server, which should be on the execution path." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:22 +msgid "This section contains the following recipes:" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:27 +msgid "Use freely." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:29 +msgid "See more recipes on `Tarantool GitHub `__." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:35 +msgid "hello_world.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:37 +msgid "The standard example of a simple program." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:39 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"print('Hello, World!')" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:49 +msgid "console_start.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:51 +msgid "Use :doc:`box.once() ` to initialize a database (creating spaces) if this is the first time the server has been run. Then use :ref:`console.start() ` to start interactive mode." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:55 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"-- Configure database\n" +"box.cfg {\n" +" listen = 3313\n" +"}\n" +"\n" +"box.once(\"bootstrap\", function()\n" +" box.schema.space.create('tweedledum')\n" +" box.space.tweedledum:create_index('primary',\n" +" { type = 'TREE', parts = {1, 'unsigned'}})\n" +"end)\n" +"\n" +"require('console').start()" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:76 +msgid "fio_read.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:78 +msgid "Use the :ref:`fio module ` to open, read, and close a file." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:80 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local fio = require('fio')\n" +"local errno = require('errno')\n" +"local f = fio.open('/tmp/xxxx.txt', {'O_RDONLY' })\n" +"if not f then\n" +" error(\"Failed to open file: \"..errno.strerror())\n" +"end\n" +"local data = f:read(4096)\n" +"f:close()\n" +"print(data)" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:98 +msgid "fio_write.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:100 +msgid "Use the :ref:`fio module ` to open, write, and close a file." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:102 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local fio = require('fio')\n" +"local errno = require('errno')\n" +"local f = fio.open('/tmp/xxxx.txt', {'O_CREAT', 'O_WRONLY', 'O_APPEND'},\n" +" tonumber('0666', 8))\n" +"if not f then\n" +" error(\"Failed to open file: \"..errno.strerror())\n" +"end\n" +"f:write(\"Hello\\n\");\n" +"f:close()" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:120 +msgid "ffi_printf.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:122 +msgid "Use the `LuaJIT ffi library `_ to call a C built-in function: printf(). (For help understanding ffi, see the `FFI tutorial `_.)" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:125 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local ffi = require('ffi')\n" +"ffi.cdef[[\n" +" int printf(const char *format, ...);\n" +"]]\n" +"\n" +"ffi.C.printf(\"Hello, %s\\n\", os.getenv(\"USER\"));" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:140 +msgid "ffi_gettimeofday.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:142 +msgid "Use the `LuaJIT ffi library `_ to call a C function: gettimeofday(). This delivers time with millisecond precision, unlike the time function in Tarantool's :ref:`clock module `." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:146 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local ffi = require('ffi')\n" +"ffi.cdef[[\n" +" typedef long time_t;\n" +" typedef struct timeval {\n" +" time_t tv_sec;\n" +" time_t tv_usec;\n" +"} timeval;\n" +" int gettimeofday(struct timeval *t, void *tzp);\n" +"]]\n" +"\n" +"local timeval_buf = ffi.new(\"timeval\")\n" +"local now = function()\n" +" ffi.C.gettimeofday(timeval_buf, nil)\n" +" return tonumber(timeval_buf.tv_sec * 1000 + (timeval_buf.tv_usec / 1000))\n" +"end" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:170 +msgid "ffi_zlib.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:172 +msgid "Use the `LuaJIT ffi library `_ to call a C library function. (For help understanding ffi, see the `FFI tutorial `_.)" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:175 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local ffi = require(\"ffi\")\n" +"ffi.cdef[[\n" +" unsigned long compressBound(unsigned long sourceLen);\n" +" int compress2(uint8_t *dest, unsigned long *destLen,\n" +" const uint8_t *source, unsigned long sourceLen, int level);\n" +" int uncompress(uint8_t *dest, unsigned long *destLen,\n" +" const uint8_t *source, unsigned long sourceLen);\n" +"]]\n" +"local zlib = ffi.load(ffi.os == \"Windows\" and \"zlib1\" or \"z\")\n" +"\n" +"-- Lua wrapper for compress2()\n" +"local function compress(txt)\n" +" local n = zlib.compressBound(#txt)\n" +" local buf = ffi.new(\"uint8_t[?]\", n)\n" +" local buflen = ffi.new(\"unsigned long[1]\", n)\n" +" local res = zlib.compress2(buf, buflen, txt, #txt, 9)\n" +" assert(res == 0)\n" +" return ffi.string(buf, buflen[0])\n" +"end\n" +"\n" +"-- Lua wrapper for uncompress\n" +"local function uncompress(comp, n)\n" +" local buf = ffi.new(\"uint8_t[?]\", n)\n" +" local buflen = ffi.new(\"unsigned long[1]\", n)\n" +" local res = zlib.uncompress(buf, buflen, comp, #comp)\n" +" assert(res == 0)\n" +" return ffi.string(buf, buflen[0])\n" +"end\n" +"\n" +"-- Simple test code.\n" +"local txt = string.rep(\"abcd\", 1000)\n" +"print(\"Uncompressed size: \", #txt)\n" +"local c = compress(txt)\n" +"print(\"Compressed size: \", #c)\n" +"local txt2 = uncompress(c, #txt)\n" +"assert(txt2 == txt)" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:220 +msgid "ffi_meta.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:222 +msgid "Use the `LuaJIT ffi library `_ to access a C object via a metamethod (a method which is defined with a metatable)." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:226 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local ffi = require(\"ffi\")\n" +"ffi.cdef[[\n" +"typedef struct { double x, y; } point_t;\n" +"]]\n" +"\n" +"local point\n" +"local mt = {\n" +" __add = function(a, b) return point(a.x+b.x, a.y+b.y) end,\n" +" __len = function(a) return math.sqrt(a.x*a.x + a.y*a.y) end,\n" +" __index = {\n" +" area = function(a) return a.x*a.x + a.y*a.y end,\n" +" },\n" +"}\n" +"point = ffi.metatype(\"point_t\", mt)\n" +"\n" +"local a = point(3, 4)\n" +"print(a.x, a.y) --> 3 4\n" +"print(#a) --> 5\n" +"print(a:area()) --> 25\n" +"local b = a + point(0.5, 8)\n" +"print(#b) --> 12.5" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:256 +msgid "ffi_varbinary_insert.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:258 +msgid "Use the `LuaJIT ffi library `_ to insert a tuple which has a VARBINARY field." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:261 +msgid "Note that it is allowed only inside a memtx transaction: when ``box_insert()`` does not yield." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:264 +msgid "Lua does not have direct support for VARBINARY, so using C is one way to put in data which in MessagePack is stored as bin (MP_BIN). If the tuple is retrieved later, field \"b\" will have type = 'cdata'." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:268 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"-- box.cfg{} should be here\n" +"\n" +"s = box.schema.space.create('withdata')\n" +"s:format({{\"b\", \"varbinary\"}})\n" +"s:create_index('pk', {parts = {1, \"varbinary\"}})\n" +"\n" +"buffer = require('buffer')\n" +"ffi = require('ffi')\n" +"\n" +"function varbinary_insert(space, bytes)\n" +" local tmpbuf = buffer.ibuf()\n" +" local p = tmpbuf:alloc(3 + #bytes)\n" +" p[0] = 0x91 -- MsgPack code for \"array-1\"\n" +" p[1] = 0xC4 -- MsgPack code for \"bin-8\" so up to 256 bytes\n" +" p[2] = #bytes\n" +" for i, c in pairs(bytes) do p[i + 3 - 1] = c end\n" +" ffi.cdef[[int box_insert(uint32_t space_id,\n" +" const char *tuple,\n" +" const char *tuple_end,\n" +" box_tuple_t **result);]]\n" +" ffi.C.box_insert(space.id, tmpbuf.rpos, tmpbuf.wpos, nil)\n" +" tmpbuf:recycle()\n" +"end\n" +"\n" +"varbinary_insert(s, {0xDE, 0xAD, 0xBE, 0xAF})\n" +"varbinary_insert(s, {0xFE, 0xED, 0xFA, 0xCE})\n" +"\n" +"-- if successful, Tarantool enters the event loop now" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:306 +msgid "print_arrays.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:308 +msgid "Create Lua tables, and print them. Notice that for the 'array' table the iterator function is ``ipairs()``, while for the 'map' table the iterator function is pairs(). (``ipairs()`` is faster than ``pairs()``, but ``pairs()`` is recommended for map-like tables or mixed tables.) The display will look like: \"1 Apple | 2 Orange | 3 Grapefruit | 4 Banana | k3 v3 | k1 v1 | k2 v2\"." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:316 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"array = { 'Apple', 'Orange', 'Grapefruit', 'Banana'}\n" +"for k, v in ipairs(array) do print(k, v) end\n" +"\n" +"map = { k1 = 'v1', k2 = 'v2', k3 = 'v3' }\n" +"for k, v in pairs(map) do print(k, v) end" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:330 +msgid "count_array.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:332 +msgid "Use the '#' operator to get the number of items in an array-like Lua table. This operation has O(log(N)) complexity." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:335 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"array = { 1, 2, 3}\n" +"print(#array)" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:346 +msgid "count_array_with_nils.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:348 +msgid "Missing elements in arrays, which Lua treats as \"nil\"s, cause the simple \"#\" operator to deliver improper results. The \"print(#t)\" instruction will print \"4\"; the \"print(counter)\" instruction will print \"3\"; the \"print(max)\" instruction will print \"10\". Other table functions, such as :ref:`table.sort() `, will also misbehave when \"nils\" are present." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:356 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local t = {}\n" +"t[1] = 1\n" +"t[4] = 4\n" +"t[10] = 10\n" +"print(#t)\n" +"local counter = 0\n" +"for k,v in pairs(t) do counter = counter + 1 end\n" +"print(counter)\n" +"local max = 0\n" +"for k,v in pairs(t) do if k > max then max = k end end\n" +"print(max)" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:376 +msgid "count_array_with_nulls.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:378 +msgid "Use explicit ``NULL`` values to avoid the problems caused by Lua's nil == missing value behavior. Although :code:`json.NULL == nil` is :code:`true`, all the print instructions in this program will print the correct value: 10." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:383 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local json = require('json')\n" +"local t = {}\n" +"t[1] = 1; t[2] = json.NULL; t[3]= json.NULL;\n" +"t[4] = 4; t[5] = json.NULL; t[6]= json.NULL;\n" +"t[6] = 4; t[7] = json.NULL; t[8]= json.NULL;\n" +"t[9] = json.NULL\n" +"t[10] = 10\n" +"print(#t)\n" +"local counter = 0\n" +"for k,v in pairs(t) do counter = counter + 1 end\n" +"print(counter)\n" +"local max = 0\n" +"for k,v in pairs(t) do if k > max then max = k end end\n" +"print(max)" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:406 +msgid "count_map.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:408 +msgid "Get the number of elements in a map-like table." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:410 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local map = { a = 10, b = 15, c = 20 }\n" +"local size = 0\n" +"for _ in pairs(map) do size = size + 1; end\n" +"print(size)" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:423 +msgid "swap.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:425 +msgid "Use a Lua peculiarity to swap two variables without needing a third variable." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:427 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local x = 1\n" +"local y = 2\n" +"x, y = y, x\n" +"print(x, y)" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:440 +msgid "class.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:442 +msgid "Create a class, create a metatable for the class, create an instance of the class. Another illustration is at `http://lua-users.org/wiki/LuaClassesWithMetatable `_." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:446 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"-- define class objects\n" +"local myclass_somemethod = function(self)\n" +" print('test 1', self.data)\n" +"end\n" +"\n" +"local myclass_someothermethod = function(self)\n" +" print('test 2', self.data)\n" +"end\n" +"\n" +"local myclass_tostring = function(self)\n" +" return 'MyClass <'..self.data..'>'\n" +"end\n" +"\n" +"local myclass_mt = {\n" +" __tostring = myclass_tostring;\n" +" __index = {\n" +" somemethod = myclass_somemethod;\n" +" someothermethod = myclass_someothermethod;\n" +" }\n" +"}\n" +"\n" +"-- create a new object of myclass\n" +"local object = setmetatable({ data = 'data'}, myclass_mt)\n" +"print(object:somemethod())\n" +"print(object.data)" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:480 +msgid "garbage.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:482 +msgid "Activate the `Lua garbage collector `_ with the `collectgarbage function `_." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:485 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"collectgarbage('collect')" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:495 +msgid "fiber_producer_and_consumer.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:497 +msgid "Start one fiber for producer and one fiber for consumer. Use :ref:`fiber.channel() ` to exchange data and synchronize. One can tweak the channel size (:code:`ch_size` in the program code) to control the number of simultaneous tasks waiting for processing." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:502 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local fiber = require('fiber')\n" +"local function consumer_loop(ch, i)\n" +" -- initialize consumer synchronously or raise an error()\n" +" fiber.sleep(0) -- allow fiber.create() to continue\n" +" while true do\n" +" local data = ch:get()\n" +" if data == nil then\n" +" break\n" +" end\n" +" print('consumed', i, data)\n" +" fiber.sleep(math.random()) -- simulate some work\n" +" end\n" +"end\n" +"\n" +"local function producer_loop(ch, i)\n" +" -- initialize consumer synchronously or raise an error()\n" +" fiber.sleep(0) -- allow fiber.create() to continue\n" +" while true do\n" +" local data = math.random()\n" +" ch:put(data)\n" +" print('produced', i, data)\n" +" end\n" +"end\n" +"\n" +"local function start()\n" +" local consumer_n = 5\n" +" local producer_n = 3\n" +"\n" +" -- Create a channel\n" +" local ch_size = math.max(consumer_n, producer_n)\n" +" local ch = fiber.channel(ch_size)\n" +"\n" +" -- Start consumers\n" +" for i=1, consumer_n,1 do\n" +" fiber.create(consumer_loop, ch, i)\n" +" end\n" +"\n" +" -- Start producers\n" +" for i=1, producer_n,1 do\n" +" fiber.create(producer_loop, ch, i)\n" +" end\n" +"end\n" +"\n" +"start()\n" +"print('started')" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:556 +msgid "socket_tcpconnect.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:558 +msgid "Use :ref:`socket.tcp_connect() ` to connect to a remote host via TCP. Display the connection details and the result of a GET request." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:562 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local s = require('socket').tcp_connect('google.com', 80)\n" +"print(s:peer().host)\n" +"print(s:peer().family)\n" +"print(s:peer().type)\n" +"print(s:peer().protocol)\n" +"print(s:peer().port)\n" +"print(s:write(\"GET / HTTP/1.0\\r\\n\\r\\n\"))\n" +"print(s:read('\\r\\n'))\n" +"print(s:read('\\r\\n'))" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:580 +msgid "socket_tcp_echo.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:582 +msgid "Use :ref:`socket.tcp_connect() ` to set up a simple TCP server, by creating a function that handles requests and echos them, and passing the function to :ref:`socket.tcp_server() `. This program has been used to test with 100,000 clients, with each client getting a separate fiber." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:590 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local function handler(s, peer)\n" +" s:write(\"Welcome to test server, \" .. peer.host ..\"\\n\")\n" +" while true do\n" +" local line = s:read('\\n')\n" +" if line == nil then\n" +" break -- error or eof\n" +" end\n" +" if not s:write(\"pong: \"..line) then\n" +" break -- error or eof\n" +" end\n" +" end\n" +"end\n" +"\n" +"local server, addr = require('socket').tcp_server('localhost', 3311, handler)" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:613 +msgid "getaddrinfo.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:615 +msgid "Use :ref:`socket.getaddrinfo() ` to perform non-blocking DNS resolution, getting both the AF_INET6 and AF_INET information for 'google.com'. This technique is not always necessary for tcp connections because :ref:`socket.tcp_connect() ` performs `socket.getaddrinfo` under the hood, before trying to connect to the first available address." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:623 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local s = require('socket').getaddrinfo('google.com', 'http', { type = 'SOCK_STREAM' })\n" +"print('host=',s[1].host)\n" +"print('family=',s[1].family)\n" +"print('type=',s[1].type)\n" +"print('protocol=',s[1].protocol)\n" +"print('port=',s[1].port)\n" +"print('host=',s[2].host)\n" +"print('family=',s[2].family)\n" +"print('type=',s[2].type)\n" +"print('protocol=',s[2].protocol)\n" +"print('port=',s[2].port)" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:643 +msgid "socket_udp_echo.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:645 +msgid "Tarantool does not currently have a `udp_server` function, therefore socket_udp_echo.lua is more complicated than socket_tcp_echo.lua. It can be implemented with sockets and fibers." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:650 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local socket = require('socket')\n" +"local errno = require('errno')\n" +"local fiber = require('fiber')\n" +"\n" +"local function udp_server_loop(s, handler)\n" +" fiber.name(\"udp_server\")\n" +" while true do\n" +" -- try to read a datagram first\n" +" local msg, peer = s:recvfrom()\n" +" if msg == \"\" then\n" +" -- socket was closed via s:close()\n" +" break\n" +" elseif msg ~= nil then\n" +" -- got a new datagram\n" +" handler(s, peer, msg)\n" +" else\n" +" if s:errno() == errno.EAGAIN or s:errno() == errno.EINTR then\n" +" -- socket is not ready\n" +" s:readable() -- yield, epoll will wake us when new data arrives\n" +" else\n" +" -- socket error\n" +" local msg = s:error()\n" +" s:close() -- save resources and don't wait GC\n" +" error(\"Socket error: \" .. msg)\n" +" end\n" +" end\n" +" end\n" +"end\n" +"\n" +"local function udp_server(host, port, handler)\n" +" local s = socket('AF_INET', 'SOCK_DGRAM', 0)\n" +" if not s then\n" +" return nil -- check errno:strerror()\n" +" end\n" +" if not s:bind(host, port) then\n" +" local e = s:errno() -- save errno\n" +" s:close()\n" +" errno(e) -- restore errno\n" +" return nil -- check errno:strerror()\n" +" end\n" +"\n" +" fiber.create(udp_server_loop, s, handler) -- start a new background fiber\n" +" return s\n" +"end" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:699 +msgid "A function for a client that connects to this server could look something like this ..." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:702 +msgid "local function handler(s, peer, msg)\n" +" -- You don't have to wait until socket is ready to send UDP\n" +" -- s:writable()\n" +" s:sendto(peer.host, peer.port, \"Pong: \" .. msg)\n" +"end\n" +"\n" +"local server = udp_server('127.0.0.1', 3548, handler)\n" +"if not server then\n" +" error('Failed to bind: ' .. errno.strerror())\n" +"end\n" +"\n" +"print('Started')\n" +"\n" +"require('console').start()" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:723 +msgid "http_get.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:725 +msgid "Use the :ref:`http module ` to get data via HTTP." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:728 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local http_client = require('http.client')\n" +"local json = require('json')\n" +"local r = http_client.get('https://api.frankfurter.app/latest?to=USD%2CRUB')\n" +"if r.status ~= 200 then\n" +" print('Failed to get currency ', r.reason)\n" +" return\n" +"end\n" +"local data = json.decode(r.body)\n" +"print(data.base, 'rate of', data.date, 'is', data.rates.RUB, 'RUB or', data.rates.USD, 'USD')" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:746 +msgid "http_send.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:748 +msgid "Use the :ref:`http module ` to send data via HTTP." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:751 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local http_client = require('http.client')\n" +"local json = require('json')\n" +"local data = json.encode({ Key = 'Value'})\n" +"local headers = { Token = 'xxxx', ['X-Secret-Value'] = '42' }\n" +"local r = http_client.post('http://localhost:8081', data, { headers = headers})\n" +"if r.status == 200 then\n" +" print 'Success'\n" +"end" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:768 +msgid "http_server.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:770 +msgid "Use the `http`_ `rock`_ (which must first be installed) to turn Tarantool into a web server." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:773 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local function handler(self)\n" +" return self:render{ json = { ['Your-IP-Is'] = self.peer.host } }\n" +"end\n" +"\n" +"local server = require('http.server').new(nil, 8080, {charset = \"utf8\"}) -- listen *:8080\n" +"server:route({ path = '/' }, handler)\n" +"server:start()\n" +"-- connect to localhost:8080 and see json" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:790 +msgid "http_generate_html.lua" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:792 +msgid "Use the `http `_ `rock` (which must first be installed) to generate HTML pages from templates. The `http `_ `rock `_ has a fairly simple template engine which allows execution of regular Lua code inside text blocks (like PHP). Therefore there is no need to learn new languages in order to write templates." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:799 +msgid "#!/usr/bin/env tarantool\n" +"\n" +"local function handler(self)\n" +"local fruits = {'Apple', 'Orange', 'Grapefruit', 'Banana'}\n" +" return self:render{ fruits = fruits }\n" +"end\n" +"\n" +"local server = require('http.server').new(nil, 8080, {charset = \"utf8\"}) -- nil means '*'\n" +"server:route({ path = '/', file = 'index.html.lua' }, handler)\n" +"server:start()" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:812 +msgid "An \"HTML\" file for this server, including Lua, could look like this (it would produce \"1 Apple | 2 Orange | 3 Grapefruit | 4 Banana\"). Create a ``templates`` directory and put this file in it:" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:816 +msgid "\n" +"\n" +" \n" +" % for i,v in pairs(fruits) do\n" +" \n" +" \n" +" \n" +" \n" +" % end\n" +"
<%= i %><%= v %>
\n" +"\n" +"" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:835 +msgid "select_all.go" +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:837 +msgid "In Go, there is no one-liner to select all tuples from a Tarantool space. Yet you can use a script like this one. Call it on the instance you want to connect to." +msgstr "" + +#: ../../doc/how-to/app/cookbook.rst:841 +msgid "package main\n" +"\n" +"import (\n" +" \"fmt\"\n" +" \"log\"\n" +"\n" +" \"github.com/tarantool/go-tarantool\"\n" +")\n" +"\n" +"/*\n" +"box.cfg{listen = 3301}\n" +"box.schema.user.passwd('pass')\n" +"\n" +"s = box.schema.space.create('tester')\n" +"s:format({\n" +" {name = 'id', type = 'unsigned'},\n" +" {name = 'band_name', type = 'string'},\n" +" {name = 'year', type = 'unsigned'}\n" +"})\n" +"s:create_index('primary', { type = 'hash', parts = {'id'} })\n" +"s:create_index('scanner', { type = 'tree', parts = {'id', 'band_name'} })\n" +"\n" +"s:insert{1, 'Roxette', 1986}\n" +"s:insert{2, 'Scorpions', 2015}\n" +"s:insert{3, 'Ace of Base', 1993}\n" +"*/\n" +"\n" +"func main() {\n" +" conn, err := tarantool.Connect(\"127.0.0.1:3301\", tarantool.Opts{\n" +" User: \"admin\",\n" +" Pass: \"pass\",\n" +" })\n" +"\n" +" if err != nil {\n" +" log.Fatalf(\"Connection refused\")\n" +" }\n" +" defer conn.Close()\n" +"\n" +" spaceName := \"tester\"\n" +" indexName := \"scanner\"\n" +" idFn := conn.Schema.Spaces[spaceName].Fields[\"id\"].Id\n" +" bandNameFn := conn.Schema.Spaces[spaceName].Fields[\"band_name\"].Id\n" +"\n" +" var tuplesPerRequest uint32 = 2\n" +" cursor := []interface{}{}\n" +"\n" +" for {\n" +" resp, err := conn.Select(spaceName, indexName, 0, tuplesPerRequest, tarantool.IterGt, cursor)\n" +" if err != nil {\n" +" log.Fatalf(\"Failed to select: %s\", err)\n" +" }\n" +"\n" +" if resp.Code != tarantool.OkCode {\n" +" log.Fatalf(\"Select failed: %s\", resp.Error)\n" +" }\n" +"\n" +" if len(resp.Data) == 0 {\n" +" break\n" +" }\n" +"\n" +" fmt.Println(\"Iteration\")\n" +"\n" +" tuples := resp.Tuples()\n" +" for _, tuple := range tuples {\n" +" fmt.Printf(\"\\t%v\\n\", tuple)\n" +" }\n" +"\n" +" lastTuple := tuples[len(tuples)-1]\n" +" cursor = []interface{}{lastTuple[idFn], lastTuple[bandNameFn]}\n" +" }\n" +"}\n" +"" +msgstr "" diff --git a/locale/en/how-to/app/creating_app.pot b/locale/en/how-to/app/creating_app.pot new file mode 100644 index 0000000000..ec431cab87 --- /dev/null +++ b/locale/en/how-to/app/creating_app.pot @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/app/creating_app.rst:7 +msgid "Creating an application" +msgstr "" + +#: ../../doc/how-to/app/creating_app.rst:9 +msgid "Further we walk you through key programming practices that will give you a good start in writing Lua applications for Tarantool. We will implement a real microservice based on Tarantool! It is a backend for a simplified version of `Pokémon Go `_, a location-based augmented reality game launched in mid-2016." +msgstr "" + +#: ../../doc/how-to/app/creating_app.rst:16 +msgid "In this game, players use the GPS capability of a mobile device to locate, catch, battle, and train virtual monsters called \"pokémon\" that appear on the screen as if they were in the same real-world location as the player." +msgstr "" + +#: ../../doc/how-to/app/creating_app.rst:21 +msgid "To stay within the walk-through format, let's narrow the original gameplay as follows. We have a map with pokémon spawn locations. Next, we have multiple players who can send catch-a-pokémon requests to the server (which runs our Tarantool microservice). The server responds whether the pokémon is caught or not, increases the player's pokémon counter if yes, and triggers the respawn-a-pokémon method that spawns a new pokémon at the same location in a while." +msgstr "" + +#: ../../doc/how-to/app/creating_app.rst:30 +msgid "We leave client-side applications outside the scope of this story. However, we promise a mini-demo in the end to simulate real users and give us some fun." +msgstr "" + +#: ../../doc/how-to/app/creating_app.rst:37 +msgid "Follow these topics to implement our application:" +msgstr "" diff --git a/locale/en/how-to/app/creating_app/GIS.pot b/locale/en/how-to/app/creating_app/GIS.pot new file mode 100644 index 0000000000..5feeb91a3d --- /dev/null +++ b/locale/en/how-to/app/creating_app/GIS.pot @@ -0,0 +1,127 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/app/creating_app/GIS.rst:4 +msgid "GIS" +msgstr "" + +#: ../../doc/how-to/app/creating_app/GIS.rst:6 +msgid "Now let's discuss ``catch()``, which is the main method in our gaming logic." +msgstr "" + +#: ../../doc/how-to/app/creating_app/GIS.rst:8 +msgid "Here we receive the player's coordinates and the target pokémon's ID number, and we need to answer whether the player has actually caught the pokémon or not (remember that each pokémon has a chance to escape)." +msgstr "" + +#: ../../doc/how-to/app/creating_app/GIS.rst:12 +msgid "First thing, we validate the received player data against its :ref:`Avro schema `. And we check whether such a pokémon exists in our database and is displayed on the map (the pokémon must have the active status):" +msgstr "" + +#: ../../doc/how-to/app/creating_app/GIS.rst:17 +msgid "catch = function(self, pokemon_id, player)\n" +" -- check player data\n" +" local ok, tuple = self.player_model.flatten(player)\n" +" if not ok then\n" +" return false\n" +" end\n" +" -- get pokemon data\n" +" local p_tuple = box.space.pokemons:get(pokemon_id)\n" +" if p_tuple == nil then\n" +" return false\n" +" end\n" +" local ok, pokemon = self.pokemon_model.unflatten(p_tuple)\n" +" if not ok then\n" +" return false\n" +" end\n" +" if pokemon.status ~= self.state.ACTIVE then\n" +" return false\n" +" end\n" +" -- more catch logic to follow\n" +" <...>\n" +"end" +msgstr "" + +#: ../../doc/how-to/app/creating_app/GIS.rst:41 +msgid "Next, we calculate the answer: caught or not." +msgstr "" + +#: ../../doc/how-to/app/creating_app/GIS.rst:43 +msgid "To work with geographical coordinates, we use Tarantool `gis `_ module." +msgstr "" + +#: ../../doc/how-to/app/creating_app/GIS.rst:46 +msgid "To keep things simple, we don't load any specific map, assuming that we deal with a world map. And we do not validate incoming coordinates, assuming again that all received locations are within the planet Earth." +msgstr "" + +#: ../../doc/how-to/app/creating_app/GIS.rst:50 +msgid "We use two geo-specific variables:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/GIS.rst:52 +msgid "``wgs84``, which stands for the latest revision of the World Geodetic System standard, `WGS84 `_. Basically, it comprises a standard coordinate system for the Earth and represents the Earth as an ellipsoid." +msgstr "" + +#: ../../doc/how-to/app/creating_app/GIS.rst:56 +msgid "``nationalmap``, which stands for the `US National Atlas Equal Area `_. This is a projected coordinates system based on WGS84. It gives us a zero base for location projection and allows positioning our players and pokémons in meters." +msgstr "" + +#: ../../doc/how-to/app/creating_app/GIS.rst:61 +msgid "Both these systems are listed in the EPSG Geodetic Parameter Registry, where each system has a unique number. In our code, we assign these listing numbers to respective variables:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/GIS.rst:65 +msgid "wgs84 = 4326,\n" +"nationalmap = 2163," +msgstr "" + +#: ../../doc/how-to/app/creating_app/GIS.rst:70 +msgid "For our game logic, we need one more variable, ``catch_distance``, which defines how close a player must get to a pokémon before trying to catch it. Let's set the distance to 100 meters." +msgstr "" + +#: ../../doc/how-to/app/creating_app/GIS.rst:74 +msgid "catch_distance = 100," +msgstr "" + +#: ../../doc/how-to/app/creating_app/GIS.rst:78 +msgid "Now we're ready to calculate the answer. We need to project the current location of both player (``p_pos``) and pokémon (``m_pos``) on the map, check whether the player is close enough to the pokémon (using ``catch_distance``), and calculate whether the player has caught the pokémon (here we generate some random value and let the pokémon escape if the random value happens to be less than 100 minus pokémon's chance value):" +msgstr "" + +#: ../../doc/how-to/app/creating_app/GIS.rst:85 +msgid "-- project locations\n" +"local m_pos = gis.Point(\n" +" {pokemon.location.x, pokemon.location.y}, self.wgs84\n" +"):transform(self.nationalmap)\n" +"local p_pos = gis.Point(\n" +" {player.location.x, player.location.y}, self.wgs84\n" +"):transform(self.nationalmap)\n" +"\n" +"-- check catch distance condition\n" +"if p_pos:distance(m_pos) > self.catch_distance then\n" +" return false\n" +"end\n" +"-- try to catch pokemon\n" +"local caught = math.random(100) >= 100 - pokemon.chance\n" +"if caught then\n" +" -- update and notify on success\n" +" box.space.pokemons:update(\n" +" pokemon_id, {{'=', self.STATUS, self.state.CAUGHT}}\n" +" )\n" +" self:notify(player, pokemon)\n" +"end\n" +"return caught" +msgstr "" diff --git a/locale/en/how-to/app/creating_app/avro_schemas.pot b/locale/en/how-to/app/creating_app/avro_schemas.pot new file mode 100644 index 0000000000..ff7b1f50df --- /dev/null +++ b/locale/en/how-to/app/creating_app/avro_schemas.pot @@ -0,0 +1,196 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:4 +msgid "Avro schemas" +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:6 +msgid "To store JSON data as tuples, we will apply a savvy practice which reduces data footprint and ensures all stored documents are valid. We will use Tarantool module `avro-schema `_ which checks the schema of a JSON document and converts it to a Tarantool tuple. The tuple will contain only field values, and thus take a lot less space than the original document. In avro-schema terms, converting JSON documents to tuples is \"flattening\", and restoring the original documents is \"unflattening\"." +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:14 +msgid "First you need to :ref:`install ` the module with ``tt rocks install avro-schema``." +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:17 +msgid "Further usage is quite straightforward:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:19 +msgid "For each entity, we need to define a schema in `Apache Avro schema `_ syntax, where we list the entity's fields with their names and `Avro data types `_." +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:23 +msgid "At initialization, we call ``avro-schema.create()`` that creates objects in memory for all schema entities, and ``compile()`` that generates flatten/unflatten methods for each entity." +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:26 +msgid "Further on, we just call flatten/unflatten methods for a respective entity on receiving/sending the entity's data." +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:29 +msgid "Here's what our schema definitions for the player and pokémon entities look like:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:31 +msgid "local schema = {\n" +" player = {\n" +" type=\"record\",\n" +" name=\"player_schema\",\n" +" fields={\n" +" {name=\"id\", type=\"long\"},\n" +" {name=\"name\", type=\"string\"},\n" +" {\n" +" name=\"location\",\n" +" type= {\n" +" type=\"record\",\n" +" name=\"player_location\",\n" +" fields={\n" +" {name=\"x\", type=\"double\"},\n" +" {name=\"y\", type=\"double\"}\n" +" }\n" +" }\n" +" }\n" +" }\n" +" },\n" +" pokemon = {\n" +" type=\"record\",\n" +" name=\"pokemon_schema\",\n" +" fields={\n" +" {name=\"id\", type=\"long\"},\n" +" {name=\"status\", type=\"string\"},\n" +" {name=\"name\", type=\"string\"},\n" +" {name=\"chance\", type=\"double\"},\n" +" {\n" +" name=\"location\",\n" +" type= {\n" +" type=\"record\",\n" +" name=\"pokemon_location\",\n" +" fields={\n" +" {name=\"x\", type=\"double\"},\n" +" {name=\"y\", type=\"double\"}\n" +" }\n" +" }\n" +" }\n" +" }\n" +" }\n" +"}" +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:76 +msgid "And here's how we create and compile our entities at initialization:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:78 +msgid "-- load avro-schema module with require()\n" +"local avro = require('avro_schema')\n" +"\n" +"-- create models\n" +"local ok_m, pokemon = avro.create(schema.pokemon)\n" +"local ok_p, player = avro.create(schema.player)\n" +"if ok_m and ok_p then\n" +" -- compile models\n" +" local ok_cm, compiled_pokemon = avro.compile(pokemon)\n" +" local ok_cp, compiled_player = avro.compile(player)\n" +" if ok_cm and ok_cp then\n" +" -- start the game\n" +" <...>\n" +" else\n" +" log.error('Schema compilation failed')\n" +" end\n" +"else\n" +" log.info('Schema creation failed')\n" +"end\n" +"return false" +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:101 +msgid "As for the map entity, it would be an overkill to introduce a schema for it, because we have only one map in the game, it has very few fields, and -- which is most important -- we use the map only inside our logic, never exposing it to external users." +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:109 +msgid "Next, we need methods to implement the game logic. To simulate object-oriented programming in our Lua code, let's store all Lua functions and shared variables in a single local variable (let's name it as ``game``). This will allow us to address functions or variables from within our module as ``self.func_name`` or ``self.var_name``. Like this:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:115 +msgid "local game = {\n" +" -- a local variable\n" +" num_players = 0,\n" +"\n" +" -- a method that prints a local variable\n" +" hello = function(self)\n" +" print('Hello! Your player number is ' .. self.num_players .. '.')\n" +" end,\n" +"\n" +" -- a method that calls another method and returns a local variable\n" +" sign_in = function(self)\n" +" self.num_players = self.num_players + 1\n" +" self:hello()\n" +" return self.num_players\n" +" end\n" +"}" +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:134 +msgid "In OOP terms, we can now regard local variables inside ``game`` as object fields, and local functions as object methods." +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:139 +msgid "In this manual, Lua examples use **local** variables. Use **global** variables with caution, since the module’s users may be unaware of them." +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:142 +msgid "To enable/disable the use of undeclared global variables in your Lua code, use Tarantool's :ref:`strict ` module." +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:145 +msgid "So, our game module will have the following methods:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:147 +msgid "``catch()`` to calculate whether the pokémon was caught (besides the coordinates of both the player and pokémon, this method will apply a probability factor, so not every pokémon within the player's reach will be caught);" +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:151 +msgid "``respawn()`` to add missing pokémons to the map, say, every 60 seconds (we assume that a frightened pokémon runs away, so we remove a pokémon from the map on any catch attempt and add it back to the map in a while);" +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:154 +msgid "``notify()`` to log information about caught pokémons (like \"Player 1 caught pokémon A\");" +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:156 +msgid "``start()`` to initialize the game (it will create database spaces, create and compile avro schemas, and launch ``respawn()``)." +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:159 +msgid "Besides, it would be convenient to have methods for working with Tarantool storage. For example:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:162 +msgid "``add_pokemon()`` to add a pokémon to the database, and" +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:163 +msgid "``map()`` to populate the map with all pokémons stored in Tarantool." +msgstr "" + +#: ../../doc/how-to/app/creating_app/avro_schemas.rst:165 +msgid "We'll need these two methods primarily when initializing our game, but we can also call them later, for example to test our code." +msgstr "" diff --git a/locale/en/how-to/app/creating_app/bootstrapping_a_database.pot b/locale/en/how-to/app/creating_app/bootstrapping_a_database.pot new file mode 100644 index 0000000000..3210975621 --- /dev/null +++ b/locale/en/how-to/app/creating_app/bootstrapping_a_database.pot @@ -0,0 +1,83 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/app/creating_app/bootstrapping_a_database.rst:4 +msgid "Bootstrapping a database" +msgstr "" + +#: ../../doc/how-to/app/creating_app/bootstrapping_a_database.rst:6 +msgid "Let's discuss game initialization. In ``start()`` method, we need to populate Tarantool spaces with pokémon data. Why not keep all game data in memory? Why use a database? The answer is: :ref:`persistence `. Without a database, we risk losing data on power outage, for example. But if we store our data in an in-memory database, Tarantool takes care to persist it on disk whenever it's changed. This gives us one more benefit: quick startup in case of failure. Tarantool has a :ref:`smart algorithm ` that quickly loads all data from disk into memory on startup, so the warm-up takes little time." +msgstr "" + +#: ../../doc/how-to/app/creating_app/bootstrapping_a_database.rst:16 +msgid "We'll be using functions from Tarantool built-in :ref:`box ` module:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/bootstrapping_a_database.rst:18 +msgid "``box.schema.create_space('pokemons')`` to create a space named ``pokemon`` for storing information about pokémons (we don't create a similar space for players, because we intend to only send/receive player information via API calls, so we needn't store it);" +msgstr "" + +#: ../../doc/how-to/app/creating_app/bootstrapping_a_database.rst:22 +msgid "``box.space.pokemons:create_index('primary', {type = 'hash', parts = {1, 'unsigned'}})`` to create a primary HASH index by pokémon ID;" +msgstr "" + +#: ../../doc/how-to/app/creating_app/bootstrapping_a_database.rst:24 +msgid "``box.space.pokemons:create_index('status', {type = 'tree', parts = {2, 'str'}})`` to create a secondary TREE index by pokémon status." +msgstr "" + +#: ../../doc/how-to/app/creating_app/bootstrapping_a_database.rst:27 +msgid "Notice the ``parts =`` argument in the index specification. The pokémon ID is the first field in a Tarantool tuple since it’s the first member of the respective Avro type. So does the pokémon status. The actual JSON document may have ID or status fields at any position of the JSON map." +msgstr "" + +#: ../../doc/how-to/app/creating_app/bootstrapping_a_database.rst:32 +msgid "The implementation of ``start()`` method looks like this:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/bootstrapping_a_database.rst:34 +msgid "-- create game object\n" +"start = function(self)\n" +" -- create spaces and indexes\n" +" box.once('init', function()\n" +" box.schema.create_space('pokemons')\n" +" box.space.pokemons:create_index(\n" +" \"primary\", {type = 'hash', parts = {1, 'unsigned'}}\n" +" )\n" +" box.space.pokemons:create_index(\n" +" \"status\", {type = \"tree\", parts = {2, 'str'}}\n" +" )\n" +" end)\n" +"\n" +" -- create models\n" +" local ok_m, pokemon = avro.create(schema.pokemon)\n" +" local ok_p, player = avro.create(schema.player)\n" +" if ok_m and ok_p then\n" +" -- compile models\n" +" local ok_cm, compiled_pokemon = avro.compile(pokemon)\n" +" local ok_cp, compiled_player = avro.compile(player)\n" +" if ok_cm and ok_cp then\n" +" -- start the game\n" +" <...>\n" +" else\n" +" log.error('Schema compilation failed')\n" +" end\n" +" else\n" +" log.info('Schema creation failed')\n" +" end\n" +" return false\n" +"end" +msgstr "" diff --git a/locale/en/how-to/app/creating_app/fibers.pot b/locale/en/how-to/app/creating_app/fibers.pot new file mode 100644 index 0000000000..55eba2182c --- /dev/null +++ b/locale/en/how-to/app/creating_app/fibers.pot @@ -0,0 +1,73 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/app/creating_app/fibers.rst:4 +msgid "Fibers, yields and cooperative multitasking" +msgstr "" + +#: ../../doc/how-to/app/creating_app/fibers.rst:6 +msgid "But wait! If we launch it as shown above -- ``self.respawn()`` -- the function will be executed only once, just like all the other methods. But we need to execute ``respawn()`` every 60 seconds. Creating a :ref:`fiber ` is the Tarantool way of making application logic work in the background at all times." +msgstr "" + +#: ../../doc/how-to/app/creating_app/fibers.rst:12 +msgid "A **fiber** is a set of instructions that are executed with :ref:`cooperative multitasking `: the instructions contain :ref:`yield ` signals, upon which control is passed to another fiber." +msgstr "" + +#: ../../doc/how-to/app/creating_app/fibers.rst:16 +msgid "Let's launch ``respawn()`` in a fiber to make it work in the background all the time. To do so, we'll need to amend ``respawn()``:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/fibers.rst:19 +msgid "respawn = function(self)\n" +" -- let's give our fiber a name;\n" +" -- this will produce neat output in fiber.info()\n" +" fiber.name('Respawn fiber')\n" +" while true do\n" +" for _, tuple in box.space.pokemons.index.status:pairs(\n" +" self.state.CAUGHT) do\n" +" box.space.pokemons:update(\n" +" tuple[self.ID],\n" +" {{'=', self.STATUS, self.state.ACTIVE}}\n" +" )\n" +" end\n" +" fiber.sleep(self.respawn_time)\n" +" end\n" +"end" +msgstr "" + +#: ../../doc/how-to/app/creating_app/fibers.rst:37 +msgid "and call it as a fiber in ``start()``:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/fibers.rst:39 +msgid "start = function(self)\n" +" -- create spaces and indexes\n" +" <...>\n" +" -- create models\n" +" <...>\n" +" -- compile models\n" +" <...>\n" +" -- start the game\n" +" self.pokemon_model = compiled_pokemon\n" +" self.player_model = compiled_player\n" +" fiber.create(self.respawn, self)\n" +" log.info('Started')\n" +" -- errors if schema creation or compilation fails\n" +" <...>\n" +"end" +msgstr "" diff --git a/locale/en/how-to/app/creating_app/index_iterators.pot b/locale/en/how-to/app/creating_app/index_iterators.pot new file mode 100644 index 0000000000..ed037d66e8 --- /dev/null +++ b/locale/en/how-to/app/creating_app/index_iterators.pot @@ -0,0 +1,88 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/app/creating_app/index_iterators.rst:4 +msgid "Index iterators" +msgstr "" + +#: ../../doc/how-to/app/creating_app/index_iterators.rst:6 +msgid "By our gameplay, all caught pokémons are returned back to the map. We do this for all pokémons on the map every 60 seconds using ``respawn()`` method. We iterate through pokémons by status using Tarantool index iterator function :doc:`/reference/reference_lua/box_index/pairs` and reset the statuses of all \"caught\" pokémons back to \"active\" using ``box.space.pokemons:update()``." +msgstr "" + +#: ../../doc/how-to/app/creating_app/index_iterators.rst:12 +msgid "respawn = function(self)\n" +" fiber.name('Respawn fiber')\n" +" for _, tuple in box.space.pokemons.index.status:pairs(\n" +" self.state.CAUGHT) do\n" +" box.space.pokemons:update(\n" +" tuple[self.ID],\n" +" {{'=', self.STATUS, self.state.ACTIVE}}\n" +" )\n" +" end\n" +" end" +msgstr "" + +#: ../../doc/how-to/app/creating_app/index_iterators.rst:25 +msgid "For readability, we introduce named fields:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/index_iterators.rst:27 +msgid "ID = 1, STATUS = 2," +msgstr "" + +#: ../../doc/how-to/app/creating_app/index_iterators.rst:30 +msgid "The complete implementation of ``start()`` now looks like this:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/index_iterators.rst:32 +msgid "-- create game object\n" +"start = function(self)\n" +" -- create spaces and indexes\n" +" box.once('init', function()\n" +" box.schema.create_space('pokemons')\n" +" box.space.pokemons:create_index(\n" +" \"primary\", {type = 'hash', parts = {1, 'unsigned'}}\n" +" )\n" +" box.space.pokemons:create_index(\n" +" \"status\", {type = \"tree\", parts = {2, 'str'}}\n" +" )\n" +" end)\n" +"\n" +" -- create models\n" +" local ok_m, pokemon = avro.create(schema.pokemon)\n" +" local ok_p, player = avro.create(schema.player)\n" +" if ok_m and ok_p then\n" +" -- compile models\n" +" local ok_cm, compiled_pokemon = avro.compile(pokemon)\n" +" local ok_cp, compiled_player = avro.compile(player)\n" +" if ok_cm and ok_cp then\n" +" -- start the game\n" +" self.pokemon_model = compiled_pokemon\n" +" self.player_model = compiled_player\n" +" self.respawn()\n" +" log.info('Started')\n" +" return true\n" +" else\n" +" log.error('Schema compilation failed')\n" +" end\n" +" else\n" +" log.info('Schema creation failed')\n" +" end\n" +" return false\n" +"end" +msgstr "" diff --git a/locale/en/how-to/app/creating_app/logging.pot b/locale/en/how-to/app/creating_app/logging.pot new file mode 100644 index 0000000000..22a7023242 --- /dev/null +++ b/locale/en/how-to/app/creating_app/logging.pot @@ -0,0 +1,83 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/app/creating_app/logging.rst:4 +msgid "Logging" +msgstr "" + +#: ../../doc/how-to/app/creating_app/logging.rst:6 +msgid "One more helpful function that we used in ``start()`` was ``log.infо()`` from Tarantool :ref:`log ` module. We also need this function in ``notify()`` to add a record to the log file on every successful catch:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/logging.rst:10 +msgid "-- event notification\n" +"notify = function(self, player, pokemon)\n" +" log.info(\"Player '%s' caught '%s'\", player.name, pokemon.name)\n" +"end" +msgstr "" + +#: ../../doc/how-to/app/creating_app/logging.rst:17 +msgid "We use default Tarantool :ref:`log settings `, so we'll see the log output in console when we launch our application in script mode." +msgstr "" + +#: ../../doc/how-to/app/creating_app/logging.rst:23 +msgid "Great! We've discussed all programming practices used in our Lua module (see `pokemon.lua `_)." +msgstr "" + +#: ../../doc/how-to/app/creating_app/logging.rst:26 +msgid "Now let's prepare the test environment. As planned, we write a Lua application (see `game.lua `_) to initialize Tarantool's database module, initialize our game, call the game loop and simulate a couple of player requests." +msgstr "" + +#: ../../doc/how-to/app/creating_app/logging.rst:31 +msgid "To launch our microservice, we put both the ``pokemon.lua`` module and the ``game.lua`` application in the current directory, install all external modules, and launch the Tarantool instance running our ``game.lua`` application (this example is for Ubuntu):" +msgstr "" + +#: ../../doc/how-to/app/creating_app/logging.rst:36 +msgid "$ ls\n" +"game.lua pokemon.lua\n" +"$ sudo apt-get install tarantool-gis\n" +"$ sudo apt-get install tarantool-avro-schema\n" +"$ tarantool game.lua" +msgstr "" + +#: ../../doc/how-to/app/creating_app/logging.rst:44 +msgid "Tarantool starts and initializes the database. Then Tarantool executes the demo logic from ``game.lua``: adds a pokémon named Pikachu (its chance to be caught is very high, 99.1), displays the current map (it contains one active pokémon, Pikachu) and processes catch requests from two players. Player1 is located just near the lonely Pikachu pokémon and Player2 is located far away from it. As expected, the catch results in this output are \"true\" for Player1 and \"false\" for Player2. Finally, Tarantool displays the current map which is empty, because Pikachu is caught and temporarily inactive:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/logging.rst:53 +msgid "$ tarantool game.lua\n" +"2017-01-09 20:19:24.605 [6282] main/101/game.lua C> version 1.7.3-43-gf5fa1e1\n" +"2017-01-09 20:19:24.605 [6282] main/101/game.lua C> log level 5\n" +"2017-01-09 20:19:24.605 [6282] main/101/game.lua I> mapping 1073741824 bytes for tuple arena...\n" +"2017-01-09 20:19:24.609 [6282] main/101/game.lua I> initializing an empty data directory\n" +"2017-01-09 20:19:24.634 [6282] snapshot/101/main I> saving snapshot `./00000000000000000000.snap.inprogress'\n" +"2017-01-09 20:19:24.635 [6282] snapshot/101/main I> done\n" +"2017-01-09 20:19:24.641 [6282] main/101/game.lua I> ready to accept requests\n" +"2017-01-09 20:19:24.786 [6282] main/101/game.lua I> Started\n" +"---\n" +"- {'id': 1, 'status': 'active', 'location': {'y': 2, 'x': 1}, 'name': 'Pikachu', 'chance': 99.1}\n" +"...\n" +"\n" +"2017-01-09 20:19:24.789 [6282] main/101/game.lua I> Player 'Player1' caught 'Pikachu'\n" +"true\n" +"false\n" +"--- []\n" +"...\n" +"\n" +"2017-01-09 20:19:24.789 [6282] main C> entering the event loop" +msgstr "" diff --git a/locale/en/how-to/app/creating_app/modules_rocks_and_applications.pot b/locale/en/how-to/app/creating_app/modules_rocks_and_applications.pot new file mode 100644 index 0000000000..f38aaa42f6 --- /dev/null +++ b/locale/en/how-to/app/creating_app/modules_rocks_and_applications.pot @@ -0,0 +1,103 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/app/creating_app/modules_rocks_and_applications.rst:4 +msgid "Modules, rocks and applications" +msgstr "" + +#: ../../doc/how-to/app/creating_app/modules_rocks_and_applications.rst:6 +msgid "To make our game logic available to other developers and Lua applications, let's put it into a Lua module." +msgstr "" + +#: ../../doc/how-to/app/creating_app/modules_rocks_and_applications.rst:9 +msgid "A **module** (called \"rock\" in Lua) is an optional library which enhances Tarantool functionality. So, we can install our logic as a module in Tarantool and use it from any Tarantool application or module. Like applications, modules in Tarantool can be written in Lua (rocks), C or C++." +msgstr "" + +#: ../../doc/how-to/app/creating_app/modules_rocks_and_applications.rst:14 +msgid "Modules are good for two things:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/modules_rocks_and_applications.rst:16 +msgid "easier **code management** (reuse, packaging, versioning), and" +msgstr "" + +#: ../../doc/how-to/app/creating_app/modules_rocks_and_applications.rst:17 +msgid "hot **code reload** without restarting the Tarantool instance." +msgstr "" + +#: ../../doc/how-to/app/creating_app/modules_rocks_and_applications.rst:19 +msgid "Technically, a module is a file with source code that exports its functions in an API. For example, here is a Lua module named ``mymodule.lua`` that exports one function named ``myfun``:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/modules_rocks_and_applications.rst:23 +msgid "local exports = {}\n" +"exports.myfun = function(input_string)\n" +" print('Hello', input_string)\n" +"end\n" +"return exports" +msgstr "" + +#: ../../doc/how-to/app/creating_app/modules_rocks_and_applications.rst:31 +msgid "To launch the function ``myfun()`` -- from another module, from a Lua application, or from Tarantool itself, -- we need to save this module as a file, then load this module with the ``require()`` directive and call the exported function." +msgstr "" + +#: ../../doc/how-to/app/creating_app/modules_rocks_and_applications.rst:35 +msgid "For example, here's a Lua application that uses ``myfun()`` function from ``mymodule.lua`` module:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/modules_rocks_and_applications.rst:38 +msgid "-- loading the module\n" +"local mymodule = require('mymodule')\n" +"\n" +"-- calling myfun() from within test() function\n" +"local test = function()\n" +" mymodule.myfun()\n" +"end" +msgstr "" + +#: ../../doc/how-to/app/creating_app/modules_rocks_and_applications.rst:48 +msgid "A thing to remember here is that the ``require()`` directive takes load paths to Lua modules from the ``package.path`` variable. This is a semicolon-separated string, where a question mark is used to interpolate the module name. By default, this variable contains system-wide Lua paths and the working directory. But if we put our modules inside a specific folder (e.g. ``scripts/``), we need to add this folder to ``package.path`` before any calls to ``require()``:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/modules_rocks_and_applications.rst:55 +msgid "package.path = 'scripts/?.lua;' .. package.path" +msgstr "" + +#: ../../doc/how-to/app/creating_app/modules_rocks_and_applications.rst:59 +msgid "For our microservice, a simple and convenient solution would be to put all methods in a Lua module (say ``pokemon.lua``) and to write a Lua application (say ``game.lua``) that initializes the gaming environment and starts the game loop." +msgstr "" + +#: ../../doc/how-to/app/creating_app/modules_rocks_and_applications.rst:67 +msgid "Now let's get down to implementation details. In our game, we need three entities:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/modules_rocks_and_applications.rst:69 +msgid "**map**, which is an array of pokémons with coordinates of respawn locations; in this version of the game, let a location be a rectangle identified with two points, upper-left and lower-right;" +msgstr "" + +#: ../../doc/how-to/app/creating_app/modules_rocks_and_applications.rst:72 +msgid "**player**, which has an ID, a name, and coordinates of the player's location point;" +msgstr "" + +#: ../../doc/how-to/app/creating_app/modules_rocks_and_applications.rst:74 +msgid "**pokémon**, which has the same fields as the player, plus a status (active/inactive, that is present on the map or not) and a catch probability (well, let's give our pokémons a chance to escape :-) )" +msgstr "" + +#: ../../doc/how-to/app/creating_app/modules_rocks_and_applications.rst:78 +msgid "We'll store these entities as tuples in Tarantool spaces. But to deliver our backend application as a microservice, the good practice would be to send/receive our data in the universal JSON format, thus using Tarantool as a document storage." +msgstr "" diff --git a/locale/en/how-to/app/creating_app/nginx.pot b/locale/en/how-to/app/creating_app/nginx.pot new file mode 100644 index 0000000000..b84153ae05 --- /dev/null +++ b/locale/en/how-to/app/creating_app/nginx.pot @@ -0,0 +1,99 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/app/creating_app/nginx.rst:4 +msgid "nginx" +msgstr "" + +#: ../../doc/how-to/app/creating_app/nginx.rst:6 +msgid "In the real life, this microservice would work over HTTP. Let's add `nginx `_ web server to our environment and make a similar demo. But how do we make Tarantool methods callable via REST API? We use nginx with `Tarantool nginx upstream `_ module and create one more Lua script (`app.lua `_) that exports three of our game methods -- ``add_pokemon()``, ``map()`` and ``catch()`` -- as REST endpoints of the nginx upstream module:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/nginx.rst:15 +msgid "local game = require('pokemon')\n" +"box.cfg{listen=3301}\n" +"game:start()\n" +"\n" +"-- add, map and catch functions exposed to REST API\n" +"function add(request, pokemon)\n" +" return {\n" +" result=game:add_pokemon(pokemon)\n" +" }\n" +"end\n" +"\n" +"function map(request)\n" +" return {\n" +" map=game:map()\n" +" }\n" +"end\n" +"\n" +"function catch(request, pid, player)\n" +" local id = tonumber(pid)\n" +" if id == nil then\n" +" return {result=false}\n" +" end\n" +" return {\n" +" result=game:catch(id, player)\n" +" }\n" +"end" +msgstr "" + +#: ../../doc/how-to/app/creating_app/nginx.rst:44 +msgid "An easy way to configure and launch nginx would be to create a Docker container based on a `Docker image `_ with nginx and the upstream module already installed (see `http/Dockerfile `_). We take a standard `nginx.conf `_, where we define an upstream with our Tarantool backend running (this is another Docker container, see details below):" +msgstr "" + +#: ../../doc/how-to/app/creating_app/nginx.rst:53 +msgid "upstream tnt {\n" +" server pserver:3301 max_fails=1 fail_timeout=60s;\n" +" keepalive 250000;\n" +"}" +msgstr "" + +#: ../../doc/how-to/app/creating_app/nginx.rst:60 +msgid "and add some Tarantool-specific parameters (see descriptions in the upstream module's `README `_ file):" +msgstr "" + +#: ../../doc/how-to/app/creating_app/nginx.rst:64 +msgid "server {\n" +" server_name tnt_test;\n" +"\n" +" listen 80 default deferred reuseport so_keepalive=on backlog=65535;\n" +"\n" +" location = / {\n" +" root /usr/local/nginx/html;\n" +" }\n" +"\n" +" location /api {\n" +" # answers check infinity timeout\n" +" tnt_read_timeout 60m;\n" +" if ( $request_method = GET ) {\n" +" tnt_method \"map\";\n" +" }\n" +" tnt_http_rest_methods get;\n" +" tnt_http_methods all;\n" +" tnt_multireturn_skip_count 2;\n" +" tnt_pure_result on;\n" +" tnt_pass_http_request on parse_args;\n" +" tnt_pass tnt;\n" +" }\n" +"}" +msgstr "" + +#: ../../doc/how-to/app/creating_app/nginx.rst:90 +msgid "Likewise, we put Tarantool server and all our game logic in a second Docker container based on the `official Tarantool 1.9 image `_ (see `src/Dockerfile `_) and set the container's default command to ``tarantool app.lua``. This is the backend." +msgstr "" diff --git a/locale/en/how-to/app/creating_app/non-blockng_io.pot b/locale/en/how-to/app/creating_app/non-blockng_io.pot new file mode 100644 index 0000000000..e33307a3e6 --- /dev/null +++ b/locale/en/how-to/app/creating_app/non-blockng_io.pot @@ -0,0 +1,146 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/app/creating_app/non-blockng_io.rst:4 +msgid "Non-blocking IO" +msgstr "" + +#: ../../doc/how-to/app/creating_app/non-blockng_io.rst:6 +msgid "To test the REST API, we create a new script (`client.lua `_), which is similar to our ``game.lua`` application, but makes HTTP POST and GET requests rather than calling Lua functions:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/non-blockng_io.rst:11 +msgid "local http = require('curl').http()\n" +"local json = require('json')\n" +"local URI = os.getenv('SERVER_URI')\n" +"local fiber = require('fiber')\n" +"\n" +"local player1 = {\n" +" name=\"Player1\",\n" +" id=1,\n" +" location = {\n" +" x=1.0001,\n" +" y=2.0003\n" +" }\n" +"}\n" +"local player2 = {\n" +" name=\"Player2\",\n" +" id=2,\n" +" location = {\n" +" x=30.123,\n" +" y=40.456\n" +" }\n" +"}\n" +"\n" +"local pokemon = {\n" +" name=\"Pikachu\",\n" +" chance=99.1,\n" +" id=1,\n" +" status=\"active\",\n" +" location = {\n" +" x=1,\n" +" y=2\n" +" }\n" +"}\n" +"\n" +"function request(method, body, id)\n" +" local resp = http:request(\n" +" method, URI, body\n" +" )\n" +" if id ~= nil then\n" +" print(string.format('Player %d result: %s',\n" +" id, resp.body))\n" +" else\n" +" print(resp.body)\n" +" end\n" +"end\n" +"\n" +"local players = {}\n" +"function catch(player)\n" +" fiber.sleep(math.random(5))\n" +" print('Catch pokemon by player ' .. tostring(player.id))\n" +" request(\n" +" 'POST', '{\"method\": \"catch\",\n" +" \"params\": [1, '..json.encode(player)..']}',\n" +" tostring(player.id)\n" +" )\n" +" table.insert(players, player.id)\n" +"end\n" +"\n" +"print('Create pokemon')\n" +"request('POST', '{\"method\": \"add\",\n" +" \"params\": ['..json.encode(pokemon)..']}')\n" +"request('GET', '')\n" +"\n" +"fiber.create(catch, player1)\n" +"fiber.create(catch, player2)\n" +"\n" +"-- wait for players\n" +"while #players ~= 2 do\n" +" fiber.sleep(0.001)\n" +"end\n" +"\n" +"request('GET', '')\n" +"os.exit()" +msgstr "" + +#: ../../doc/how-to/app/creating_app/non-blockng_io.rst:86 +msgid "When you run this script, you’ll notice that both players have equal chances to make the first attempt at catching the pokémon. In a classical Lua script, a networked call blocks the script until it’s finished, so the first catch attempt can only be done by the player who entered the game first. In Tarantool, both players play concurrently, since all modules are integrated with Tarantool :ref:`cooperative multitasking ` and use non-blocking I/O." +msgstr "" + +#: ../../doc/how-to/app/creating_app/non-blockng_io.rst:94 +msgid "Indeed, when Player1 makes its first REST call, the script doesn’t block. The fiber running ``catch()`` function on behalf of Player1 issues a non-blocking call to the operating system and yields control to the next fiber, which happens to be the fiber of Player2. Player2’s fiber does the same. When the network response is received, Player1's fiber is activated by Tarantool cooperative scheduler, and resumes its work. All Tarantool :ref:`modules ` use non-blocking I/O and are integrated with Tarantool cooperative scheduler. For module developers, Tarantool provides an :ref:`API `." +msgstr "" + +#: ../../doc/how-to/app/creating_app/non-blockng_io.rst:103 +msgid "For our HTTP test, we create a third container based on the `official Tarantool 1.9 image `_ (see `client/Dockerfile `_) and set the container's default command to ``tarantool client.lua``." +msgstr "" + +#: ../../doc/how-to/app/creating_app/non-blockng_io.rst:111 +msgid "To run this test locally, download our `pokemon `_ project from GitHub and say:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/non-blockng_io.rst:114 +msgid "$ docker-compose build\n" +"$ docker-compose up" +msgstr "" + +#: ../../doc/how-to/app/creating_app/non-blockng_io.rst:119 +msgid "Docker Compose builds and runs all the three containers: ``pserver`` (Tarantool backend), ``phttp`` (nginx) and ``pclient`` (demo client). You can see log messages from all these containers in the console, pclient saying that it made an HTTP request to create a pokémon, made two catch requests, requested the map (empty since the pokémon is caught and temporarily inactive) and exited:" +msgstr "" + +#: ../../doc/how-to/app/creating_app/non-blockng_io.rst:125 +msgid "pclient_1 | Create pokemon\n" +"<...>\n" +"pclient_1 | {\"result\":true}\n" +"pclient_1 | {\"map\":[{\"id\":1,\"status\":\"active\",\"location\":{\"y\":2,\"x\":1},\"name\":\"Pikachu\",\"chance\":99.100000}]}\n" +"pclient_1 | Catch pokemon by player 2\n" +"pclient_1 | Catch pokemon by player 1\n" +"pclient_1 | Player 1 result: {\"result\":true}\n" +"pclient_1 | Player 2 result: {\"result\":false}\n" +"pclient_1 | {\"map\":[]}\n" +"pokemon_pclient_1 exited with code 0" +msgstr "" + +#: ../../doc/how-to/app/creating_app/non-blockng_io.rst:138 +msgid "Congratulations! Here's the end point of our walk-through. As further reading, see more about :ref:`installing ` and :ref:`contributing ` a module." +msgstr "" + +#: ../../doc/how-to/app/creating_app/non-blockng_io.rst:142 +msgid "See also reference on :ref:`Tarantool modules ` and :ref:`C API `, and don't miss our :ref:`Lua cookbook recipes `." +msgstr "" diff --git a/locale/en/how-to/app/index.pot b/locale/en/how-to/app/index.pot new file mode 100644 index 0000000000..4665985635 --- /dev/null +++ b/locale/en/how-to/app/index.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/app/index.rst:4 +msgid "Developing applications with Tarantool" +msgstr "" + +#: ../../doc/how-to/app/index.rst:6 +msgid "Using Tarantool as an application server, you can write your own applications. Tarantool’s native language for writing applications is `Lua `_, so a typical application would be a file that contains your Lua script. But you can also write applications in C or C++." +msgstr "" diff --git a/locale/en/how-to/app/launching_app.pot b/locale/en/how-to/app/launching_app.pot new file mode 100644 index 0000000000..52703e1beb --- /dev/null +++ b/locale/en/how-to/app/launching_app.pot @@ -0,0 +1,245 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/app/launching_app.rst:5 +msgid "Launching an application" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:7 +msgid "Using Tarantool as an application server, you can write your own applications. Tarantool’s native language for writing applications is `Lua `_, so a typical application would be a file that contains your Lua script. But you can also write applications in C or C++." +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:15 +msgid "If you're new to Lua, we recommend going over the interactive Tarantool tutorial before proceeding with this chapter. To launch the tutorial, say ``tutorial()`` in Tarantool console:" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:19 +msgid "tarantool> tutorial()\n" +"---\n" +"- |\n" +" Tutorial -- Screen #1 -- Hello, Moon\n" +" ====================================\n" +"\n" +" Welcome to the Tarantool tutorial.\n" +" It will introduce you to Tarantool’s Lua application server\n" +" and database server, which is what’s running what you’re seeing.\n" +" This is INTERACTIVE -- you’re expected to enter requests\n" +" based on the suggestions or examples in the screen’s text.\n" +" <...>" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:34 +msgid "Let's create and launch our first Lua application for Tarantool. Here's a simplest Lua application, the good old \"Hello, world!\":" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:37 +msgid "#!/usr/bin/env tarantool\n" +"print('Hello, world!')" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:42 +msgid "We save it in a file. Let it be ``myapp.lua`` in the current directory." +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:44 +msgid "Now let's discuss how we can launch our application with Tarantool." +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:50 +msgid "Launching in Docker" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:52 +msgid "If we run Tarantool in a :ref:`Docker container `, the following command will start Tarantool without any application:" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:55 +msgid "$ # create a temporary container and run it in interactive mode\n" +"$ docker run --rm -t -i tarantool/tarantool:latest" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:60 +msgid "To run Tarantool with our application, we can say:" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:62 +msgid "$ # create a temporary container and\n" +"$ # launch Tarantool with our application\n" +"$ docker run --rm -t -i \\\n" +" -v `pwd`/myapp.lua:/opt/tarantool/myapp.lua \\\n" +" -v /data/dir/on/host:/var/lib/tarantool \\\n" +" tarantool/tarantool:latest tarantool /opt/tarantool/myapp.lua" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:71 +msgid "Here two resources on the host get mounted in the container:" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:73 +msgid "our application file (myapp.lua) and" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:74 +msgid "Tarantool data directory (``/data/dir/on/host``)." +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:76 +msgid "By convention, the directory for Tarantool application code inside a container is ``/opt/tarantool``, and the directory for data is ``/var/lib/tarantool``." +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:83 +msgid "Launching a binary program" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:85 +msgid "If we run Tarantool from a :ref:`package ` or from a :ref:`source build `, we can launch our application:" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:89 +msgid "in the script mode," +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:90 +msgid "as a server application, or" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:91 +msgid "as a daemon service." +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:93 +msgid "The simplest way is to pass the filename to Tarantool at start:" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:95 +#: ../../doc/how-to/app/launching_app.rst:186 +msgid "$ tarantool myapp.lua\n" +"Hello, world!\n" +"$" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:101 +msgid "Tarantool starts, executes our script in the **script mode** and exits." +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:103 +msgid "Now let’s turn this script into a **server application**. We use :doc:`box.cfg ` from Tarantool’s built-in Lua module to:" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:107 +msgid "launch the database (a database has a persistent on-disk state, which needs to be restored after we start an application) and" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:109 +msgid "configure Tarantool as a server that accepts requests over a TCP port." +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:111 +msgid "We also add some simple database logic, using :doc:`space.create() ` and :ref:`create_index() ` to create a space with a primary index. We use the function :doc:`box.once() ` to make sure that our logic will be executed only once when the database is initialized for the first time, so we don't try to create an existing space or index on each invocation of the script:" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:119 +msgid "#!/usr/bin/env tarantool\n" +"-- Configure database\n" +"box.cfg {\n" +" listen = 3301\n" +"}\n" +"box.once(\"bootstrap\", function()\n" +" box.schema.space.create('tweedledum')\n" +" box.space.tweedledum:create_index('primary',\n" +" { type = 'TREE', parts = {1, 'unsigned'}})\n" +"end)" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:132 +msgid "Now we launch our application in the same manner as before:" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:134 +msgid "$ tarantool myapp.lua\n" +"Hello, world!\n" +"2017-08-11 16:07:14.250 [41436] main/101/myapp.lua C> version 2.1.0-429-g4e5231702\n" +"2017-08-11 16:07:14.250 [41436] main/101/myapp.lua C> log level 5\n" +"2017-08-11 16:07:14.251 [41436] main/101/myapp.lua I> mapping 1073741824 bytes for tuple arena...\n" +"2017-08-11 16:07:14.255 [41436] main/101/myapp.lua I> recovery start\n" +"2017-08-11 16:07:14.255 [41436] main/101/myapp.lua I> recovering from `./00000000000000000000.snap'\n" +"2017-08-11 16:07:14.271 [41436] main/101/myapp.lua I> recover from `./00000000000000000000.xlog'\n" +"2017-08-11 16:07:14.271 [41436] main/101/myapp.lua I> done `./00000000000000000000.xlog'\n" +"2017-08-11 16:07:14.272 [41436] main/102/hot_standby I> recover from `./00000000000000000000.xlog'\n" +"2017-08-11 16:07:14.274 [41436] iproto/102/iproto I> binary: started\n" +"2017-08-11 16:07:14.275 [41436] iproto/102/iproto I> binary: bound to [::]:3301\n" +"2017-08-11 16:07:14.275 [41436] main/101/myapp.lua I> done `./00000000000000000000.xlog'\n" +"2017-08-11 16:07:14.278 [41436] main/101/myapp.lua I> ready to accept requests" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:151 +msgid "This time, Tarantool executes our script and keeps working as a server, accepting TCP requests on port 3301. We can see Tarantool in the current session’s process list:" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:155 +msgid "$ ps | grep \"tarantool\"\n" +" PID TTY TIME CMD\n" +"41608 ttys001 0:00.47 tarantool myapp.lua " +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:161 +msgid "But the Tarantool instance will stop if we close the current terminal window. To detach Tarantool and our application from the terminal window, we can launch it in the **daemon mode**. To do so, we add some parameters to ``box.cfg{}``:" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:165 +msgid ":ref:`background ` = ``true`` that actually tells Tarantool to work as a daemon service," +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:167 +msgid ":ref:`log ` = ``'dir-name'`` that tells the Tarantool daemon where to store its log file (other log settings are available in Tarantool :ref:`log ` module), and" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:170 +msgid ":ref:`pid_file ` = ``'file-name'`` that tells the Tarantool daemon where to store its pid file." +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:173 +msgid "For example:" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:175 +msgid "box.cfg {\n" +" listen = 3301,\n" +" background = true,\n" +" log = '1.log',\n" +" pid_file = '1.pid'\n" +"}" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:184 +msgid "We launch our application in the same manner as before:" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:192 +msgid "Tarantool executes our script, gets detached from the current shell session (you won't see it with ``ps | grep \"tarantool\"``) and continues working in the background as a daemon attached to the global session (with SID = 0):" +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:196 +msgid "$ ps -ef | grep \"tarantool\"\n" +" PID SID TIME CMD\n" +"42178 0 0:00.72 tarantool myapp.lua " +msgstr "" + +#: ../../doc/how-to/app/launching_app.rst:202 +msgid "Now that we have discussed how to create and launch a Lua application for Tarantool, let's dive deeper into programming practices." +msgstr "" diff --git a/locale/en/how-to/app/lua_tutorials.pot b/locale/en/how-to/app/lua_tutorials.pot new file mode 100644 index 0000000000..6b61a10493 --- /dev/null +++ b/locale/en/how-to/app/lua_tutorials.pot @@ -0,0 +1,738 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/app/lua_tutorials.rst:5 +msgid "Lua tutorials" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:11 +msgid "First steps" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:13 +msgid "If you're new to Lua, we recommend going over the interactive Tarantool tutorial. To launch the tutorial, run the ``tutorial()`` command in the Tarantool console:" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:16 +msgid "tarantool> tutorial()\n" +"---\n" +"- |\n" +" Tutorial -- Screen #1 -- Hello, Moon\n" +" ====================================\n" +"\n" +" Welcome to the Tarantool tutorial.\n" +" It will introduce you to Tarantool’s Lua application server\n" +" and database server, which is what’s running what you’re seeing.\n" +" This is INTERACTIVE -- you’re expected to enter requests\n" +" based on the suggestions or examples in the screen’s text.\n" +" <...>" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:35 +msgid "Insert one million tuples with a Lua stored procedure" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:37 +msgid "This is an exercise assignment: “Insert one million tuples. Each tuple should have a constantly-increasing numeric primary-key field and a random alphabetic 10-character string field.”" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:41 +msgid "The purpose of the exercise is to show what Lua functions look like inside Tarantool. It will be necessary to employ the Lua math library, the Lua string library, the Tarantool box library, the Tarantool box.tuple library, loops, and concatenations. It should be easy to follow even for a person who has not used either Lua or Tarantool before. The only requirement is a knowledge of how other programming languages work and a memory of the first two chapters of this manual. But for better understanding, follow the comments and the links, which point to the Lua manual or to elsewhere in this Tarantool manual. To further enhance learning, type the statements in with the tarantool client while reading along." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:53 +msgid "Configure" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:55 +msgid "We are going to use the Tarantool sandbox that was created for our :ref:`\"Getting started\" exercises `. So there is a single space, and a numeric primary key, and a running Tarantool server instance which also serves as a client." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:62 +msgid "Delimiter" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:64 +msgid "In earlier versions of Tarantool, multi-line functions had to be enclosed within \"delimiters\". They are no longer necessary, and so they will not be used in this tutorial. However, they are still supported. Users who wish to use delimiters, or users of older versions of Tarantool, should check the syntax description for :ref:`declaring a delimiter ` before proceeding." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:73 +msgid "Create a function that returns a string" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:75 +msgid "We will start by making a function that returns a fixed string, “Hello world”." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:77 +msgid "function string_function()\n" +" return \"hello world\"\n" +"end" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:83 +msgid "The word \"``function``\" is a Lua keyword -- we're about to go into Lua. The function name is string_function. The function has one executable statement, ``return \"hello world\"``. The string \"hello world\" is enclosed in double quotes here, although Lua doesn't care -- one could use single quotes instead. The word \"``end``\" means “this is the end of the Lua function declaration.” To confirm that the function works, we can say" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:90 +msgid "string_function()" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:94 +msgid "Sending ``function-name()`` means “invoke the Lua function.” The effect is that the string which the function returns will end up on the screen." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:97 +msgid "For more about Lua strings see Lua manual `chapter 2.4 \"Strings\"`_ . For more about functions see Lua manual `chapter 5 \"Functions\"`_." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:103 +#: ../../doc/how-to/app/lua_tutorials.rst:147 +#: ../../doc/how-to/app/lua_tutorials.rst:198 +#: ../../doc/how-to/app/lua_tutorials.rst:254 +#: ../../doc/how-to/app/lua_tutorials.rst:300 +#: ../../doc/how-to/app/lua_tutorials.rst:360 +#: ../../doc/how-to/app/lua_tutorials.rst:453 +msgid "The screen now looks like this:" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:105 +msgid "tarantool> function string_function()\n" +" > return \"hello world\"\n" +" > end\n" +"---\n" +"...\n" +"tarantool> string_function()\n" +"---\n" +"- hello world\n" +"...\n" +"tarantool>" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:120 +msgid "Create a function that calls another function and sets a variable" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:122 +msgid "Now that ``string_function`` exists, we can invoke it from another function." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:125 +msgid "function main_function()\n" +" local string_value\n" +" string_value = string_function()\n" +" return string_value\n" +"end" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:133 +msgid "We begin by declaring a variable \"``string_value``\". The word \"``local``\" means that string_value appears only in ``main_function``. If we didn't use \"``local``\" then ``string_value`` would be visible everywhere - even by other users using other clients connected to this server instance! Sometimes that's a very desirable feature for inter-client communication, but not this time." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:139 +msgid "Then we assign a value to ``string_value``, namely, the result of ``string_function()``. Soon we will invoke ``main_function()`` to check that it got the value." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:143 +msgid "For more about Lua variables see Lua manual `chapter 4.2 \"Local Variables and Blocks\"`_ ." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:149 +msgid "tarantool> function main_function()\n" +" > local string_value\n" +" > string_value = string_function()\n" +" > return string_value\n" +" > end\n" +"---\n" +"...\n" +"tarantool> main_function()\n" +"---\n" +"- hello world\n" +"...\n" +"tarantool>" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:166 +msgid "Modify the function so it returns a one-letter random string" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:168 +msgid "Now that it's a bit clearer how to make a variable, we can change ``string_function()`` so that, instead of returning a fixed literal \"Hello world\", it returns a random letter between 'A' and 'Z'." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:172 +msgid "function string_function()\n" +" local random_number\n" +" local random_string\n" +" random_number = math.random(65, 90)\n" +" random_string = string.char(random_number)\n" +" return random_string\n" +"end" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:182 +msgid "It is not necessary to destroy the old ``string_function()`` contents, they're simply overwritten. The first assignment invokes a random-number function in Lua's math library; the parameters mean “the number must be an integer between 65 and 90.” The second assignment invokes an integer-to-character function in Lua's string library; the parameter is the code point of the character. Luckily the ASCII value of 'A' is 65 and the ASCII value of 'Z' is 90 so the result will always be a letter between A and Z." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:190 +msgid "For more about Lua math-library functions see Lua users \"`Math Library Tutorial `_\". For more about Lua string-library functions see Lua users \"`String Library Tutorial `_\" ." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:195 +msgid "Once again the ``string_function()`` can be invoked from main_function() which can be invoked with ``main_function()``." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:200 +msgid "tarantool> function string_function()\n" +" > local random_number\n" +" > local random_string\n" +" > random_number = math.random(65, 90)\n" +" > random_string = string.char(random_number)\n" +" > return random_string\n" +" > end\n" +"---\n" +"...\n" +"tarantool> main_function()\n" +"---\n" +"- C\n" +"...\n" +"tarantool>" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:217 +msgid "... Well, actually it won't always look like this because ``math.random()`` produces random numbers. But for the illustration purposes it won't matter what the random string values are." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:223 +msgid "Modify the function so it returns a ten-letter random string" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:225 +msgid "Now that it's clear how to produce one-letter random strings, we can reach our goal of producing a ten-letter string by concatenating ten one-letter strings, in a loop." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:229 +msgid "function string_function()\n" +" local random_number\n" +" local random_string\n" +" random_string = \"\"\n" +" for x = 1,10,1 do\n" +" random_number = math.random(65, 90)\n" +" random_string = random_string .. string.char(random_number)\n" +" end\n" +" return random_string\n" +"end" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:242 +msgid "The words \"for x = 1,10,1\" mean “start with x equals 1, loop until x equals 10, increment x by 1 for each iteration.” The symbol \"..\" means \"concatenate\", that is, add the string on the right of the \"..\" sign to the string on the left of the \"..\" sign. Since we start by saying that random_string is \"\" (a blank string), the end result is that random_string has 10 random letters. Once again the ``string_function()`` can be invoked from ``main_function()`` which can be invoked with ``main_function()``." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:250 +msgid "For more about Lua loops see Lua manual `chapter 4.3.4 \"Numeric for\"`_." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:256 +msgid "tarantool> function string_function()\n" +" > local random_number\n" +" > local random_string\n" +" > random_string = \"\"\n" +" > for x = 1,10,1 do\n" +" > random_number = math.random(65, 90)\n" +" > random_string = random_string .. string.char(random_number)\n" +" > end\n" +" > return random_string\n" +" > end\n" +"---\n" +"...\n" +"tarantool> main_function()\n" +"---\n" +"- 'ZUDJBHKEFM'\n" +"...\n" +"tarantool>" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:278 +msgid "Make a tuple out of a number and a string" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:280 +msgid "Now that it's clear how to make a 10-letter random string, it's possible to make a tuple that contains a number and a 10-letter random string, by invoking a function in Tarantool's library of Lua functions." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:284 +msgid "function main_function()\n" +" local string_value, t\n" +" string_value = string_function()\n" +" t = box.tuple.new({1, string_value})\n" +" return t\n" +"end" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:293 +msgid "Once this is done, t will be the value of a new tuple which has two fields. The first field is numeric: 1. The second field is a random string. Once again the ``string_function()`` can be invoked from ``main_function()`` which can be invoked with ``main_function()``." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:298 +msgid "For more about Tarantool tuples see Tarantool manual section :ref:`Submodule box.tuple `." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:302 +msgid "tarantool> function main_function()\n" +" > local string_value, t\n" +" > string_value = string_function()\n" +" > t = box.tuple.new({1, string_value})\n" +" > return t\n" +" > end\n" +"---\n" +"...\n" +"tarantool> main_function()\n" +"---\n" +"- [1, 'PNPZPCOOKA']\n" +"...\n" +"tarantool>" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:320 +msgid "Modify main_function to insert a tuple into the database" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:322 +msgid "Now that it's clear how to make a tuple that contains a number and a 10-letter random string, the only trick remaining is putting that tuple into tester. Remember that tester is the first space that was defined in the sandbox, so it's like a database table." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:327 +msgid "function main_function()\n" +" local string_value, t\n" +" string_value = string_function()\n" +" t = box.tuple.new({1,string_value})\n" +" box.space.tester:replace(t)\n" +"end" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:336 +msgid "The new line here is ``box.space.tester:replace(t)``. The name contains 'tester' because the insertion is going to be to tester. The second parameter is the tuple value. To be perfectly correct we could have said ``box.space.tester:insert(t)`` here, rather than ``box.space.tester:replace(t)``, but \"replace\" means “insert even if there is already a tuple whose primary-key value is a duplicate”, and that makes it easier to re-run the exercise even if the sandbox database isn't empty. Once this is done, tester will contain a tuple with two fields. The first field will be 1. The second field will be a random 10-letter string. Once again the ``string_function(``) can be invoked from ``main_function()`` which can be invoked with ``main_function()``. But ``main_function()`` won't tell the whole story, because it does not return t, it only puts t into the database. To confirm that something got inserted, we'll use a SELECT request." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:350 +msgid "main_function()\n" +"box.space.tester:select{1}" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:355 +msgid "For more about Tarantool insert and replace calls, see Tarantool manual section :ref:`Submodule box.space `, :ref:`space_object:insert() `, and :ref:`space_object:replace() `." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:362 +msgid "tarantool> function main_function()\n" +" > local string_value, t\n" +" > string_value = string_function()\n" +" > t = box.tuple.new({1,string_value})\n" +" > box.space.tester:replace(t)\n" +" > end\n" +"---\n" +"...\n" +"tarantool> main_function()\n" +"---\n" +"...\n" +"tarantool> box.space.tester:select{1}\n" +"---\n" +"- - [1, 'EUJYVEECIL']\n" +"...\n" +"tarantool>" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:383 +msgid "Modify main_function to insert a million tuples into the database" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:385 +msgid "Now that it's clear how to insert one tuple into the database, it's no big deal to figure out how to scale up: instead of inserting with a literal value = 1 for the primary key, insert with a variable value = between 1 and 1 million, in a loop. Since we already saw how to loop, that's a simple thing. The only extra wrinkle that we add here is a timing function." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:391 +msgid "function main_function()\n" +" local string_value, t\n" +" for i = 1,1000000,1 do\n" +" string_value = string_function()\n" +" t = box.tuple.new({i,string_value})\n" +" box.space.tester:replace(t)\n" +" end\n" +"end\n" +"start_time = os.clock()\n" +"main_function()\n" +"end_time = os.clock()\n" +"'insert done in ' .. end_time - start_time .. ' seconds'" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:406 +msgid "The standard Lua function `os.clock() `_ will return the number of CPU seconds since the start. Therefore, by getting start_time = number of seconds just before the inserting, and then getting end_time = number of seconds just after the inserting, we can calculate (end_time - start_time) = elapsed time in seconds. We will display that value by putting it in a request without any assignments, which causes Tarantool to send the value to the client, which prints it. (Lua's answer to the C ``printf()`` function, which is ``print()``, will also work.)" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:416 +msgid "For more on Lua ``os.clock()`` see Lua manual `chapter 22.1 \"Date and Time\"`_. For more on Lua print() see Lua manual `chapter 5 \"Functions\"`_." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:422 +msgid "Since this is the grand finale, we will redo the final versions of all the necessary requests: the request that created ``string_function()``, the request that created ``main_function()``, and the request that invokes ``main_function()``." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:427 +msgid "function string_function()\n" +" local random_number\n" +" local random_string\n" +" random_string = \"\"\n" +" for x = 1,10,1 do\n" +" random_number = math.random(65, 90)\n" +" random_string = random_string .. string.char(random_number)\n" +" end\n" +" return random_string\n" +"end\n" +"\n" +"function main_function()\n" +" local string_value, t\n" +" for i = 1,1000000,1 do\n" +" string_value = string_function()\n" +" t = box.tuple.new({i,string_value})\n" +" box.space.tester:replace(t)\n" +" end\n" +"end\n" +"start_time = os.clock()\n" +"main_function()\n" +"end_time = os.clock()\n" +"'insert done in ' .. end_time - start_time .. ' seconds'" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:455 +msgid "tarantool> function string_function()\n" +" > local random_number\n" +" > local random_string\n" +" > random_string = \"\"\n" +" > for x = 1,10,1 do\n" +" > random_number = math.random(65, 90)\n" +" > random_string = random_string .. string.char(random_number)\n" +" > end\n" +" > return random_string\n" +" > end\n" +"---\n" +"...\n" +"tarantool> function main_function()\n" +" > local string_value, t\n" +" > for i = 1,1000000,1 do\n" +" > string_value = string_function()\n" +" > t = box.tuple.new({i,string_value})\n" +" > box.space.tester:replace(t)\n" +" > end\n" +" > end\n" +"---\n" +"...\n" +"tarantool> start_time = os.clock()\n" +"---\n" +"...\n" +"tarantool> main_function()\n" +"---\n" +"...\n" +"tarantool> end_time = os.clock()\n" +"---\n" +"...\n" +"tarantool> 'insert done in ' .. end_time - start_time .. ' seconds'\n" +"---\n" +"- insert done in 37.62 seconds\n" +"...\n" +"tarantool>" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:494 +msgid "What has been shown is that Lua functions are quite expressive (in fact one can do more with Tarantool's Lua stored procedures than one can do with stored procedures in some SQL DBMSs), and that it's straightforward to combine Lua-library functions and Tarantool-library functions." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:499 +msgid "What has also been shown is that inserting a million tuples took 37 seconds. The host computer was a Linux laptop. By changing :ref:`wal_mode ` to 'none' before running the test, one can reduce the elapsed time to 4 seconds." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:507 +msgid "Sum a JSON field for all tuples" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:509 +msgid "This is an exercise assignment: “Assume that inside every tuple there is a string formatted as JSON. Inside that string there is a JSON numeric field. For each tuple, find the numeric field's value and add it to a 'sum' variable. At end, return the 'sum' variable.” The purpose of the exercise is to get experience in one way to read and process tuples." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:515 +msgid "json = require('json')\n" +"function sum_json_field(field_name)\n" +" local v, t, sum, field_value, is_valid_json, lua_table\n" +" sum = 0\n" +" for v, t in box.space.tester:pairs() do\n" +" is_valid_json, lua_table = pcall(json.decode, t[2])\n" +" if is_valid_json then\n" +" field_value = lua_table[field_name]\n" +" if type(field_value) == \"number\" then sum = sum + field_value end\n" +" end\n" +" end\n" +" return sum\n" +"end" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:532 +msgid "**LINE 3: WHY \"LOCAL\".** This line declares all the variables that will be used in the function. Actually it's not necessary to declare all variables at the start, and in a long function it would be better to declare variables just before using them. In fact it's not even necessary to declare variables at all, but an undeclared variable is \"global\". That's not desirable for any of the variables that are declared in line 1, because all of them are for use only within the function." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:539 +msgid "**LINE 5: WHY \"PAIRS()\".** Our job is to go through all the rows and there are two ways to do it: with :ref:`box.space.space_object:pairs() ` or with ``variable = select(...)`` followed by :samp:`for i, {n}, 1 do {some-function}(variable[i]) end`. We preferred ``pairs()`` for this example." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:544 +msgid "**LINE 5: START THE MAIN LOOP.** Everything inside this \"``for``\" loop will be repeated as long as there is another index key. A tuple is fetched and can be referenced with variable :code:`t`." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:548 +msgid "**LINE 6: WHY \"PCALL\".** If we simply said ``lua_table = json.decode(t[2]))``, then the function would abort with an error if it encountered something wrong with the JSON string - a missing colon, for example. By putting the function inside \"``pcall``\" (`protected call `_), we're saying: we want to intercept that sort of error, so if there's a problem just set ``is_valid_json = false`` and we will know what to do about it later." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:555 +msgid "**LINE 6: MEANING.** The function is :ref:`json.decode ` which means decode a JSON string, and the parameter is t[2] which is a reference to a JSON string. There's a bit of hard coding here, we're assuming that the second field in the tuple is where the JSON string was inserted. For example, we're assuming a tuple looks like" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:608 +msgid "field[1]: 444\n" +"field[2]: '{\"Hello\": \"world\", \"Quantity\": 15}'" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:566 +msgid "meaning that the tuple's first field, the primary key field, is a number while the tuple's second field, the JSON string, is a string. Thus the entire statement means \"decode ``t[2]`` (the tuple's second field) as a JSON string; if there's an error set ``is_valid_json = false``; if there's no error set ``is_valid_json = true`` and set ``lua_table =`` a Lua table which has the decoded string\"." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:572 +msgid "**LINE 8.** At last we are ready to get the JSON field value from the Lua table that came from the JSON string. The value in field_name, which is the parameter for the whole function, must be a name of a JSON field. For example, inside the JSON string ``'{\"Hello\": \"world\", \"Quantity\": 15}'``, there are two JSON fields: \"Hello\" and \"Quantity\". If the whole function is invoked with ``sum_json_field(\"Quantity\")``, then ``field_value = lua_table[field_name]`` is effectively the same as ``field_value = lua_table[\"Quantity\"]`` or even ``field_value = lua_table.Quantity``. Those are just three different ways of saying: for the Quantity field in the Lua table, get the value and put it in variable :code:`field_value`." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:582 +msgid "**LINE 9: WHY \"IF\".** Suppose that the JSON string is well formed but the JSON field is not a number, or is missing. In that case, the function would be aborted when there was an attempt to add it to the sum. By first checking ``type(field_value) == \"number\"``, we avoid that abortion. Anyone who knows that the database is in perfect shape can skip this kind of thing." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:588 +msgid "And the function is complete. Time to test it. Starting with an empty database, defined the same way as the sandbox database in our :ref:`\"Getting started\" exercises `," +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:592 +msgid "-- if tester is left over from some previous test, destroy it\n" +"box.space.tester:drop()\n" +"box.schema.space.create('tester')\n" +"box.space.tester:create_index('primary', {parts = {1, 'unsigned'}})" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:599 +msgid "then add some tuples where the first field is a number and the second field is a string." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:602 +msgid "box.space.tester:insert{444, '{\"Item\": \"widget\", \"Quantity\": 15}'}\n" +"box.space.tester:insert{445, '{\"Item\": \"widget\", \"Quantity\": 7}'}\n" +"box.space.tester:insert{446, '{\"Item\": \"golf club\", \"Quantity\": \"sunshine\"}'}\n" +"box.space.tester:insert{447, '{\"Item\": \"waffle iron\", \"Quantit\": 3}'}" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:609 +msgid "Since this is a test, there are deliberate errors. The \"golf club\" and the \"waffle iron\" do not have numeric Quantity fields, so must be ignored. Therefore the real sum of the Quantity field in the JSON strings should be: 15 + 7 = 22." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:614 +msgid "Invoke the function with ``sum_json_field(\"Quantity\")``." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:616 +msgid "tarantool> sum_json_field(\"Quantity\")\n" +"---\n" +"- 22\n" +"..." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:623 +msgid "It works. We'll just leave, as exercises for future improvement, the possibility that the \"hard coding\" assumptions could be removed, that there might have to be an overflow check if some field values are huge, and that the function should contain a :ref:`yield ` instruction if the count of tuples is huge." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:632 +msgid "Indexed pattern search" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:634 +msgid "Here is a generic function which takes a field identifier and a search pattern, and returns all tuples that match. |br| * The field must be the first field of a TREE index. |br| * The function will use `Lua pattern matching `_, which allows \"magic characters\" in regular expressions. |br| * The initial characters in the pattern, as far as the first magic character, will be used as an index search key. For each tuple that is found via the index, there will be a match of the whole pattern. |br| * To be :ref:`cooperative `, the function should yield after every 10 tuples, unless there is a reason to delay yielding. |br| With this function, we can take advantage of Tarantool's indexes for speed, and take advantage of Lua's pattern matching for flexibility. It does everything that an SQL :ref:`LIKE ` search can do, and far more." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:652 +msgid "Read the following Lua code to see how it works. The comments that begin with \"SEE NOTE ...\" refer to long explanations that follow the code." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:656 +msgid "function indexed_pattern_search(space_name, field_no, pattern)\n" +" -- SEE NOTE #1 \"FIND AN APPROPRIATE INDEX\"\n" +" if (box.space[space_name] == nil) then\n" +" print(\"Error: Failed to find the specified space\")\n" +" return nil\n" +" end\n" +" local index_no = -1\n" +" for i=0,box.schema.INDEX_MAX,1 do\n" +" if (box.space[space_name].index[i] == nil) then break end\n" +" if (box.space[space_name].index[i].type == \"TREE\"\n" +" and box.space[space_name].index[i].parts[1].fieldno == field_no\n" +" and (box.space[space_name].index[i].parts[1].type == \"scalar\"\n" +" or box.space[space_name].index[i].parts[1].type == \"string\")) then\n" +" index_no = i\n" +" break\n" +" end\n" +" end\n" +" if (index_no == -1) then\n" +" print(\"Error: Failed to find an appropriate index\")\n" +" return nil\n" +" end\n" +" -- SEE NOTE #2 \"DERIVE INDEX SEARCH KEY FROM PATTERN\"\n" +" local index_search_key = \"\"\n" +" local index_search_key_length = 0\n" +" local last_character = \"\"\n" +" local c = \"\"\n" +" local c2 = \"\"\n" +" for i=1,string.len(pattern),1 do\n" +" c = string.sub(pattern, i, i)\n" +" if (last_character ~= \"%\") then\n" +" if (c == '^' or c == \"$\" or c == \"(\" or c == \")\" or c == \".\"\n" +" or c == \"[\" or c == \"]\" or c == \"*\" or c == \"+\"\n" +" or c == \"-\" or c == \"?\") then\n" +" break\n" +" end\n" +" if (c == \"%\") then\n" +" c2 = string.sub(pattern, i + 1, i + 1)\n" +" if (string.match(c2, \"%p\") == nil) then break end\n" +" index_search_key = index_search_key .. c2\n" +" else\n" +" index_search_key = index_search_key .. c\n" +" end\n" +" end\n" +" last_character = c\n" +" end\n" +" index_search_key_length = string.len(index_search_key)\n" +" if (index_search_key_length < 3) then\n" +" print(\"Error: index search key \" .. index_search_key .. \" is too short\")\n" +" return nil\n" +" end\n" +" -- SEE NOTE #3 \"OUTER LOOP: INITIATE\"\n" +" local result_set = {}\n" +" local number_of_tuples_in_result_set = 0\n" +" local previous_tuple_field = \"\"\n" +" while true do\n" +" local number_of_tuples_since_last_yield = 0\n" +" local is_time_for_a_yield = false\n" +" -- SEE NOTE #4 \"INNER LOOP: ITERATOR\"\n" +" for _,tuple in box.space[space_name].index[index_no]:\n" +" pairs(index_search_key,{iterator = box.index.GE}) do\n" +" -- SEE NOTE #5 \"INNER LOOP: BREAK IF INDEX KEY IS TOO GREAT\"\n" +" if (string.sub(tuple[field_no], 1, index_search_key_length)\n" +" > index_search_key) then\n" +" break\n" +" end\n" +" -- SEE NOTE #6 \"INNER LOOP: BREAK AFTER EVERY 10 TUPLES -- MAYBE\"\n" +" number_of_tuples_since_last_yield = number_of_tuples_since_last_yield + 1\n" +" if (number_of_tuples_since_last_yield >= 10\n" +" and tuple[field_no] ~= previous_tuple_field) then\n" +" index_search_key = tuple[field_no]\n" +" is_time_for_a_yield = true\n" +" break\n" +" end\n" +" previous_tuple_field = tuple[field_no]\n" +" -- SEE NOTE #7 \"INNER LOOP: ADD TO RESULT SET IF PATTERN MATCHES\"\n" +" if (string.match(tuple[field_no], pattern) ~= nil) then\n" +" number_of_tuples_in_result_set = number_of_tuples_in_result_set + 1\n" +" result_set[number_of_tuples_in_result_set] = tuple\n" +" end\n" +" end\n" +" -- SEE NOTE #8 \"OUTER LOOP: BREAK, OR YIELD AND CONTINUE\"\n" +" if (is_time_for_a_yield ~= true) then\n" +" break\n" +" end\n" +" require('fiber').yield()\n" +" end\n" +" return result_set\n" +"end" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:747 +msgid "NOTE #1 \"FIND AN APPROPRIATE INDEX\" |br| The caller has passed space_name (a string) and field_no (a number). The requirements are: |br| (a) index type must be \"TREE\" because for other index types (HASH, BITSET, RTREE) a search with :ref:`iterator=GE ` will not return strings in order by string value; |br| (b) field_no must be the first index part; |br| (c) the field must contain strings, because for other data types (such as \"unsigned\") pattern searches are not possible; |br| If these requirements are not met by any index, then print an error message and return nil." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:759 +msgid "NOTE #2 \"DERIVE INDEX SEARCH KEY FROM PATTERN\" |br| The caller has passed pattern (a string). The index search key will be the characters in the pattern as far as the first magic character. Lua's magic characters are % ^ $ ( ) . [ ] * + - ?. For example, if the pattern is \"ABC.E\", the period is a magic character and therefore the index search key will be \"ABC\". But there is a complication ... If we see \"%\" followed by a punctuation character, that punctuation character is \"escaped\" so remove the \"%\" when making the index search key. For example, if the pattern is \"AB%$E\", the dollar sign is escaped and therefore the index search key will be \"AB$E\". Finally there is a check that the index search key length must be at least three -- this is an arbitrary number, and in fact zero would be okay, but short index search keys will cause long search times." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:776 +msgid "NOTE #3 -- \"OUTER LOOP: INITIATE\" |br| The function's job is to return a result set, just as `box.space...select ` would. We will fill it within an outer loop that contains an inner loop. The outer loop's job is to execute the inner loop, and possibly :ref:`yield `, until the search ends. The inner loop's job is to find tuples via the index, and put them in the result set if they match the pattern." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:785 +msgid "NOTE #4 \"INNER LOOP: ITERATOR\" |br| The for loop here is using pairs(), see the :doc:`explanation of what index iterators are `. Within the inner loop, there will be a local variable named \"tuple\" which contains the latest tuple found via the index search key." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:792 +msgid "NOTE #5 \"INNER LOOP: BREAK IF INDEX KEY IS TOO GREAT\" |br| The iterator is GE (Greater or Equal), and we must be more specific: if the search index key has N characters, then the leftmost N characters of the result's index field must not be greater than the search index key. For example, if the search index key is 'ABC', then 'ABCDE' is a potential match, but 'ABD' is a signal that no more matches are possible." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:801 +msgid "NOTE #6 \"INNER LOOP: BREAK AFTER EVERY 10 TUPLES -- MAYBE\" |br| This chunk of code is for cooperative multitasking. The number 10 is arbitrary, and usually a larger number would be okay. The simple rule would be \"after checking 10 tuples, yield, and then resume the search (that is, do the inner loop again) starting after the last value that was found\". However, if the index is non-unique or if there is more than one field in the index, then we might have duplicates -- for example {\"ABC\",1}, {\"ABC\", 2}, {\"ABC\", 3}\" -- and it would be difficult to decide which \"ABC\" tuple to resume with. Therefore, if the result's index field is the same as the previous result's index field, there is no break." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:814 +msgid "NOTE #7 \"INNER LOOP: ADD TO RESULT SET IF PATTERN MATCHES\" |br| Compare the result's index field to the entire pattern. For example, suppose that the caller passed pattern \"ABC.E\" and there is an indexed field containing \"ABCDE\". Therefore the initial index search key is \"ABC\". Therefore a tuple containing an indexed field with \"ABCDE\" will be found by the iterator, because \"ABCDE\" > \"ABC\". In that case string.match will return a value which is not nil. Therefore this tuple can be added to the result set." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:824 +msgid "NOTE #8 \"OUTER LOOP: BREAK, OR YIELD AND CONTINUE\" |br| There are three conditions which will cause a break from the inner loop: (1) the for loop ends naturally because there are no more index keys which are greater than or equal to the index search key, (2) the index key is too great as described in NOTE #5, (3) it is time for a yield as described in NOTE #6. If condition (1) or condition (2) is true, then there is nothing more to do, the outer loop ends too. If and only if condition (3) is true, the outer loop must yield and then continue. If it does continue, then the inner loop -- the iterator search -- will happen again with a new value for the index search key." +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:837 +msgid "EXAMPLE:" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:839 +msgid "Start Tarantool, cut and paste the code for function ``indexed_pattern_search()``, and try the following:" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:890 +msgid "box.space.t:drop()\n" +"box.schema.space.create('t')\n" +"box.space.t:create_index('primary',{})\n" +"box.space.t:create_index('secondary',{unique=false,parts={2,'string',3,'string'}})\n" +"box.space.t:insert{1,'A','a'}\n" +"box.space.t:insert{2,'AB',''}\n" +"box.space.t:insert{3,'ABC','a'}\n" +"box.space.t:insert{4,'ABCD',''}\n" +"box.space.t:insert{5,'ABCDE','a'}\n" +"box.space.t:insert{6,'ABCDE',''}\n" +"box.space.t:insert{7,'ABCDEF','a'}\n" +"box.space.t:insert{8,'ABCDF',''}\n" +"indexed_pattern_search(\"t\", 2, \"ABC.E.\")" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:859 +msgid "The result will be:" +msgstr "" + +#: ../../doc/how-to/app/lua_tutorials.rst:861 +msgid "tarantool> indexed_pattern_search(\"t\", 2, \"ABC.E.\")\n" +"---\n" +"- - [7, 'ABCDEF', 'a']\n" +"..." +msgstr "" diff --git a/locale/en/how-to/app/using_ide.pot b/locale/en/how-to/app/using_ide.pot new file mode 100644 index 0000000000..02880baf25 --- /dev/null +++ b/locale/en/how-to/app/using_ide.pot @@ -0,0 +1,113 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/app/using_ide.rst:5 +msgid "Developing with an IDE" +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:7 +msgid "You can use IntelliJ IDEA as an IDE to develop and debug Lua applications for Tarantool." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:10 +msgid "Download and install the IDE from the `official web-site `_." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:13 +msgid "JetBrains provides specialized editions for particular languages: IntelliJ IDEA (Java), PHPStorm (PHP), PyCharm (Python), RubyMine (Ruby), CLion (C/C++), WebStorm (Web) and others. So, download a version that suits your primary programming language." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:18 +msgid "Tarantool integration is supported for all editions." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:20 +msgid "Configure the IDE:" +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:22 +msgid "Start IntelliJ IDEA." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:23 +msgid "Click ``Configure`` button and select ``Plugins``." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:30 +msgid "Click ``Browse repositories``." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:37 +msgid "Install ``EmmyLua`` plugin." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:41 +msgid "Please don’t be confused with ``Lua`` plugin, which is less powerful than ``EmmyLua``." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:49 +msgid "Restart IntelliJ IDEA." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:50 +msgid "Click ``Configure``, select ``Project Defaults`` and then ``Run Configurations``." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:58 +msgid "Find ``Lua Application`` in the sidebar at the left." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:60 +msgid "In ``Program``, type a path to an installed ``tarantool`` binary." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:62 +msgid "By default, this is ``tarantool`` or ``/usr/bin/tarantool`` on most platforms." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:65 +msgid "If you installed ``tarantool`` from sources to a custom directory, please specify the proper path here." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:73 +msgid "Now IntelliJ IDEA is ready to use with Tarantool." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:75 +msgid "Create a new Lua project." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:82 +msgid "Add a new Lua file, for example ``init.lua``." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:89 +msgid "Write your code, save the file." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:91 +msgid "To run you application, click ``Run -> Run`` in the main menu and select your source file in the list." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:99 +msgid "Or click ``Run -> Debug`` to start debugging." +msgstr "" + +#: ../../doc/how-to/app/using_ide.rst:103 +msgid "To use Lua debugger, please upgrade Tarantool to version 1.7.5-29-gbb6170e4b or later." +msgstr "" diff --git a/locale/en/how-to/db/crud.pot b/locale/en/how-to/db/crud.pot new file mode 100644 index 0000000000..9146ce8224 --- /dev/null +++ b/locale/en/how-to/db/crud.pot @@ -0,0 +1,586 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/db/crud.rst:4 +msgid "CRUD operation examples" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:11 +msgid "Using data operations" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:13 +msgid "This section shows basic usage scenarios and typical errors for each :ref:`data operation ` in Tarantool: :ref:`INSERT `, :ref:`DELETE `, :ref:`UPDATE `, :ref:`UPSERT `, :ref:`REPLACE `, and :ref:`SELECT `. Before trying out the examples, you need to bootstrap a Tarantool instance as shown below." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:23 +msgid "-- Create a space --\n" +"bands = box.schema.space.create('bands')\n" +"\n" +"-- Specify field names and types --\n" +"box.space.bands:format({\n" +" { name = 'id', type = 'unsigned' },\n" +" { name = 'band_name', type = 'string' },\n" +" { name = 'year', type = 'unsigned' }\n" +"})\n" +"\n" +"-- Create a primary index --\n" +"box.space.bands:create_index('primary', { parts = { 'id' } })\n" +"\n" +"-- Create a unique secondary index --\n" +"box.space.bands:create_index('band', { parts = { 'band_name' } })\n" +"\n" +"-- Create a non-unique secondary index --\n" +"box.space.bands:create_index('year', { parts = { { 'year' } }, unique = false })\n" +"\n" +"-- Create a multi-part index --\n" +"box.space.bands:create_index('year_band', { parts = { { 'year' }, { 'band_name' } } })\n" +"" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:33 +msgid "INSERT" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:35 +msgid "The :ref:`space_object.insert ` method accepts a well-formatted tuple." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:37 +msgid "-- Insert a tuple with a unique primary key --\n" +"tarantool> bands:insert{1, 'Scorpions', 1965}\n" +"---\n" +"- [1, 'Scorpions', 1965]\n" +"..." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:46 +msgid "``insert`` also checks all the keys for duplicates." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:48 +msgid "-- Try to insert a tuple with a duplicate primary key --\n" +"tarantool> bands:insert{1, 'Scorpions', 1965}\n" +"---\n" +"- error: Duplicate key exists in unique index \"primary\" in space \"bands\" with old\n" +" tuple - [1, \"Scorpions\", 1965] and new tuple - [1, \"Scorpions\", 1965]\n" +"...\n" +"\n" +"-- Try to insert a tuple with a duplicate secondary key --\n" +"tarantool> bands:insert{2, 'Scorpions', 1965}\n" +"---\n" +"- error: Duplicate key exists in unique index \"band\" in space \"bands\" with old tuple\n" +" - [1, \"Scorpions\", 1965] and new tuple - [2, \"Scorpions\", 1965]\n" +"...\n" +"\n" +"-- Insert a second tuple with unique primary and secondary keys --\n" +"tarantool> bands:insert{2, 'Pink Floyd', 1965}\n" +"---\n" +"- [2, 'Pink Floyd', 1965]\n" +"...\n" +"\n" +"-- Delete all tuples --\n" +"tarantool> bands:truncate()\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:79 +msgid "DELETE" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:81 +msgid ":ref:`space_object.delete ` allows you to delete a tuple identified by the primary key." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:83 +msgid "-- Insert test data --\n" +"tarantool> bands:insert{1, 'Roxette', 1986}\n" +" bands:insert{2, 'Scorpions', 1965}\n" +" bands:insert{3, 'Ace of Base', 1987}\n" +" bands:insert{4, 'The Beatles', 1960}\n" +"\n" +"-- Delete a tuple with an existing key --\n" +"tarantool> bands:delete{4}\n" +"---\n" +"- [4, 'The Beatles', 1960]\n" +"...\n" +"tarantool> bands:select()\n" +"---\n" +"- - [1, 'Roxette', 1986]\n" +" - [2, 'Scorpions', 1965]\n" +" - [3, 'Ace of Base', 1987]\n" +"..." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:103 +msgid "You can also use :ref:`index_object.delete ` to delete a tuple by the specified unique index." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:105 +msgid "-- Delete a tuple by the primary index --\n" +"tarantool> bands.index.primary:delete{3}\n" +"---\n" +"- [3, 'Ace of Base', 1987]\n" +"...\n" +"tarantool> bands:select()\n" +"---\n" +"- - [1, 'Roxette', 1986]\n" +" - [2, 'Scorpions', 1965]\n" +"...\n" +"\n" +"-- Delete a tuple by a unique secondary index --\n" +"tarantool> bands.index.band:delete{'Scorpions'}\n" +"---\n" +"- [2, 'Scorpions', 1965]\n" +"...\n" +"tarantool> bands:select()\n" +"---\n" +"- - [1, 'Roxette', 1986]\n" +"...\n" +"\n" +"-- Try to delete a tuple by a non-unique secondary index --\n" +"tarantool> bands.index.year:delete(1986)\n" +"---\n" +"- error: Get() doesn't support partial keys and non-unique indexes\n" +"...\n" +"tarantool> bands:select()\n" +"---\n" +"- - [1, 'Roxette', 1986]\n" +"...\n" +"\n" +"-- Try to delete a tuple by a partial key --\n" +"tarantool> bands.index.year_band:delete('Roxette')\n" +"---\n" +"- error: Invalid key part count in an exact match (expected 2, got 1)\n" +"...\n" +"\n" +"-- Delete a tuple by a full key --\n" +"tarantool> bands.index.year_band:delete{1986, 'Roxette'}\n" +"---\n" +"- [1, 'Roxette', 1986]\n" +"...\n" +"tarantool> bands:select()\n" +"---\n" +"- []\n" +"...\n" +"\n" +"-- Delete all tuples --\n" +"tarantool> bands:truncate()\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:164 +msgid "UPDATE" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:166 +msgid ":ref:`space_object.update ` allows you to update a tuple identified by the primary key. Similarly to ``delete``, the ``update`` method accepts a full key and also an operation to execute." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:169 +msgid "-- Insert test data --\n" +"tarantool> bands:insert{1, 'Roxette', 1986}\n" +" bands:insert{2, 'Scorpions', 1965}\n" +" bands:insert{3, 'Ace of Base', 1987}\n" +" bands:insert{4, 'The Beatles', 1960}\n" +"\n" +"-- Update a tuple with an existing key --\n" +"tarantool> bands:update({2}, {{'=', 2, 'Pink Floyd'}})\n" +"---\n" +"- [2, 'Pink Floyd', 1965]\n" +"...\n" +"\n" +"tarantool> bands:select()\n" +"---\n" +"- - [1, 'Roxette', 1986]\n" +" - [2, 'Pink Floyd', 1965]\n" +" - [3, 'Ace of Base', 1987]\n" +" - [4, 'The Beatles', 1960]\n" +"..." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:192 +msgid ":ref:`index_object.update ` updates a tuple identified by the specified unique index." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:194 +msgid "-- Update a tuple by the primary index --\n" +"tarantool> bands.index.primary:update({2}, {{'=', 2, 'The Rolling Stones'}})\n" +"---\n" +"- [2, 'The Rolling Stones', 1965]\n" +"...\n" +"\n" +"tarantool> bands:select()\n" +"---\n" +"- - [1, 'Roxette', 1986]\n" +" - [2, 'The Rolling Stones', 1965]\n" +" - [3, 'Ace of Base', 1987]\n" +" - [4, 'The Beatles', 1960]\n" +"...\n" +"\n" +"-- Update a tuple by a unique secondary index --\n" +"tarantool> bands.index.band:update({'The Rolling Stones'}, {{'=', 2, 'The Doors'}})\n" +"---\n" +"- [2, 'The Doors', 1965]\n" +"...\n" +"\n" +"tarantool> bands:select()\n" +"---\n" +"- - [1, 'Roxette', 1986]\n" +" - [2, 'The Doors', 1965]\n" +" - [3, 'Ace of Base', 1987]\n" +" - [4, 'The Beatles', 1960]\n" +"...\n" +"\n" +"-- Try to update a tuple by a non-unique secondary index --\n" +"tarantool> bands.index.year:update({1965}, {{'=', 2, 'Scorpions'}})\n" +"---\n" +"- error: Get() doesn't support partial keys and non-unique indexes\n" +"...\n" +"tarantool> bands:select()\n" +"---\n" +"- - [1, 'Roxette', 1986]\n" +" - [2, 'The Doors', 1965]\n" +" - [3, 'Ace of Base', 1987]\n" +" - [4, 'The Beatles', 1960]\n" +"...\n" +"\n" +"-- Delete all tuples --\n" +"tarantool> bands:truncate()\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:247 +msgid "UPSERT" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:249 +msgid ":ref:`space_object.upsert ` updates an existing tuple or inserts a new one:" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:251 +msgid "If the existing tuple is found by the primary key, Tarantool applies the update operation to this tuple and ignores the new tuple." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:254 +msgid "If no existing tuple is found, Tarantool inserts the new tuple and ignores the update operation." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:257 +msgid "tarantool> bands:insert{1, 'Scorpions', 1965}\n" +"---\n" +"- [1, 'Scorpions', 1965]\n" +"...\n" +"-- As the first argument, upsert accepts a tuple, not a key --\n" +"tarantool> bands:upsert({2}, {{'=', 2, 'Pink Floyd'}})\n" +"---\n" +"- error: Tuple field 2 (band_name) required by space format is missing\n" +"...\n" +"tarantool> bands:select()\n" +"---\n" +"- - [1, 'Scorpions', 1965]\n" +"...\n" +"tarantool> bands:delete(1)\n" +"---\n" +"- [1, 'Scorpions', 1965]\n" +"..." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:277 +msgid "``upsert`` acts as ``insert`` when no existing tuple is found by the primary key." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:279 +msgid "tarantool> bands:upsert({1, 'Scorpions', 1965}, {{'=', 2, 'The Doors'}})\n" +"---\n" +"...\n" +"-- As you can see, {1, 'Scorpions', 1965} is inserted, --\n" +"-- and the update operation is not applied. --\n" +"tarantool> bands:select()\n" +"---\n" +"- - [1, 'Scorpions', 1965]\n" +"...\n" +"\n" +"-- upsert with the same primary key but different values in other fields --\n" +"-- applies the update operation and ignores the new tuple. --\n" +"tarantool> bands:upsert({1, 'Scorpions', 1965}, {{'=', 2, 'The Doors'}})\n" +"---\n" +"...\n" +"tarantool> bands:select()\n" +"---\n" +"- - [1, 'The Doors', 1965]\n" +"..." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:301 +msgid "``upsert`` searches for the existing tuple by the primary index, not by the secondary index. This can lead to a duplication error if the tuple violates a secondary index uniqueness." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:305 +msgid "tarantool> bands:upsert({2, 'The Doors', 1965}, {{'=', 2, 'Pink Floyd'}})\n" +"---\n" +"- error: Duplicate key exists in unique index \"band\" in space \"bands\" with old tuple\n" +" - [1, \"The Doors\", 1965] and new tuple - [2, \"The Doors\", 1965]\n" +"...\n" +"tarantool> bands:select()\n" +"---\n" +"- - [1, 'The Doors', 1965]\n" +"...\n" +"\n" +"-- This works if uniqueness is preserved. --\n" +"tarantool> bands:upsert({2, 'The Beatles', 1960}, {{'=', 2, 'Pink Floyd'}})\n" +"---\n" +"...\n" +"tarantool> bands:select()\n" +"---\n" +"- - [1, 'The Doors', 1965]\n" +" - [2, 'The Beatles', 1960]\n" +"...\n" +"\n" +"-- Delete all tuples --\n" +"tarantool> bands:truncate()\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:337 +msgid "REPLACE" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:339 +msgid ":ref:`space_object.replace ` accepts a well-formatted tuple and searches for the existing tuple by the primary key of the new tuple:" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:342 +msgid "If the existing tuple is found, Tarantool deletes it and inserts the new tuple." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:343 +msgid "If no existing tuple is found, Tarantool inserts the new tuple." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:346 +msgid "tarantool> bands:replace{1, 'Scorpions', 1965}\n" +"---\n" +"- [1, 'Scorpions', 1965]\n" +"...\n" +"tarantool> bands:select()\n" +"---\n" +"- - [1, 'Scorpions', 1965]\n" +"...\n" +"tarantool> bands:replace{1, 'The Beatles', 1960}\n" +"---\n" +"- [1, 'The Beatles', 1960]\n" +"...\n" +"tarantool> bands:select()\n" +"---\n" +"- - [1, 'The Beatles', 1960]\n" +"...\n" +"tarantool> bands:truncate()\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:368 +msgid "``replace`` can violate unique constraints, like ``upsert`` does." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:370 +msgid "tarantool> bands:insert{1, 'Scorpions', 1965}\n" +"- [1, 'Scorpions', 1965]\n" +"...\n" +"tarantool> bands:insert{2, 'The Beatles', 1960}\n" +"---\n" +"- [2, 'The Beatles', 1960]\n" +"...\n" +"tarantool> bands:replace{2, 'Scorpions', 1965}\n" +"---\n" +"- error: Duplicate key exists in unique index \"band\" in space \"bands\" with old tuple\n" +" - [1, \"Scorpions\", 1965] and new tuple - [2, \"Scorpions\", 1965]\n" +"...\n" +"tarantool> bands:truncate()\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:392 +msgid "SELECT" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:394 +msgid "The :ref:`space_object.select ` request searches for a tuple or a set of tuples in the given space by the primary key. To search by the specified index, use :ref:`index_object.select `. These methods work with any keys, including unique and non-unique, full and partial. If a key is partial, ``select`` searches by all keys where the prefix matches the specified key part." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:400 +msgid "tarantool> bands:insert{1, 'Roxette', 1986}\n" +" bands:insert{2, 'Scorpions', 1965}\n" +" bands:insert{3, 'The Doors', 1965}\n" +" bands:insert{4, 'The Beatles', 1960}\n" +"\n" +"tarantool> bands:select(1)\n" +"---\n" +"- - [1, 'Roxette', 1986]\n" +"...\n" +"\n" +"tarantool> bands:select()\n" +"---\n" +"- - [1, 'Roxette', 1986]\n" +" - [2, 'Scorpions', 1965]\n" +" - [3, 'The Doors', 1965]\n" +" - [4, 'The Beatles', 1960]\n" +"...\n" +"\n" +"tarantool> bands.index.primary:select(2)\n" +"---\n" +"- - [2, 'Scorpions', 1965]\n" +"...\n" +"\n" +"tarantool> bands.index.band:select('The Doors')\n" +"---\n" +"- - [3, 'The Doors', 1965]\n" +"...\n" +"\n" +"tarantool> bands.index.year:select(1965)\n" +"---\n" +"- - [2, 'Scorpions', 1965]\n" +" - [3, 'The Doors', 1965]\n" +"..." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:440 +msgid "Using box.space functions to read _space tuples" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:442 +msgid "This example illustrates how to look at all the spaces, and for each display: approximately how many tuples it contains, and the first field of its first tuple. The function uses the Tarantool's ``box.space`` functions ``len()`` and ``pairs()``. The iteration through the spaces is coded as a scan of the ``_space`` system space, which contains metadata. The third field in ``_space`` contains the space name, so the key instruction ``space_name = v[3]`` means ``space_name`` is the ``space_name`` field in the tuple of ``_space`` that we've just fetched with ``pairs()``. The function returns a table:" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:452 +msgid "function example()\n" +" local tuple_count, space_name, line\n" +" local ta = {}\n" +" for k, v in box.space._space:pairs() do\n" +" space_name = v[3]\n" +" if box.space[space_name].index[0] ~= nil then\n" +" tuple_count = '1 or more'\n" +" else\n" +" tuple_count = '0'\n" +" end\n" +" line = space_name .. ' tuple_count =' .. tuple_count\n" +" if tuple_count == '1 or more' then\n" +" for k1, v1 in box.space[space_name]:pairs() do\n" +" line = line .. '. first field in first tuple = ' .. v1[1]\n" +" break\n" +" end\n" +" end\n" +" table.insert(ta, line)\n" +" end\n" +" return ta\n" +"end" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:476 +msgid "The output below shows what happens if you invoke this function:" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:478 +msgid "tarantool> example()\n" +"---\n" +"- - _schema tuple_count =1 or more. first field in first tuple = cluster\n" +" - _space tuple_count =1 or more. first field in first tuple = 272\n" +" - _vspace tuple_count =1 or more. first field in first tuple = 272\n" +" - _index tuple_count =1 or more. first field in first tuple = 272\n" +" - _vindex tuple_count =1 or more. first field in first tuple = 272\n" +" - _func tuple_count =1 or more. first field in first tuple = 1\n" +" - _vfunc tuple_count =1 or more. first field in first tuple = 1\n" +" - _user tuple_count =1 or more. first field in first tuple = 0\n" +" - _vuser tuple_count =1 or more. first field in first tuple = 0\n" +" - _priv tuple_count =1 or more. first field in first tuple = 1\n" +" - _vpriv tuple_count =1 or more. first field in first tuple = 1\n" +" - _cluster tuple_count =1 or more. first field in first tuple = 1\n" +"..." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:498 +msgid "Using box.space functions to organize a _space tuple" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:500 +msgid "This examples shows how to display field names and field types of a system space -- using metadata to find metadata." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:503 +msgid "To begin: how can one select the ``_space`` tuple that describes ``_space``?" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:505 +msgid "A simple way is to look at the constants in ``box.schema``, which shows that there is an item named SPACE_ID == 288, so these statements retrieve the correct tuple:" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:509 +msgid "box.space._space:select{ 288 }\n" +"-- or --\n" +"box.space._space:select{ box.schema.SPACE_ID }" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:515 +msgid "Another way is to look at the tuples in ``box.space._index``, which shows that there is a secondary index named 'name' for a space number 288, so this statement also retrieve the correct tuple:" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:519 +msgid "box.space._space.index.name:select{ '_space' }" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:523 +msgid "However, the retrieved tuple is not easy to read:" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:525 +msgid "tarantool> box.space._space.index.name:select{'_space'}\n" +"---\n" +"- - [280, 1, '_space', 'memtx', 0, {}, [{'name': 'id', 'type': 'num'}, {'name': 'owner',\n" +" 'type': 'num'}, {'name': 'name', 'type': 'str'}, {'name': 'engine', 'type': 'str'},\n" +" {'name': 'field_count', 'type': 'num'}, {'name': 'flags', 'type': 'str'}, {\n" +" 'name': 'format', 'type': '*'}]]\n" +"..." +msgstr "" + +#: ../../doc/how-to/db/crud.rst:535 +msgid "It looks disorganized because field number 7 has been formatted with recommended names and data types. How can one get those specific sub-fields? Since it's visible that field number 7 is an array of maps, this `for` loop will do the organizing:" +msgstr "" + +#: ../../doc/how-to/db/crud.rst:540 +msgid "tarantool> do\n" +" > local tuple_of_space = box.space._space.index.name:get{'_space'}\n" +" > for _, field in ipairs(tuple_of_space[7]) do\n" +" > print(field.name .. ', ' .. field.type)\n" +" > end\n" +" > end\n" +"id, num\n" +"owner, num\n" +"name, str\n" +"engine, str\n" +"field_count, num\n" +"flags, str\n" +"format, *\n" +"---\n" +"..." +msgstr "" diff --git a/locale/en/how-to/db/index.pot b/locale/en/how-to/db/index.pot new file mode 100644 index 0000000000..0c9b6ea407 --- /dev/null +++ b/locale/en/how-to/db/index.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/db/index.rst:2 +msgid "Defining and manipulating data" +msgstr "" + +#: ../../doc/how-to/db/index.rst:4 +msgid "This section contains guides on performing data operations in Tarantool." +msgstr "" diff --git a/locale/en/how-to/db/indexes.pot b/locale/en/how-to/db/indexes.pot new file mode 100644 index 0000000000..f25e54d71e --- /dev/null +++ b/locale/en/how-to/db/indexes.pot @@ -0,0 +1,273 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/db/indexes.rst:4 +msgid "Using indexes" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:7 +msgid "Creating an index" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:9 +msgid "It is mandatory to create an index for a space before trying to insert tuples into the space, or select tuples from the space." +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:12 +msgid "The simple :doc:`index-creation ` operation is:" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:63 +msgid ":extsamp:`box.space.{**{space-name}**}:create_index('{*{index-name}*}')`" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:20 +msgid "This creates a unique :ref:`TREE ` index on the first field of all tuples (often called \"Field#1\"), which is assumed to be numeric." +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:23 +msgid "A recommended design pattern for a data model is to base primary keys on the first fields of a tuple. This speeds up tuple comparison due to the specifics of data storage and the way comparisons are arranged in Tarantool." +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:27 +msgid "The simple :doc:`SELECT ` request is:" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:77 +msgid ":extsamp:`box.space.{**{space-name}**}:select({*{value}*})`" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:34 +msgid "This looks for a single tuple via the first index. Since the first index is always unique, the maximum number of returned tuples will be 1. You can call ``select()`` without arguments, and it will return all tuples. Be careful! Using ``select()`` for huge spaces hangs your instance." +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:39 +msgid "An index definition may also include identifiers of tuple fields and their expected **types**. See allowed indexed field types in section :ref:`Details about indexed field types `:" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:91 +msgid ":extsamp:`box.space.{**{space-name}**}:create_index({**{index-name}**}, {type = 'tree', parts = {{field = 1, type = 'unsigned'}}}`" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:48 +msgid "Space definitions and index definitions are stored permanently in Tarantool's system spaces :ref:`_space ` and :ref:`_index `." +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:51 +#: ../../doc/how-to/db/indexes.rst:166 +msgid "Tip" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:54 +msgid "See full information about creating indexes, such as how to create a multikey index, an index using the ``path`` option, or how to create a functional index in our reference for :doc:`/reference/reference_lua/box_space/create_index`." +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:62 +msgid "Index operations" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:64 +msgid "Index operations are automatic: if a data manipulation request changes a tuple, then it also changes the index keys defined for the tuple." +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:67 +msgid "Create a sample space named ``bands``:" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:69 +msgid "bands = box.schema.space.create('bands')\n" +"" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:74 +msgid "Format the created space by specifying field names and types:" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:76 +msgid "box.space.bands:format({\n" +" { name = 'id', type = 'unsigned' },\n" +" { name = 'band_name', type = 'string' },\n" +" { name = 'year', type = 'unsigned' }\n" +"})\n" +"" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:81 +msgid "Create the **primary** index (named ``primary``):" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:83 +msgid "box.space.bands:create_index('primary', { parts = { 'id' } })\n" +"" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:88 +msgid "This index is based on the ``id`` field of each tuple." +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:90 +msgid "Insert some :ref:`tuples ` into the space:" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:92 +msgid "box.space.bands:insert { 1, 'Roxette', 1986 }\n" +"box.space.bands:insert { 2, 'Scorpions', 1965 }\n" +"box.space.bands:insert { 3, 'Ace of Base', 1987 }\n" +"box.space.bands:insert { 4, 'The Beatles', 1960 }\n" +"box.space.bands:insert { 5, 'Pink Floyd', 1965 }\n" +"box.space.bands:insert { 6, 'The Rolling Stones', 1962 }\n" +"box.space.bands:insert { 7, 'The Doors', 1965 }\n" +"box.space.bands:insert { 8, 'Nirvana', 1987 }\n" +"box.space.bands:insert { 9, 'Led Zeppelin', 1968 }\n" +"box.space.bands:insert { 10, 'Queen', 1970 }\n" +"" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:97 +msgid "Create **secondary indexes**:" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:99 +msgid "-- Create a unique secondary index --\n" +"box.space.bands:create_index('band', { parts = { 'band_name' } })\n" +"\n" +"-- Create a non-unique secondary index --\n" +"box.space.bands:create_index('year', { parts = { { 'year' } }, unique = false })\n" +"" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:104 +msgid "Create a **multi-part index** with two parts:" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:106 +msgid "box.space.bands:create_index('year_band', { parts = { { 'year' }, { 'band_name' } } })\n" +"" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:111 +msgid "There are the following SELECT variations:" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:113 +msgid "The search can use **comparisons** other than equality:" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:115 +msgid "-- Select maximum 3 tuples with the key value greater than 1965 --\n" +"select_greater = bands.index.year:select({ 1965 }, { iterator = 'GT', limit = 3 })\n" +"--[[\n" +"---\n" +"- - [9, 'Led Zeppelin', 1968]\n" +" - [10, 'Queen', 1970]\n" +" - [1, 'Roxette', 1986]\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:120 +msgid "The :ref:`comparison operators ` are:" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:122 +msgid "``LT`` for \"less than\"" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:123 +msgid "``LE`` for \"less than or equal\"" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:124 +msgid "``GT`` for \"greater\"" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:125 +msgid "``GE`` for \"greater than or equal\"" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:126 +msgid "``EQ`` for \"equal\"" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:127 +msgid "``REQ`` for \"reversed equal\"" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:129 +msgid "Value comparisons make sense if and only if the index type is TREE. The iterator types for other types of indexes are slightly different and work differently. See details in section :ref:`Iterator types `." +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:133 +msgid "Note that we don't use the name of the index, which means we use primary index here." +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:135 +msgid "This type of search may return more than one tuple. The tuples will be sorted in descending order by key if the comparison operator is LT or LE or REQ. Otherwise they will be sorted in ascending order." +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:139 +msgid "The search can use a **secondary index**." +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:141 +msgid "-- Select a tuple by the specified secondary key value --\n" +"select_secondary = bands.index.band:select { 'The Doors' }\n" +"--[[\n" +"---\n" +"- - [7, 'The Doors', 1965]\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:148 +msgid "**Partial key search:** The search may be for some key parts starting with the prefix of the key. Note that partial key searches are available only in TREE indexes." +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:152 +msgid "-- Select tuples by the specified partial key value --\n" +"select_multipart_partial = bands.index.year_band:select { 1965 }\n" +"--[[\n" +"---\n" +"- - [5, 'Pink Floyd', 1965]\n" +" - [2, 'Scorpions', 1965]\n" +" - [7, 'The Doors', 1965]\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:158 +msgid "The search can be for all fields, using a table as the value:" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:160 +msgid "-- Select a tuple by the specified multi-part secondary key value --\n" +"select_multipart = bands.index.year_band:select { 1960, 'The Beatles' }\n" +"--[[\n" +"---\n" +"- - [4, 'The Beatles', 1960]\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/how-to/db/indexes.rst:169 +msgid "You can also add, drop, or alter the definitions at runtime, with some restrictions. Read more about index operations in reference for :doc:`box.index submodule `." +msgstr "" diff --git a/locale/en/how-to/db/sequences.pot b/locale/en/how-to/db/sequences.pot new file mode 100644 index 0000000000..f8b6d7b9ea --- /dev/null +++ b/locale/en/how-to/db/sequences.pot @@ -0,0 +1,266 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/db/sequences.rst:4 +msgid "Using sequences" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:6 +msgid "A **sequence** is a generator of ordered integer values." +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:8 +msgid "As with spaces and indexes, you should specify the sequence **name** and let Tarantool generate a unique numeric identifier (sequence ID)." +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:11 +msgid "As well, you can specify several options when creating a new sequence. The options determine the values that are generated whenever the sequence is used." +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:17 +msgid "Options for box.schema.sequence.create()" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:25 +msgid "Option name" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:26 +msgid "Type and meaning" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:27 +msgid "Default" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:28 +msgid "Examples" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:29 +msgid "``start``" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:30 +msgid "Integer. The value to generate the first time a sequence is used" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:31 +#: ../../doc/how-to/db/sequences.rst:35 +#: ../../doc/how-to/db/sequences.rst:51 +msgid "1" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:32 +msgid "``start=0``" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:33 +msgid "``min``" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:34 +msgid "Integer. Values smaller than this cannot be generated" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:36 +msgid "``min=-1000``" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:37 +msgid "``max``" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:38 +msgid "Integer. Values larger than this cannot be generated" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:39 +msgid "9223372036854775807" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:40 +msgid "``max=0``" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:41 +msgid "``cycle``" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:42 +msgid "Boolean. Whether to start again when values cannot be generated" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:43 +msgid "false" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:44 +msgid "``cycle=true``" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:45 +msgid "``cache``" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:46 +msgid "Integer. The number of values to store in a cache" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:47 +msgid "0" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:48 +msgid "``cache=0``" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:49 +msgid "``step``" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:50 +msgid "Integer. What to add to the previous generated value, when generating a new value" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:52 +msgid "``step=-1``" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:53 +msgid "``if_not_exists``" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:54 +msgid "Boolean. If this is true and a sequence with this name exists already, ignore other options and use the existing values" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:56 +msgid "``false``" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:57 +msgid "``if_not_exists=true``" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:60 +msgid "Once a sequence exists, it can be altered, dropped, reset, forced to generate the next value, or associated with an index." +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:64 +msgid "Associating a sequence with an index" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:66 +msgid "First, create a sequence:" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:68 +msgid "-- Create a sequence --\n" +"box.schema.sequence.create('id_seq',{min=1000, start=1000})\n" +"--[[\n" +"---\n" +"- step: 1\n" +" id: 1\n" +" min: 1000\n" +" cache: 0\n" +" uid: 1\n" +" cycle: false\n" +" name: id_seq\n" +" start: 1000\n" +" max: 9223372036854775807\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:73 +msgid "The result shows that the new sequence has all default values, except for the two that were specified, ``min`` and ``start``." +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:76 +msgid "Get the next value from the sequence by calling the ``next()`` function:" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:78 +msgid "-- Get the next item --\n" +"box.sequence.id_seq:next()\n" +"--[[\n" +"---\n" +"- 1000\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:83 +msgid "The result is the same as the start value. The next call increases the value by one (the default sequence step)." +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:86 +msgid "Create a space and specify that its primary key should be generated from the sequence:" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:89 +msgid "-- Create a space --\n" +"box.schema.space.create('customers')\n" +"\n" +"-- Create an index that uses the sequence --\n" +"box.space.customers:create_index('primary',{ sequence = 'id_seq' })\n" +"--[[\n" +"---\n" +"- parts:\n" +" - type: unsigned\n" +" is_nullable: false\n" +" fieldno: 1\n" +" sequence_id: 1\n" +" id: 0\n" +" space_id: 513\n" +" unique: true\n" +" hint: true\n" +" type: TREE\n" +" name: primary\n" +" sequence_fieldno: 1\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:94 +msgid "Insert a tuple without specifying a value for the primary key:" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:96 +msgid "\n" +"-- Insert a tuple without the primary key value --\n" +"box.space.customers:insert{ nil, 'Adams' }\n" +"--[[\n" +"---\n" +"- [1001, 'Adams']\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:101 +msgid "The result is a new tuple where the first field is assigned the next value from the sequence. This arrangement, where the system automatically generates the values for a primary key, is sometimes called \"auto-incrementing\" or \"identity\"." +msgstr "" + +#: ../../doc/how-to/db/sequences.rst:106 +msgid "For syntax and implementation details, see the reference for :doc:`box.schema.sequence `." +msgstr "" diff --git a/locale/en/how-to/getting_started_connectors.pot b/locale/en/how-to/getting_started_connectors.pot new file mode 100644 index 0000000000..d4e27ed0ec --- /dev/null +++ b/locale/en/how-to/getting_started_connectors.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/getting_started_connectors.rst:5 +msgid "Connecting from your favorite language" +msgstr "" + +#: ../../doc/how-to/getting_started_connectors.rst:7 +msgid "In the :ref:`previous sections `, you have learned how to create a Tarantool database. Now let's see how to connect to the database from different programming languages, such as Python, PHP, Go, and C++, and execute typical requests for manipulating the data (select, insert, delete, and so on)." +msgstr "" diff --git a/locale/en/how-to/getting_started_cxx.pot b/locale/en/how-to/getting_started_cxx.pot new file mode 100644 index 0000000000..6c80121f01 --- /dev/null +++ b/locale/en/how-to/getting_started_cxx.pot @@ -0,0 +1,724 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-20 12:25+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/getting_started_cxx.rst:3 +msgid "Connecting to Tarantool from C++" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:5 +msgid "To simplify the start of your working with the Tarantool C++ connector, we will use the `example application `_ from the connector repository. We will go step by step through the application code and explain what each part does." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:10 +msgid "The following main topics are discussed in this manual:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:19 +msgid "Pre-requisites" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:21 +msgid "To go through this Getting Started exercise, you need the following pre-requisites to be done:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:24 +msgid ":ref:`clone the connector source code and ensure having Tarantool and third-party software `" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:25 +msgid ":ref:`start Tarantool and create a database `" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:26 +msgid ":ref:`set up access rights `." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:31 +msgid "Installation" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:33 +msgid "The Tarantool C++ connector is currently supported for Linux only." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:35 +msgid "The connector itself is a header-only library, so, it doesn't require installation and building as such. All you need is to clone the connector source code and :ref:`embed ` it in your C++ project." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:39 +msgid "Also, make sure you have other necessary software and Tarantool installed." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:43 +msgid "Make sure you have the following third-party software. If you miss some of the items, install them:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:46 +msgid "`Git `_, a version control system" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:47 +msgid "`unzip utility `_" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:48 +msgid "`gcc compiler `_ complied with the `C++17 standard `_" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:49 +msgid "`cmake and make tools `_." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:51 +msgid "If you don't have Tarantool on your OS, install it in one of the ways:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:53 +msgid "from a package--refer to `OS-specific instructions `_" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:54 +msgid "from the `source `_." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:56 +msgid "Clone the Tarantool C++ connector repository." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:58 +msgid "git clone git@github.com:tarantool/tntcxx.git" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:65 +msgid "Starting Tarantool and creating a database" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:67 +msgid "Start Tarantool :ref:`locally ` or :ref:`in Docker ` and create a space with the following schema and index:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:71 +msgid "box.cfg{listen = 3301}\n" +"t = box.schema.space.create('t')\n" +"t:format({\n" +" {name = 'id', type = 'unsigned'},\n" +" {name = 'a', type = 'string'},\n" +" {name = 'b', type = 'number'}\n" +" })\n" +"t:create_index('primary', {\n" +" type = 'hash',\n" +" parts = {'id'}\n" +" })" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:87 +msgid "Do not close the terminal window where Tarantool is running. You will need it later to connect to Tarantool from your C++ application." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:93 +msgid "Setting up access rights" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:95 +msgid "To be able to execute the necessary operations in Tarantool, you need to grant the ``guest`` user with the read-write rights. The simplest way is to grant the user with the :ref:`super role `:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:99 +msgid "box.schema.user.grant('guest', 'super')" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:106 +msgid "Connecting to Tarantool" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:108 +msgid "There are three main parts of the C++ connector: the IO-zero-copy buffer, the msgpack encoder/decoder, and the client that handles requests." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:111 +msgid "To set up connection to a Tarantool instance from a C++ application, you need to do the following:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:114 +msgid ":ref:`embed the connector into the application `" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:115 +msgid ":ref:`instantiate a connector client and a connection object `" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:116 +msgid ":ref:`define connection parameters and invoke the method to connect `" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:117 +msgid ":ref:`define error handling behavior `." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:122 +msgid "Embedding connector" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:124 +msgid "Embed the connector in your C++ application by including the main header:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:126 +msgid "#include \"../src/Client/Connector.hpp\"\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:134 +msgid "Instantiating objects" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:136 +msgid "First, we should create a connector client. It can handle many connections to Tarantool instances asynchronously. To instantiate a client, you should specify the buffer and the network provider implementations as template parameters. The connector's main class has the following signature:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:141 +msgid "template>\n" +"class Connector;" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:146 +msgid "The buffer is parametrized by allocator. It means that users can choose which allocator will be used to provide memory for the buffer's blocks. Data is organized into a linked list of blocks of fixed size that is specified as the template parameter of the buffer." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:151 +msgid "You can either implement your own buffer or network provider or use the default ones as we do in our example. So, the default connector instantiation looks as follows:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:155 +msgid "using Buf_t = tnt::Buffer<16 * 1024>;\n" +"#include \"../src/Client/LibevNetProvider.hpp\"\n" +"using Net_t = LibevNetProvider;\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:160 +msgid "Connector client;\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:166 +msgid "To use the ``BUFFER`` class, the buffer header should also be included:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:168 +msgid "#include \"../src/Buffer/Buffer.hpp\"\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:173 +msgid "A client itself is not enough to work with Tarantool instances--we also need to create connection objects. A connection also takes the buffer and the network provider as template parameters. Note that they must be the same as ones of the client:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:178 +msgid "Connection conn(client);\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:187 +msgid "Connecting" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:189 +msgid "Our :ref:`Tarantool instance ` is listening to the ``3301`` port on ``localhost``. Let's define the corresponding variables as well as the ``WAIT_TIMEOUT`` variable for connection timeout." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:194 +msgid "const char *address = \"127.0.0.1\";\n" +"int port = 3301;\n" +"int WAIT_TIMEOUT = 1000; //milliseconds\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:199 +msgid "To connect to the Tarantool instance, we should invoke the ``Connector::connect()`` method of the client object and pass three arguments: connection instance, address, and port." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:203 +msgid "int rc = client.connect(conn, {.address = address,\n" +" .service = std::to_string(port),\n" +" /*.user = ...,*/\n" +" /*.passwd = ...,*/\n" +" /* .transport = STREAM_SSL, */});\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:212 +msgid "Error handling" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:214 +msgid "Implementation of the connector is exception free, so we rely on the return codes: in case of fail, the ``connect()`` method returns ``rc < 0``. To get the error message corresponding to the last error occured during communication with the instance, we can invoke the ``Connection::getError()`` method." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:220 +msgid "if (rc != 0) {\n" +" //assert(conn.getError().saved_errno != 0);\n" +" std::cerr << conn.getError().msg << std::endl;\n" +" return -1;\n" +"}\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:226 +msgid "To reset connection after errors, that is, to clean up the error message and connection status, the ``Connection::reset()`` method is used." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:234 +msgid "Working with requests" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:236 +msgid "In this section, we will show how to:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:238 +msgid ":ref:`prepare different types of requests `" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:239 +msgid ":ref:`send the requests `" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:240 +msgid ":ref:`receive and handle responses `." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:242 +msgid "We will also go through the :ref:`case of having several connections ` and executing a number of requests from different connections simultaneously." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:245 +msgid "In our example C++ application, we execute the following types of requests:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:247 +msgid "``ping``" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:248 +msgid "``replace``" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:249 +msgid "``select``." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:253 +msgid "Examples on other request types, namely, ``insert``, ``delete``, ``upsert``, and ``update``, will be added to this manual later." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:256 +msgid "Each request method returns a request ID that is a sort of `future `_. This ID can be used to get the response message when it is ready. Requests are queued in the output buffer of connection until the ``Connector::wait()`` method is called." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:264 +msgid "Preparing requests" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:266 +msgid "At this step, requests are encoded in the `MessagePack `_ format and saved in the output connection buffer. They are ready to be sent but the network communication itself will be done later." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:271 +msgid "Let's remind that for the requests manipulating with data we are dealing with the Tarantool space ``t`` :ref:`created earlier `, and the space has the following format:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:275 +msgid "t:format({\n" +" {name = 'id', type = 'unsigned'},\n" +" {name = 'a', type = 'string'},\n" +" {name = 'b', type = 'number'}\n" +" })" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:283 +msgid "**ping**" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:285 +msgid "rid_t ping = conn.ping();\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:291 +msgid "**replace**" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:293 +msgid "Equals to Lua request ``:replace(pk_value, \"111\", 1)``." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:295 +msgid "uint32_t space_id = 512;\n" +"int pk_value = 666;\n" +"std::tuple data = std::make_tuple(pk_value /* field 1*/, \"111\" /* field 2*/, 1.01 /* field 3*/);\n" +"rid_t replace = conn.space[space_id].replace(data);\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:301 +msgid "**select**" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:303 +msgid "Equals to Lua request ``.index[0]:select({pk_value}, {limit = 1})``." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:305 +msgid "uint32_t index_id = 0;\n" +"uint32_t limit = 1;\n" +"uint32_t offset = 0;\n" +"IteratorType iter = IteratorType::EQ;\n" +"auto i = conn.space[space_id].index[index_id];\n" +"rid_t select = i.select(std::make_tuple(pk_value), limit, offset, iter);\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:314 +msgid "Sending requests" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:316 +msgid "To send requests to the server side, invoke the ``client.wait()`` method." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:319 +msgid "client.wait(conn, ping, WAIT_TIMEOUT);" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:323 +msgid "The ``wait()`` method takes the connection to poll, the request ID, and, optionally, the timeout as parameters. Once a response for the specified request is ready, ``wait()`` terminates. It also provides a negative return code in case of system related fails, for example, a broken or timeouted connection. If ``wait()`` returns ``0``, then a response has been received and expected to be parsed." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:330 +msgid "Now let's send our requests to the Tarantool instance. The ``futureIsReady()`` function checks availability of a future and returns ``true`` or ``false``." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:334 +msgid "while (! conn.futureIsReady(ping)) {\n" +" /*\n" +" * wait() is the main function responsible for sending/receiving\n" +" * requests and implements event-loop under the hood. It may\n" +" * fail due to several reasons:\n" +" * - connection is timed out;\n" +" * - connection is broken (e.g. closed);\n" +" * - epoll is failed.\n" +" */\n" +" if (client.wait(conn, ping, WAIT_TIMEOUT) != 0) {\n" +" std::cerr << conn.getError().msg << std::endl;\n" +" conn.reset();\n" +" }\n" +"}\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:345 +msgid "Receiving responses" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:347 +msgid "To get the response when it is ready, use the ``Connection::getResponse()`` method. It takes the request ID and returns an optional object containing the response. If the response is not ready yet, the method returns ``std::nullopt``. Note that on each future, ``getResponse()`` can be called only once: it erases the request ID from the internal map once it is returned to a user." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:354 +msgid "A response consists of a header and a body (``response.header`` and ``response.body``). Depending on success of the request execution on the server side, body may contain either runtime error(s) accessible by ``response.body.error_stack`` or data (tuples)--``response.body.data``. In turn, data is a vector of tuples. However, tuples are not decoded and come in the form of pointers to the start and the end of msgpacks. See the :ref:`\"Decoding and reading the data\" ` section to understand how to decode tuples." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:363 +msgid "There are two options for single connection it regards to receiving responses: we can either wait for one specific future or for all of them at once. We'll try both options in our example. For the ``ping`` request, let's use the first option." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:368 +msgid "std::optional> response = conn.getResponse(ping);\n" +"/*\n" +" * Since conn.futureIsReady(ping) returned , then response\n" +" * must be ready.\n" +" */\n" +"assert(response != std::nullopt);\n" +"/*\n" +" * If request is successfully executed on server side, response\n" +" * will contain data (i.e. tuple being replaced in case of :replace()\n" +" * request or tuples satisfying search conditions in case of :select();\n" +" * responses for pings contain nothing - empty map).\n" +" * To tell responses containing data from error responses, one can\n" +" * rely on response code storing in the header or check\n" +" * Response->body.data and Response->body.error_stack members.\n" +" */\n" +"printResponse(conn, *response);\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:374 +msgid "For the ``replace`` and ``select`` requests, let's examine the option of waiting for both futures at once." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:377 +msgid "/* Let's wait for both futures at once. */\n" +"std::vector futures;\n" +"futures[0] = replace;\n" +"futures[1] = select;\n" +"/* No specified timeout means that we poll futures until they are ready.*/\n" +"client.waitAll(conn, futures);\n" +"for (size_t i = 0; i < futures.size(); ++i) {\n" +" assert(conn.futureIsReady(futures[i]));\n" +" response = conn.getResponse(futures[i]);\n" +" assert(response != std::nullopt);\n" +" printResponse(conn, *response);\n" +"}\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:388 +msgid "Several connections at once" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:390 +msgid "Now, let's have a look at the case when we establish two connections to Tarantool instance simultaneously." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:393 +msgid "/* Let's create another connection. */\n" +"Connection another(client);\n" +"if (client.connect(another, {.address = address,\n" +" .service = std::to_string(port),\n" +" /* .transport = STREAM_SSL, */}) != 0) {\n" +" std::cerr << conn.getError().msg << std::endl;\n" +" return -1;\n" +"}\n" +"/* Simultaneously execute two requests from different connections. */\n" +"rid_t f1 = conn.ping();\n" +"rid_t f2 = another.ping();\n" +"/*\n" +" * waitAny() returns the first connection received response.\n" +" * All connections registered via :connect() call are participating.\n" +" */\n" +"std::optional> conn_opt = client.waitAny(WAIT_TIMEOUT);\n" +"Connection first = *conn_opt;\n" +"if (first == conn) {\n" +" assert(conn.futureIsReady(f1));\n" +" (void) f1;\n" +"} else {\n" +" assert(another.futureIsReady(f2));\n" +" (void) f2;\n" +"}\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:404 +msgid "Closing connections" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:406 +msgid "Finally, a user is responsible for closing connections." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:408 +msgid "client.close(conn);\n" +"client.close(another);\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:417 +msgid "Building and launching C++ application" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:419 +msgid "Now, we are going to build our example C++ application, launch it to connect to the Tarantool instance and execute all the requests defined." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:422 +msgid "Make sure you are in the root directory of the cloned C++ connector repository. To build the example application:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:425 +msgid "cd examples\n" +"cmake .\n" +"make" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:431 +msgid "Make sure the :ref:`Tarantool session ` you started earlier is running. Launch the application:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:434 +msgid "./Simple" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:438 +msgid "As you can see from the execution log, all the connections to Tarantool defined in our application have been established and all the requests have been executed successfully." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:447 +msgid "Decoding and reading the data" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:449 +msgid "Responses from a Tarantool instance contain raw data, that is, the data encoded into the `MessagePack `_ tuples. To decode client's data, the user has to write their own decoders (readers) based on the database schema and include them in one's application:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:455 +msgid "\n" +"#include \"Reader.hpp\"\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:460 +msgid "To show the logic of decoding a response, we will use `the reader from our example `_." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:463 +msgid "First, the structure corresponding our :ref:`example space format ` is defined:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:466 +msgid "/**\n" +" * Corresponds to tuples stored in user's space:\n" +" * box.execute(\"CREATE TABLE t (id UNSIGNED PRIMARY KEY, a TEXT, d DOUBLE);\")\n" +" */\n" +"struct UserTuple {\n" +" uint64_t field1;\n" +" std::string field2;\n" +" double field3;\n" +"};\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:474 +msgid "Base reader prototype" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:476 +msgid "Prototype of the base reader is given in ``src/mpp/Dec.hpp``:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:478 +msgid "template \n" +"struct SimpleReaderBase : DefaultErrorHandler {\n" +" using BufferIterator_t = typename BUFFER::iterator;\n" +" /* Allowed type of values to be parsed. */\n" +" static constexpr Type VALID_TYPES = TYPE;\n" +" BufferIterator_t* StoreEndIterator() { return nullptr; }\n" +"};" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:488 +msgid "Every new reader should inherit from it or directly from the ``DefaultErrorHandler``." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:494 +msgid "Parsing values" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:496 +msgid "To parse a particular value, we should define the ``Value()`` method. First two arguments of the method are common and unused as a rule, but the third one defines the parsed value. In case of `POD (Plain Old Data) `_ structures, it's enough to provide a byte-to-byte copy. Since there are fields of three different types in our schema, let's define the corresponding ``Value()`` functions:" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:503 +msgid "struct UserTupleValueReader : mpp::DefaultErrorHandler {\n" +" explicit UserTupleValueReader(UserTuple& t) : tuple(t) {}\n" +" static constexpr mpp::Family VALID_TYPES = mpp::MP_UINT | mpp::MP_STR | mpp::MP_DBL;\n" +" template \n" +" void Value(BufIter_t&, mpp::compact::Family, T v)\n" +" {\n" +" using A = UserTuple;\n" +" static constexpr std::tuple map(&A::field1, &A::field3);\n" +" auto ptr = std::get A::*>(map);\n" +" tuple.*ptr = v;\n" +" }\n" +" void Value(BufIter_t& itr, mpp::compact::Family, mpp::StrValue v)\n" +" {\n" +" BufIter_t tmp = itr;\n" +" tmp += v.offset;\n" +" std::string &dst = tuple.field2;\n" +" while (v.size) {\n" +" dst.push_back(*tmp);\n" +" ++tmp;\n" +" --v.size;\n" +" }\n" +" }\n" +" void WrongType(mpp::Family expected, mpp::Family got)\n" +" {\n" +" std::cout << \"expected type is \" << expected <<\n" +" \" but got \" << got << std::endl;\n" +" }\n" +"\n" +" BufIter_t* StoreEndIterator() { return nullptr; }\n" +" UserTuple& tuple;\n" +"};\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:511 +msgid "Parsing array" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:513 +msgid "It's also important to understand that a tuple itself is wrapped in an array, so, in fact, we should parse the array first. Let's define another reader for that purpose." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:517 +msgid "template \n" +"struct UserTupleReader : mpp::SimpleReaderBase {\n" +"\n" +" UserTupleReader(mpp::Dec& d, UserTuple& t) : dec(d), tuple(t) {}\n" +"\n" +" void Value(const iterator_t&, mpp::compact::Family, mpp::ArrValue u)\n" +" {\n" +" assert(u.size == 3);\n" +" (void) u;\n" +" dec.SetReader(false, UserTupleValueReader{tuple});\n" +" }\n" +" mpp::Dec& dec;\n" +" UserTuple& tuple;\n" +"};\n" +"" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:525 +msgid "Setting reader" +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:527 +msgid "The ``SetReader()`` method sets the reader that is invoked while each of the array's entries is parsed. To make two readers defined above work, we should create a decoder, set its iterator to the position of the encoded tuple, and invoke the ``Read()`` method (the code block below is from the `example application `_)." +msgstr "" + +#: ../../doc/how-to/getting_started_cxx.rst:533 +msgid "template \n" +"std::vector\n" +"decodeUserTuple(BUFFER &buf, Data &data)\n" +"{\n" +" std::vector results;\n" +" for(auto& t: data.tuples) {\n" +" UserTuple tuple;\n" +" mpp::Dec dec(buf);\n" +" dec.SetPosition(t.begin);\n" +" dec.SetReader(false, UserTupleReader{dec, tuple});\n" +" mpp::ReadResult_t res = dec.Read();\n" +" assert(res == mpp::READ_SUCCESS);\n" +" (void) res;\n" +" results.push_back(tuple);\n" +" }\n" +" return results;\n" +"}\n" +"" +msgstr "" diff --git a/locale/en/how-to/getting_started_db.pot b/locale/en/how-to/getting_started_db.pot new file mode 100644 index 0000000000..26a3b585ec --- /dev/null +++ b/locale/en/how-to/getting_started_db.pot @@ -0,0 +1,593 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/getting_started_db.rst:5 +msgid "Creating your first Tarantool database" +msgstr "" + +#: ../../doc/how-to/getting_started_db.rst:7 +msgid "First, let's install Tarantool, start it, and create a simple database." +msgstr "" + +#: ../../doc/how-to/getting_started_db.rst:9 +msgid "You can install Tarantool and work with it locally or in Docker." +msgstr "" + +#: ../../doc/how-to/using_docker.rst:5 +msgid "Using a Docker image" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:7 +msgid "For trial and test purposes, we recommend using `the official Tarantool images for Docker `_. An official image contains a particular Tarantool version and all popular external modules for Tarantool. Everything is already installed and configured in Linux. These images are the easiest way to install and use Tarantool." +msgstr "" + +#: ../../doc/how-to/using_docker.rst:16 +msgid "If you're new to Docker, we recommend going over `this tutorial `_ before proceeding with this chapter." +msgstr "" + +#: ../../doc/how-to/using_docker.rst:24 +msgid "Launching a container" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:26 +msgid "If you don't have Docker installed, please follow the official `installation guide `_ for your OS." +msgstr "" + +#: ../../doc/how-to/using_docker.rst:30 +msgid "To start a fully functional Tarantool instance, run a container with some minimal options:" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:33 +msgid "$ docker run \\\n" +" --name mytarantool \\\n" +" -d -p 3301:3301 \\\n" +" -v /data/dir/on/host:/var/lib/tarantool \\\n" +" tarantool/tarantool:latest" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:41 +msgid "This command runs a new container named ``mytarantool``. Docker starts it from an official image named ``tarantool/tarantool:latest``, with the latest Tarantool version and all external modules already installed." +msgstr "" + +#: ../../doc/how-to/using_docker.rst:45 +msgid "Tarantool will accept incoming connections on ``localhost:3301``. You can start using it as a key-value storage right away." +msgstr "" + +#: ../../doc/how-to/using_docker.rst:48 +msgid "Tarantool :ref:`persists data ` inside the container. To make your test data available after you stop the container, this command also mounts the host's directory ``/data/dir/on/host`` (you need to specify here an absolute path to an existing local directory) in the container's directory ``/var/lib/tarantool`` (by convention, Tarantool in a container uses this directory to persist data). Through this, all changes made in the mounted directory on the container's side are applied to the host's disk." +msgstr "" + +#: ../../doc/how-to/using_docker.rst:57 +msgid "Tarantool's database module in the container is already :doc:`configured ` and started. You don't need to do it manually, unless you use Tarantool as an :ref:`application server ` and run it with an application." +msgstr "" + +#: ../../doc/how-to/using_docker.rst:64 +msgid "If your container terminates immediately after starting, follow `this page `_ for a possible solution." +msgstr "" + +#: ../../doc/how-to/using_docker.rst:72 +msgid "Attaching to Tarantool" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:74 +msgid "To attach to Tarantool that runs inside the container, run:" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:76 +msgid "$ docker exec -i -t mytarantool console" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:80 +msgid "This command:" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:82 +msgid "Instructs Tarantool to open an interactive console port for incoming connections." +msgstr "" + +#: ../../doc/how-to/using_docker.rst:83 +msgid "Attaches to the Tarantool server inside the container under the ``admin`` user via a standard Unix socket." +msgstr "" + +#: ../../doc/how-to/using_docker.rst:86 +msgid "Tarantool displays a prompt:" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:88 +msgid "tarantool.sock>" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:92 +#: ../../doc/how-to/using_package_manager.rst:35 +msgid "Now you can enter requests on the command line." +msgstr "" + +#: ../../doc/how-to/using_docker.rst:96 +msgid "On production machines, Tarantool's interactive mode is designed for system administration only. We use it for most examples in this manual, because it is convenient for learning." +msgstr "" + +#: ../../doc/how-to/using_docker.rst:102 +#: ../../doc/how-to/using_package_manager.rst:47 +msgid "Creating a database" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:104 +msgid "While we're attached to the console, let's create a simple test database." +msgstr "" + +#: ../../doc/how-to/using_docker.rst:106 +msgid "First, create the first :term:`space` (named ``tester``):" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:108 +msgid "tarantool.sock> s = box.schema.space.create('tester')" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:112 +#: ../../doc/how-to/using_package_manager.rst:102 +msgid "Format the created space by specifying :term:`field` names and :ref:`types `:" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:114 +msgid "tarantool.sock> s:format({\n" +" > {name = 'id', type = 'unsigned'},\n" +" > {name = 'band_name', type = 'string'},\n" +" > {name = 'year', type = 'unsigned'}\n" +" > })" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:122 +#: ../../doc/how-to/using_package_manager.rst:112 +msgid "Create the first :ref:`index ` (named ``primary``):" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:124 +msgid "tarantool.sock> s:create_index('primary', {\n" +" > type = 'tree',\n" +" > parts = {'id'}\n" +" > })" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:131 +#: ../../doc/how-to/using_package_manager.rst:121 +msgid "This is a primary index based on the ``id`` field of each tuple. ``TREE`` is the most universal index type. To learn more, check the documentation on Tarantool :ref:`index types `." +msgstr "" + +#: ../../doc/how-to/using_docker.rst:134 +#: ../../doc/how-to/using_package_manager.rst:124 +msgid "Insert three :term:`tuples ` (our name for records) into the space:" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:137 +msgid "tarantool.sock> s:insert{1, 'Roxette', 1986}\n" +"tarantool.sock> s:insert{2, 'Scorpions', 2015}\n" +"tarantool.sock> s:insert{3, 'Ace of Base', 1993}" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:143 +#: ../../doc/how-to/using_package_manager.rst:133 +msgid "To select a tuple using the ``primary`` index, run:" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:145 +msgid "tarantool.sock> s:select{3}" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:149 +#: ../../doc/how-to/using_package_manager.rst:139 +msgid "The terminal screen now looks like this:" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:151 +msgid "tarantool.sock> s = box.schema.space.create('tester')\n" +"---\n" +"...\n" +"tarantool.sock> s:format({\n" +" > {name = 'id', type = 'unsigned'},\n" +" > {name = 'band_name', type = 'string'},\n" +" > {name = 'year', type = 'unsigned'}\n" +" > })\n" +"---\n" +"...\n" +"tarantool.sock> s:create_index('primary', {\n" +" > type = 'tree',\n" +" > parts = {'id'}\n" +" > })\n" +"---\n" +"- unique: true\n" +" parts:\n" +" - type: unsigned\n" +" is_nullable: false\n" +" fieldno: 1\n" +" id: 0\n" +" space_id: 512\n" +" name: primary\n" +" type: TREE\n" +"...\n" +"tarantool.sock> s:insert{1, 'Roxette', 1986}\n" +"---\n" +"- [1, 'Roxette', 1986]\n" +"...\n" +"tarantool.sock> s:insert{2, 'Scorpions', 2015}\n" +"---\n" +"- [2, 'Scorpions', 2015]\n" +"...\n" +"tarantool.sock> s:insert{3, 'Ace of Base', 1993}\n" +"---\n" +"- [3, 'Ace of Base', 1993]\n" +"...\n" +"tarantool.sock> s:select{3}\n" +"---\n" +"- - [3, 'Ace of Base', 1993]\n" +"..." +msgstr "" + +#: ../../doc/how-to/using_docker.rst:195 +#: ../../doc/how-to/using_package_manager.rst:185 +msgid "To add a secondary index based on the ``band_name`` field, run:" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:197 +msgid "tarantool.sock> s:create_index('secondary', {\n" +" > type = 'tree',\n" +" > parts = {'band_name'}\n" +" > })" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:204 +#: ../../doc/how-to/using_package_manager.rst:194 +msgid "To select tuples using the ``secondary`` index, run:" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:206 +msgid "tarantool.sock> s.index.secondary:select{'Scorpions'}\n" +"---\n" +"- - [2, 'Scorpions', 2015]\n" +"..." +msgstr "" + +#: ../../doc/how-to/using_docker.rst:213 +msgid "To drop an index, run:" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:215 +msgid "tarantool> s.index.secondary:drop()\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/how-to/using_docker.rst:223 +msgid "Stopping a container" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:225 +msgid "When the testing is over, stop the container politely:" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:227 +msgid "$ docker stop mytarantool" +msgstr "" + +#: ../../doc/how-to/using_docker.rst:231 +msgid "This was a temporary container, and its disk/memory data were flushed when you stopped it. But since you mounted a data directory from the host in the container, Tarantool's data files were persisted to the host's disk. Now if you start a new container and mount that data directory, Tarantool will recover all of the data from disk and continue working with the persisted data." +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:5 +msgid "Using a package manager" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:7 +msgid "For production purposes, we recommend that you install Tarantool via the `official package manager `_. You can choose one of three versions: LTS, stable, or beta. An automatic build system creates, tests and publishes packages for every push into a corresponding branch at `Tarantool's GitHub repository `_." +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:14 +msgid "To download and install the package that's appropriate for your OS, start a shell (terminal) and enter the command-line instructions provided for your OS at Tarantool's `download page `_." +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:20 +msgid "Starting Tarantool" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:22 +msgid "To start working with Tarantool, start a terminal and run this:" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:24 +msgid "$ tarantool\n" +"$ # by doing this, you create a new Tarantool instance" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:29 +msgid "Tarantool starts in interactive mode and displays a prompt:" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:31 +msgid "tarantool>" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:39 +msgid "On production machines, Tarantool's interactive mode is designed for system administration only. We use it for most examples in this manual because it is convenient for learning." +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:49 +msgid "Here is how to create a simple test database after installation." +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:51 +msgid "To let Tarantool store data in a separate place, create a new directory dedicated for tests:" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:54 +msgid "$ mkdir ~/tarantool_sandbox\n" +"$ cd ~/tarantool_sandbox" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:59 +msgid "You can delete the directory when the tests are completed." +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:61 +msgid "Check if the default port that the database instance will listen to is vacant." +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:63 +msgid "In versions before :doc:`2.4.2 `, during installation the Tarantool packages for Debian and Ubuntu automatically enable and start the demonstrative global ``example.lua`` instance that listens to the ``3301`` port by default. The ``example.lua`` file showcases the basic configuration and can be found in the ``/etc/tarantool/instances.enabled`` or ``/etc/tarantool/instances.available`` directories." +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:70 +msgid "However, we encourage you to perform the instance startup manually, so you can learn." +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:73 +msgid "Make sure the default port is vacant:" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:75 +msgid "To check if the demonstrative instance is running, run:" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:77 +msgid "$ lsof -i :3301\n" +"COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME\n" +"tarantool 6851 root 12u IPv4 40827 0t0 TCP *:3301 (LISTEN)" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:83 +msgid "If it is running, kill the corresponding process. In this example:" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:85 +msgid "$ kill 6851" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:89 +msgid "To start Tarantool's database module and make the instance accept TCP requests on port ``3301``, run:" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:92 +msgid "tarantool> box.cfg{listen = 3301}" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:96 +msgid "Create the first :term:`space ` (named ``tester``):" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:98 +msgid "tarantool> s = box.schema.space.create('tester')" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:104 +msgid "tarantool> s:format({\n" +" > {name = 'id', type = 'unsigned'},\n" +" > {name = 'band_name', type = 'string'},\n" +" > {name = 'year', type = 'unsigned'}\n" +" > })" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:114 +msgid "tarantool> s:create_index('primary', {\n" +" > type = 'tree',\n" +" > parts = {'id'}\n" +" > })" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:127 +msgid "tarantool> s:insert{1, 'Roxette', 1986}\n" +"tarantool> s:insert{2, 'Scorpions', 2015}\n" +"tarantool> s:insert{3, 'Ace of Base', 1993}" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:135 +msgid "tarantool> s:select{3}" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:141 +msgid "tarantool> s = box.schema.space.create('tester')\n" +"---\n" +"...\n" +"tarantool> s:format({\n" +" > {name = 'id', type = 'unsigned'},\n" +" > {name = 'band_name', type = 'string'},\n" +" > {name = 'year', type = 'unsigned'}\n" +" > })\n" +"---\n" +"...\n" +"tarantool> s:create_index('primary', {\n" +" > type = 'tree',\n" +" > parts = {'id'}\n" +" > })\n" +"---\n" +"- unique: true\n" +" parts:\n" +" - type: unsigned\n" +" is_nullable: false\n" +" fieldno: 1\n" +" id: 0\n" +" space_id: 512\n" +" name: primary\n" +" type: TREE\n" +"...\n" +"tarantool> s:insert{1, 'Roxette', 1986}\n" +"---\n" +"- [1, 'Roxette', 1986]\n" +"...\n" +"tarantool> s:insert{2, 'Scorpions', 2015}\n" +"---\n" +"- [2, 'Scorpions', 2015]\n" +"...\n" +"tarantool> s:insert{3, 'Ace of Base', 1993}\n" +"---\n" +"- [3, 'Ace of Base', 1993]\n" +"...\n" +"tarantool> s:select{3}\n" +"---\n" +"- - [3, 'Ace of Base', 1993]\n" +"..." +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:187 +msgid "tarantool> s:create_index('secondary', {\n" +" > type = 'tree',\n" +" > parts = {'band_name'}\n" +" > })" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:196 +msgid "tarantool> s.index.secondary:select{'Scorpions'}\n" +"---\n" +"- - [2, 'Scorpions', 2015]\n" +"..." +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:203 +msgid "Now, to prepare for the example in the next section, try this:" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:205 +msgid "tarantool> box.schema.user.grant('guest', 'read,write,execute', 'universe')" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:213 +msgid "Connecting remotely" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:215 +msgid "In the request ``box.cfg{listen = 3301}`` that we made earlier, the ``listen`` value can be any form of a :ref:`URI ` (uniform resource identifier). In this case, it’s just a local port: port ``3301``. You can send requests to the listen URI via:" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:220 +msgid "``telnet``," +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:221 +msgid "a :ref:`connector `," +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:222 +msgid "another instance of Tarantool (using the :ref:`console ` module), or" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:223 +msgid ":ref:`tt ` administrative utility." +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:225 +msgid "Let’s try (3)." +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:227 +msgid "Switch to another terminal. On Linux, for example, this means starting another instance of a Bash shell. You can switch to any working directory in the new terminal, not necessarily to ``~/tarantool_sandbox``." +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:231 +msgid "Start another instance of ``tarantool``:" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:233 +msgid "$ tarantool" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:237 +msgid "Use ``net.box`` to connect to the Tarantool instance that’s listening on ``localhost:3301``\":" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:240 +msgid "tarantool> net_box = require('net.box')\n" +"---\n" +"...\n" +"tarantool> conn = net_box.connect(3301)\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:249 +msgid "Try this request:" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:251 +msgid "tarantool> conn.space.tester:select{2}" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:255 +msgid "This means \"send a request to that Tarantool instance, and display the result\". It is equivalent to the local request ``box.space.tester:select{2}``. The result in this case is one of the tuples that was inserted earlier. Your terminal screen should now look like this:" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:260 +msgid "$ tarantool\n" +"\n" +"Tarantool 2.6.1-32-g53dbba7c2\n" +"type 'help' for interactive help\n" +"tarantool> net_box = require('net.box')\n" +"---\n" +"...\n" +"tarantool> conn = net_box.connect(3301)\n" +"---\n" +"...\n" +"tarantool> conn.space.tester:select{2}\n" +"---\n" +"- - [2, 'Scorpions', 2015]\n" +"..." +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:277 +msgid "You can repeat ``box.space...:insert{}`` and ``box.space...:select{}`` (or ``conn.space...:insert{}`` and ``conn.space...:select{}``) indefinitely, on either Tarantool instance." +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:281 +msgid "When the testing is over:" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:283 +msgid "To drop the space: ``s:drop()``" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:284 +msgid "To stop ``tarantool``: Ctrl+C or Ctrl+D" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:285 +msgid "To stop Tarantool (an alternative): the standard Lua function `os.exit() `_" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:287 +msgid "To stop Tarantool (from another terminal): ``sudo pkill -f tarantool``" +msgstr "" + +#: ../../doc/how-to/using_package_manager.rst:288 +msgid "To destroy the test: ``rm -r ~/tarantool_sandbox``" +msgstr "" diff --git a/locale/en/how-to/getting_started_go.pot b/locale/en/how-to/getting_started_go.pot new file mode 100644 index 0000000000..099ab71ad8 --- /dev/null +++ b/locale/en/how-to/getting_started_go.pot @@ -0,0 +1,303 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/getting_started_go.rst:5 +msgid "Connecting from Go" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:11 +msgid "Pre-requisites" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:13 +msgid "Before we proceed:" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:15 +msgid "`Install `__ the ``go-tarantool`` library." +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:18 +msgid ":ref:`Start ` Tarantool (locally or in Docker) and make sure that you have created and populated a database as we suggested :ref:`earlier `:" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:22 +msgid "box.cfg{listen = 3301}\n" +"s = box.schema.space.create('tester')\n" +"s:format({\n" +" {name = 'id', type = 'unsigned'},\n" +" {name = 'band_name', type = 'string'},\n" +" {name = 'year', type = 'unsigned'}\n" +" })\n" +"s:create_index('primary', {\n" +" type = 'hash',\n" +" parts = {'id'}\n" +" })\n" +"s:create_index('secondary', {\n" +" type = 'hash',\n" +" parts = {'band_name'}\n" +" })\n" +"s:insert{1, 'Roxette', 1986}\n" +"s:insert{2, 'Scorpions', 2015}\n" +"s:insert{3, 'Ace of Base', 1993}" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:45 +msgid "Please do not close the terminal window where Tarantool is running -- you'll need it soon." +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:48 +msgid "In order to connect to Tarantool as an administrator, reset the password for the ``admin`` user:" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:51 +msgid "box.schema.user.passwd('pass')" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:59 +msgid "Connecting to Tarantool" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:61 +msgid "To get connected to the Tarantool server, write a simple Go program:" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:63 +msgid "package main\n" +"\n" +"import (\n" +" \"fmt\"\n" +"\n" +" \"github.com/tarantool/go-tarantool\"\n" +")\n" +"\n" +"func main() {\n" +"\n" +" conn, err := tarantool.Connect(\"127.0.0.1:3301\", tarantool.Opts{\n" +" User: \"admin\",\n" +" Pass: \"pass\",\n" +" })\n" +"\n" +" if err != nil {\n" +" log.Fatalf(\"Connection refused\")\n" +" }\n" +"\n" +" defer conn.Close()\n" +"\n" +" // Your logic for interacting with the database\n" +"}" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:89 +msgid "The default user is ``guest``." +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:95 +msgid "Manipulating the data" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:101 +msgid "Inserting data" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:103 +msgid "To insert a :term:`tuple` into a :term:`space`, use ``Insert``:" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:105 +msgid "resp, err = conn.Insert(\"tester\", []interface{}{4, \"ABBA\", 1972})" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:109 +msgid "This inserts the tuple ``(4, \"ABBA\", 1972)`` into a space named ``tester``." +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:111 +msgid "The response code and data are available in the `tarantool.Response `_ structure:" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:115 +msgid "code := resp.Code\n" +"data := resp.Data" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:124 +msgid "Querying data" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:126 +msgid "To select a tuple from a space, use `Select `_:" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:129 +msgid "resp, err = conn.Select(\"tester\", \"primary\", 0, 1, tarantool.IterEq, []interface{}{4})" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:133 +msgid "This selects a tuple by the primary key with ``offset = 0`` and ``limit = 1`` from a space named ``tester`` (in our example, this is the index named ``primary``, based on the ``id`` field of each tuple)." +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:137 +msgid "Next, select tuples by a secondary key." +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:139 +msgid "resp, err = conn.Select(\"tester\", \"secondary\", 0, 1, tarantool.IterEq, []interface{}{\"ABBA\"})" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:143 +msgid "Finally, it would be nice to select all the tuples in a space. But there is no one-liner for this in Go; you would need a script like :ref:`this one `." +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:147 +msgid "For more examples, see https://github.com/tarantool/go-tarantool#usage" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:153 +msgid "Updating data" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:155 +msgid "Update a :term:`field` value using ``Update``:" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:157 +msgid "resp, err = conn.Update(\"tester\", \"primary\", []interface{}{4}, []interface{}{[]interface{}{\"+\", 2, 3}})" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:161 +msgid "This increases by 3 the value of field ``2`` in the tuple with ``id = 4``. If a tuple with this ``id`` doesn't exist, Tarantool will return an error." +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:164 +msgid "Now use ``Replace`` to totally replace the tuple that matches the primary key. If a tuple with this primary key doesn't exist, Tarantool will do nothing." +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:168 +msgid "resp, err = conn.Replace(\"tester\", []interface{}{4, \"New band\", 2011})" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:172 +msgid "You can also update the data using ``Upsert`` that works similarly to ``Update``, but creates a new tuple if the old one was not found." +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:175 +msgid "resp, err = conn.Upsert(\"tester\", []interface{}{4, \"Another band\", 2000}, []interface{}{[]interface{}{\"+\", 2, 5}})" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:179 +msgid "This increases by 5 the value of the third field in the tuple with ``id = 4``, or inserts the tuple ``(4, \"Another band\", 2000)`` if a tuple with this ``id`` doesn't exist." +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:187 +msgid "Deleting data" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:189 +msgid "To delete a tuple, use ``сonnection.Delete``:" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:191 +msgid "resp, err = conn.Delete(\"tester\", \"primary\", []interface{}{4})" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:195 +msgid "To delete all tuples in a space (or to delete an entire space), use ``Call``. We'll focus on this function in more detail in the :ref:`next ` section." +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:199 +msgid "To delete all tuples in a space, call ``space:truncate``:" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:201 +msgid "resp, err = conn.Call(\"box.space.tester:truncate\", []interface{}{})" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:205 +msgid "To delete an entire space, call ``space:drop``. This requires connecting to Tarantool as the ``admin`` user:" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:208 +msgid "resp, err = conn.Call(\"box.space.tester:drop\", []interface{}{})" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:216 +msgid "Executing stored procedures" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:218 +msgid "Switch to the terminal window where Tarantool is running." +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:222 +msgid "If you don't have a terminal window with remote connection to Tarantool, check out these guides:" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:225 +msgid ":ref:`connecting to a local Tarantool instance `" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:226 +msgid ":ref:`attaching to a Tarantool instance that runs in a Docker container `" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:228 +msgid "Define a simple Lua function:" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:230 +msgid "function sum(a, b)\n" +" return a + b\n" +"end" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:236 +msgid "Now we have a Lua function defined in Tarantool. To invoke this function from ``go``, use ``Call``:" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:239 +msgid "resp, err = conn.Call(\"sum\", []interface{}{2, 3})" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:243 +msgid "To send bare Lua code for execution, use ``Eval``:" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:245 +msgid "resp, err = connection.Eval(\"return 4 + 5\", []interface{}{})" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:253 +msgid "Feature comparison" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:255 +msgid "There are two more connectors from the open-source community:" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:257 +msgid "`viciious/go-tarantool `_" +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:259 +msgid "`FZambia/tarantool `_." +msgstr "" + +#: ../../doc/how-to/getting_started_go.rst:261 +msgid "See the :ref:`feature comparison table ` of all Go connectors available." +msgstr "" diff --git a/locale/en/how-to/getting_started_net_box.pot b/locale/en/how-to/getting_started_net_box.pot new file mode 100644 index 0000000000..6072d57046 --- /dev/null +++ b/locale/en/how-to/getting_started_net_box.pot @@ -0,0 +1,209 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/getting_started_net_box.rst:4 +msgid "Getting started with net.box" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:6 +msgid "The tutorial shows how to work with some common ``net.box`` methods." +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:8 +msgid "For more information about the ``net.box`` module, check the :ref:`corresponding module reference `." +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:12 +msgid "Sandbox configuration" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:14 +msgid "The sandbox configuration for the tutorial assumes that:" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:16 +msgid "The Tarantool instance is running on ``localhost 127.0.0.1:3301``." +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:17 +msgid "There is a space named ``tester`` with a numeric primary key." +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:18 +msgid "The space contains a tuple with the key value = ``800``." +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:19 +msgid "The current user has read, write, and execute privileges." +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:21 +msgid "Use the commands below for a quick sandbox setup:" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:23 +msgid "box.cfg{listen = 3301}\n" +"s = box.schema.space.create('tester')\n" +"s:create_index('primary', {type = 'hash', parts = {1, 'unsigned'}})\n" +"t = s:insert({800, 'TEST'})\n" +"box.schema.user.grant('guest', 'read,write,execute', 'universe')" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:32 +msgid "Creating a net.box connection" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:34 +msgid "First, load the ``net.box`` module with the ``require('net.box')`` method:" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:36 +msgid "tarantool> net_box = require('net.box')" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:40 +msgid "The next step is to create a new connection. In ``net.box``, self-connection is pre-established. That is, ``conn = net_box.connect('localhost:3301')`` command can be replaced with the ``conn = net_box.self`` object call:" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:44 +msgid "tarantool> conn = net_box.self" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:48 +msgid "Then, make a ping:" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:50 +msgid "tarantool> conn:ping()\n" +"---\n" +"- true\n" +"..." +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:58 +msgid "Using data operations" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:60 +msgid "Select all tuples in the ``tester`` space where the key value is ``800``:" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:62 +msgid "tarantool> conn.space.tester:select{800}\n" +"---\n" +"- - [800, 'TEST']\n" +"..." +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:69 +msgid "Insert two tuples into the space:" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:71 +msgid "tarantool> conn.space.tester:insert({700, 'TEST700'})\n" +"---\n" +"- [700, 'TEST700']\n" +"...\n" +"tarantool> conn.space.tester:insert({600, 'TEST600'})\n" +"---\n" +"- [600, 'TEST600']\n" +"..." +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:82 +msgid "After the insert, there is one tuple where the key value is ``600``. To select this tuple, you can use the ``get()`` method. Unlike the ``select()`` command, ``get()`` returns only one tuple that satisfies the stated condition." +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:86 +msgid "tarantool> conn.space.tester:get({600})\n" +"---\n" +"- [600, 'TEST600']\n" +"..." +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:93 +msgid "To update the existing tuple, you can use either ``update()`` or ``upsert()``. The ``update()`` method can be used for assignment, arithmetic (if the field is numeric), cutting and pasting fragments of a field, and deleting or inserting a field." +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:97 +msgid "In this tutorial, the ``update()`` command is used to update the tuple identified by primary key value = ``800``. The operation assigns a new value to the second field in the tuple:" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:100 +msgid "tarantool> conn.space.tester:update(800, {{'=', 2, 'TEST800'}})\n" +"---\n" +"- [800, 'TEST800']\n" +"..." +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:107 +msgid "As for the ``upsert`` function, if there is an existing tuple that matches the key field of tuple, then the command has the same effect as ``update()``. Otherwise, the effect is equal to the ``insert()`` method." +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:111 +msgid "tarantool> conn.space.tester:upsert({500, 'TEST500'}, {{'=', 2, 'TEST'}})" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:115 +msgid "To delete a tuple where the key value is ``600``, run the ``delete()`` method below:" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:117 +msgid "tarantool> conn.space.tester:delete{600}\n" +"---\n" +"- [600, 'TEST600']\n" +"..." +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:124 +msgid "Then, replace the existing tuple with a new one:" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:126 +msgid "tarantool> conn.space.tester:replace{500, 'New data', 'Extra data'}\n" +"---\n" +"- [500, 'New data', 'Extra data']\n" +"..." +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:133 +msgid "Finally, select all tuples from the space:" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:135 +msgid "tarantool> conn.space.tester:select{}\n" +"---\n" +"- - [800, 'TEST800']\n" +" - [500, 'New data', 'Extra data']\n" +" - [700, 'TEST700']\n" +"..." +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:145 +msgid "Closing the connection" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:147 +msgid "In the end, close the connection when it is no longer needed:" +msgstr "" + +#: ../../doc/how-to/getting_started_net_box.rst:149 +msgid "tarantool> conn:close()\n" +"---\n" +"..." +msgstr "" diff --git a/locale/en/how-to/getting_started_php.pot b/locale/en/how-to/getting_started_php.pot new file mode 100644 index 0000000000..ffd1cd7ee9 --- /dev/null +++ b/locale/en/how-to/getting_started_php.pot @@ -0,0 +1,301 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/getting_started_php.rst:5 +msgid "Connecting from PHP" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:11 +msgid "Pre-requisites" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:13 +msgid "Before we proceed:" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:15 +msgid "`Install `__ the ``tarantool/client`` library." +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:18 +msgid ":ref:`Start ` Tarantool (locally or in Docker) and make sure that you have created and populated a database as we suggested :ref:`earlier `:" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:22 +msgid "box.cfg{listen = 3301}\n" +"s = box.schema.space.create('tester')\n" +"s:format({\n" +" {name = 'id', type = 'unsigned'},\n" +" {name = 'band_name', type = 'string'},\n" +" {name = 'year', type = 'unsigned'}\n" +" })\n" +"s:create_index('primary', {\n" +" type = 'hash',\n" +" parts = {'id'}\n" +" })\n" +"s:create_index('secondary', {\n" +" type = 'hash',\n" +" parts = {'band_name'}\n" +" })\n" +"s:insert{1, 'Roxette', 1986}\n" +"s:insert{2, 'Scorpions', 2015}\n" +"s:insert{3, 'Ace of Base', 1993}" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:45 +msgid "Please do not close the terminal window where Tarantool is running -- you'll need it soon." +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:48 +msgid "In order to connect to Tarantool as an administrator, reset the password for the ``admin`` user:" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:51 +msgid "box.schema.user.passwd('pass')" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:59 +msgid "Connecting to Tarantool" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:61 +msgid "To configure a connection to the Tarantool server, say this:" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:63 +msgid "use Tarantool\\Client\\Client;\n" +"\n" +"require __DIR__.'/vendor/autoload.php';\n" +"$client = Client::fromDefaults();" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:70 +msgid "The connection itself will be established at the first request. You can also specify the user name and password, if needed:" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:73 +msgid "$client = Client::fromOptions([\n" +" 'uri' => 'tcp://127.0.0.1:3301',\n" +" 'username' => '',\n" +" 'password' => ''\n" +"]);" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:81 +msgid "The default user is ``guest``." +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:87 +msgid "Manipulating the data" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:89 +msgid "A :term:`space` is a container for :term:`tuples `. To access a space as a named object, use ``getSpace``:" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:92 +msgid "$tester = $client->getSpace('tester');" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:100 +msgid "Inserting data" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:102 +msgid "To insert a tuple into a space, use ``insert``:" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:104 +msgid "$result = $tester->insert([4, 'ABBA', 1972]);" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:112 +msgid "Querying data" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:114 +msgid "Let's start with selecting a tuple by the primary key (in our example, this is the index named ``primary``, based on the ``id`` field of each tuple). Use ``select``:" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:118 +msgid "use Tarantool\\Client\\Schema\\Criteria;\n" +"\n" +"$result = $tester->select(Criteria::key([4]));\n" +"printf(json_encode($result));" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:125 +msgid "[[4, 'ABBA', 1972]]" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:129 +msgid "Next, select tuples by a secondary key. For this purpose, you need to specify the number *or* name of the index." +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:132 +msgid "First off, select tuples using the index number:" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:134 +msgid "$result = $tester->select(Criteria::index(1)->andKey(['Scorpions']));\n" +"printf(json_encode($result));" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:139 +#: ../../doc/how-to/getting_started_php.rst:154 +msgid "[2, 'Scorpions', 2015]" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:143 +msgid "(We say ``index(1)`` because index numbers in Tarantool start with 0, and we're using our second index here.)" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:146 +msgid "Now make a similar query by the index name and make sure that the result is the same:" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:149 +msgid "$result = $tester->select(Criteria::index('secondary')->andKey(['Scorpions']));\n" +"printf(json_encode($result));" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:158 +msgid "Finally, select all the tuples in a space via a ``select``:" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:160 +msgid "$result = $tester->select(Criteria::allIterator());" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:168 +msgid "Updating data" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:170 +msgid "Update a :term:`field` value using ``update``:" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:172 +msgid "use Tarantool\\Client\\Schema\\Operations;\n" +"\n" +"$result = $tester->update([4], Operations::set(1, 'New group')->andAdd(2, 2));" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:178 +msgid "This updates the value of field ``1`` and increases the value of field ``2`` in the tuple with ``id = 4``. If a tuple with this ``id`` doesn't exist, Tarantool will return an error." +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:182 +msgid "Now use ``replace`` to totally replace the tuple that matches the primary key. If a tuple with this primary key doesn't exist, Tarantool will do nothing." +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:186 +msgid "$result = $tester->replace([4, 'New band', 2015]);" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:190 +msgid "You can also update the data using ``upsert`` that works similarly to ``update``, but creates a new tuple if the old one was not found." +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:193 +msgid "use Tarantool\\Client\\Schema\\Operations;\n" +"\n" +"$tester->upsert([4, 'Another band', 2000], Operations::add(2, 5));" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:199 +msgid "This increases by 5 the value of field ``2`` in the tuple with ``id = 4``, or inserts the tuple ``(4, \"Another band\", 2000)`` if a tuple with this ``id`` doesn't exist." +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:207 +msgid "Deleting data" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:209 +msgid "To delete a tuple, use ``delete(primary_key)``:" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:211 +msgid "$result = $tester->delete([4]);" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:215 +msgid "To delete all tuples in a space (or to delete an entire space), use ``call``. We'll focus on this function in more detail in the :ref:`next ` section." +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:219 +msgid "To delete all tuples in a space, call ``space:truncate``:" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:221 +msgid "$result = $client->call('box.space.tester:truncate');" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:225 +msgid "To delete an entire space, call ``space:drop``. This requires connecting to Tarantool as the ``admin`` user:" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:228 +msgid "$result = $client->call('box.space.tester:drop');" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:236 +msgid "Executing stored procedures" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:238 +msgid "Switch to the terminal window where Tarantool is running." +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:242 +msgid "If you don't have a terminal window with remote connection to Tarantool, check out these guides:" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:245 +msgid ":ref:`connecting to a local Tarantool instance `" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:246 +msgid ":ref:`attaching to a Tarantool instance that runs in a Docker container `" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:248 +msgid "Define a simple Lua function:" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:250 +msgid "function sum(a, b)\n" +" return a + b\n" +"end" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:256 +msgid "Now we have a Lua function defined in Tarantool. To invoke this function from ``php``, use ``call``:" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:259 +msgid "$result = $client->call('sum', 3, 2);" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:263 +msgid "To send bare Lua code for execution, use ``eval``:" +msgstr "" + +#: ../../doc/how-to/getting_started_php.rst:265 +msgid "$result = $client->evaluate('return 4 + 5');" +msgstr "" diff --git a/locale/en/how-to/getting_started_python.pot b/locale/en/how-to/getting_started_python.pot new file mode 100644 index 0000000000..e2b232a6d9 --- /dev/null +++ b/locale/en/how-to/getting_started_python.pot @@ -0,0 +1,292 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/getting_started_python.rst:5 +msgid "Connecting from Python" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:11 +msgid "Pre-requisites" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:13 +msgid "Before we proceed:" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:15 +msgid "`Install `__ the ``tarantool`` module. We recommend using ``python3`` and ``pip3``." +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:18 +msgid ":ref:`Start ` Tarantool (locally or in Docker) and make sure that you have created and populated a database as we suggested :ref:`earlier `:" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:22 +msgid "box.cfg{listen = 3301}\n" +"s = box.schema.space.create('tester')\n" +"s:format({\n" +" {name = 'id', type = 'unsigned'},\n" +" {name = 'band_name', type = 'string'},\n" +" {name = 'year', type = 'unsigned'}\n" +" })\n" +"s:create_index('primary', {\n" +" type = 'hash',\n" +" parts = {'id'}\n" +" })\n" +"s:create_index('secondary', {\n" +" type = 'hash',\n" +" parts = {'band_name'}\n" +" })\n" +"s:insert{1, 'Roxette', 1986}\n" +"s:insert{2, 'Scorpions', 2015}\n" +"s:insert{3, 'Ace of Base', 1993}" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:45 +msgid "Please do not close the terminal window where Tarantool is running -- you'll need it soon." +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:48 +msgid "In order to connect to Tarantool as an administrator, reset the password for the ``admin`` user:" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:51 +msgid "box.schema.user.passwd('pass')" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:59 +msgid "Connecting to Tarantool" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:61 +msgid "To get connected to the Tarantool server, say this:" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:63 +msgid ">>> import tarantool\n" +">>> connection = tarantool.connect(\"localhost\", 3301)" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:68 +msgid "You can also specify the user name and password, if needed:" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:70 +msgid ">>> tarantool.connect(\"localhost\", 3301, user=username, password=password)" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:74 +msgid "The default user is ``guest``." +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:80 +msgid "Manipulating the data" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:82 +msgid "A :term:`space` is a container for :term:`tuples `. To access a space as a named object, use ``connection.space``:" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:85 +msgid ">>> tester = connection.space('tester')" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:93 +msgid "Inserting data" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:95 +msgid "To insert a tuple into a space, use ``insert``:" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:97 +msgid ">>> tester.insert((4, 'ABBA', 1972))\n" +"[4, 'ABBA', 1972]" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:106 +msgid "Querying data" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:108 +msgid "Let's start with selecting a tuple by the primary key (in our example, this is the index named ``primary``, based on the ``id`` field of each tuple). Use ``select``:" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:112 +msgid ">>> tester.select(4)\n" +"[4, 'ABBA', 1972]" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:117 +msgid "Next, select tuples by a secondary key. For this purpose, you need to specify the number *or* name of the index." +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:120 +msgid "First off, select tuples using the index number:" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:122 +msgid ">>> tester.select('Scorpions', index=1)\n" +"[2, 'Scorpions', 2015]" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:127 +msgid "(We say ``index=1`` because index numbers in Tarantool start with 0, and we're using our second index here.)" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:130 +msgid "Now make a similar query by the index name and make sure that the result is the same:" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:133 +msgid ">>> tester.select('Scorpions', index='secondary')\n" +"[2, 'Scorpions', 2015]" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:138 +msgid "Finally, select all the tuples in a space via a ``select`` with no arguments:" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:141 +msgid ">>> tester.select()" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:149 +msgid "Updating data" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:151 +msgid "Update a :term:`field` value using ``update``:" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:153 +msgid ">>> tester.update(4, [('=', 1, 'New group'), ('+', 2, 2)])" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:157 +msgid "This updates the value of field ``1`` and increases the value of field ``2`` in the tuple with ``id = 4``. If a tuple with this ``id`` doesn't exist, Tarantool will return an error." +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:161 +msgid "Now use ``replace`` to totally replace the tuple that matches the primary key. If a tuple with this primary key doesn't exist, Tarantool will do nothing." +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:165 +msgid ">>> tester.replace((4, 'New band', 2015))" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:169 +msgid "You can also update the data using ``upsert`` that works similarly to ``update``, but creates a new tuple if the old one was not found." +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:172 +msgid ">>> tester.upsert((4, 'Another band', 2000), [('+', 2, 5)])" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:176 +msgid "This increases by 5 the value of field ``2`` in the tuple with ``id = 4``, or inserts the tuple ``(4, \"Another band\", 2000)`` if a tuple with this ``id`` doesn't exist." +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:184 +msgid "Deleting data" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:186 +msgid "To delete a tuple, use ``delete(primary_key)``:" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:188 +msgid ">>> tester.delete(4)\n" +"[4, 'New group', 2012]" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:193 +msgid "To delete all tuples in a space (or to delete an entire space), use ``call``. We'll focus on this function in more detail in the :ref:`next ` section." +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:197 +msgid "To delete all tuples in a space, call ``space:truncate``:" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:199 +msgid ">>> connection.call('box.space.tester:truncate', ())" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:203 +msgid "To delete an entire space, call ``space:drop``. This requires connecting to Tarantool as the ``admin`` user:" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:206 +msgid ">>> connection.call('box.space.tester:drop', ())" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:214 +msgid "Executing stored procedures" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:216 +msgid "Switch to the terminal window where Tarantool is running." +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:220 +msgid "If you don't have a terminal window with remote connection to Tarantool, check out these guides:" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:223 +msgid ":ref:`connecting to a local Tarantool instance `" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:224 +msgid ":ref:`attaching to a Tarantool instance that runs in a Docker container `" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:226 +msgid "Define a simple Lua function:" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:228 +msgid "function sum(a, b)\n" +" return a + b\n" +"end" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:234 +msgid "Now we have a Lua function defined in Tarantool. To invoke this function from ``python``, use ``call``:" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:237 +msgid ">>> connection.call('sum', (3, 2))\n" +"5" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:242 +msgid "To send bare Lua code for execution, use ``eval``:" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:244 +msgid ">>> connection.eval('return 4 + 5')\n" +"9" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:253 +msgid "Feature comparison" +msgstr "" + +#: ../../doc/how-to/getting_started_python.rst:255 +msgid "See the :ref:`feature comparison table ` of all Python connectors available." +msgstr "" diff --git a/locale/en/how-to/index.pot b/locale/en/how-to/index.pot new file mode 100644 index 0000000000..990bc54c41 --- /dev/null +++ b/locale/en/how-to/index.pot @@ -0,0 +1,33 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/index.rst:16 +msgid "Creating Tarantool database" +msgstr "" + +#: ../../doc/how-to/index.rst:8 +msgid "How-to guides" +msgstr "" + +#: ../../doc/how-to/index.rst:10 +msgid "This chapter contains practical examples as well as tutorials for those who would like to dig deeper into Tarantool usage." +msgstr "" + +#: ../../doc/how-to/index.rst:13 +msgid "If you are new to Tarantool, please see our :ref:`Getting Started guides ` first." +msgstr "" diff --git a/locale/en/how-to/other/index.pot b/locale/en/how-to/other/index.pot new file mode 100644 index 0000000000..8bdc43cec9 --- /dev/null +++ b/locale/en/how-to/other/index.pot @@ -0,0 +1,21 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/other/index.rst:2 +msgid "More guides" +msgstr "" diff --git a/locale/en/how-to/other/iproto.pot b/locale/en/how-to/other/iproto.pot new file mode 100644 index 0000000000..d23de488be --- /dev/null +++ b/locale/en/how-to/other/iproto.pot @@ -0,0 +1,357 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/other/iproto.rst:5 +msgid "Understanding the binary protocol" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:8 +msgid "Overview" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:10 +msgid "To communicate with each other, Tarantool instances use a binary protocol called iproto. To learn more, see the :ref:`Binary protocol ` section." +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:13 +msgid "In this set of examples, the user will be looking at binary code transferred via iproto. The code is intercepted with ``tcpdump``, a monitoring utility." +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:17 +msgid "Examples" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:19 +msgid "To follow the examples in this section, get a single Linux computer and start three command-line shells (\"terminals\")." +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:22 +msgid "-- On terminal #1, Start monitoring port 3302 with `tcpdump `_: |br|" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:24 +msgid "sudo tcpdump -i lo 'port 3302' -X" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:28 +msgid "On terminal #2, start a server with:" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:30 +msgid "box.cfg{listen=3302}\n" +"box.schema.space.create('tspace')\n" +"box.space.tspace:create_index('I')\n" +"box.space.tspace:insert{280}\n" +"box.schema.user.grant('guest','read,write,execute,create,drop','universe')" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:38 +msgid "On terminal #3, start another server, which will act as a client, with:" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:40 +msgid "box.cfg{}\n" +"net_box = require('net.box')\n" +"conn = net_box.connect('localhost:3302')" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:47 +msgid "IPROTO_SELECT" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:49 +msgid "On terminal #3, run the following:" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:51 +msgid "conn.space.tspace:select(280)" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:55 +msgid "Now look at what tcpdump shows for the job connecting to 3302 -- the \"request\". After the words \"length 32\" is a packet that ends with these 32 bytes (we have added indented comments):" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:59 +msgid "ce 00 00 00 1b MP_UINT = decimal 27 = number of bytes after this\n" +"82 MP_MAP, size 2 (we'll call this \"Main-Map\")\n" +"01 IPROTO_SYNC (Main-Map Item#1)\n" +"04 MP_INT = 4 = number that gets incremented with each request\n" +"00 IPROTO_REQUEST_TYPE (Main-Map Item#2)\n" +"01 IPROTO_SELECT\n" +"86 MP_MAP, size 6 (we'll call this \"Select-Map\")\n" +"10 IPROTO_SPACE_ID (Select-Map Item#1)\n" +"cd 02 00 MP_UINT = decimal 512 = id of tspace (could be larger)\n" +"11 IPROTO_INDEX_ID (Select-Map Item#2)\n" +"00 MP_INT = 0 = id of index within tspace\n" +"14 IPROTO_ITERATOR (Select-Map Item#3)\n" +"00 MP_INT = 0 = Tarantool iterator_type.h constant ITER_EQ\n" +"13 IPROTO_OFFSET (Select-Map Item#4)\n" +"00 MP_INT = 0 = amount to offset\n" +"12 IPROTO_LIMIT (Select-Map Item#5)\n" +"ce ff ff ff ff MP_UINT = 4294967295 = biggest possible limit\n" +"20 IPROTO_KEY (Select-Map Item#6)\n" +"91 MP_ARRAY, size 1 (we'll call this \"Key-Array\")\n" +"cd 01 18 MP_UINT = 280 (Select-Map Item#6, Key-Array Item#1)\n" +" -- 280 is the key value that we are searching for" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:83 +msgid "Now read the source code file `net_box.c `_ and skip to the line ``netbox_encode_select(lua_State *L)``. From the comments and from simple function calls like ``mpstream_encode_uint(&stream, IPROTO_SPACE_ID);`` you will be able to see how net_box put together the packet contents that you have just observed with tcpdump." +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:91 +msgid "There are libraries for reading and writing MessagePack objects. C programmers sometimes include `msgpuck.h `_." +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:94 +msgid "Now you know how Tarantool itself makes requests with the binary protocol. When in doubt about a detail, consult ``net_box.c`` -- it has routines for each request. Some :ref:`connectors ` have similar code." +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:99 +msgid "IPROTO_UPDATE" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:101 +msgid "For an IPROTO_UPDATE example, suppose a user changes field #2 in tuple #2 in space #256 to ``'BBBB'``. The body will look like this: (notice that in this case there is an extra map item IPROTO_INDEX_BASE, to emphasize that field numbers start with 1, which is optional and can be omitted):" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:107 +msgid "04 IPROTO_UPDATE\n" +"85 IPROTO_MAP, size 5\n" +"10 IPROTO_SPACE_ID, Map Item#1\n" +"cd 02 00 MP_UINT 256\n" +"11 IPROTO_INDEX_ID, Map Item#2\n" +"00 MP_INT 0 = primary-key index number\n" +"15 IPROTO_INDEX_BASE, Map Item#3\n" +"01 MP_INT = 1 i.e. field numbers start at 1\n" +"21 IPROTO_TUPLE, Map Item#4\n" +"91 MP_ARRAY, size 1, for array of operations\n" +"93 MP_ARRAY, size 3\n" +"a1 3d MP_STR = OPERATOR = '='\n" +"02 MP_INT = FIELD_NO = 2\n" +"a5 42 42 42 42 42 MP_STR = VALUE = 'BBBB'\n" +"20 IPROTO_KEY, Map Item#5\n" +"91 MP_ARRAY, size 1, for array of key values\n" +"02 MP_UINT = primary-key value = 2" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:128 +msgid "IPROTO_EXECUTE" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:130 +msgid "Byte codes for the :ref:`IPROTO_EXECUTE ` example:" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:132 +msgid "0b IPROTO_EXECUTE\n" +"83 MP_MAP, size 3\n" +"43 IPROTO_STMT_ID Map Item#1\n" +"ce d7 aa 74 1b MP_UINT value of n.stmt_id\n" +"41 IPROTO_SQL_BIND Map Item#2\n" +"92 MP_ARRAY, size 2\n" +"01 MP_INT = 1 = value for first parameter\n" +"a1 61 MP_STR = 'a' = value for second parameter\n" +"2b IPROTO_OPTIONS Map Item#3\n" +"90 MP_ARRAY, size 0 (there are no options)" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:146 +msgid "IPROTO_INSERT" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:148 +msgid "Byte codes for the response to the :codenormal:`box.space.`:codeitalic:`space-name`:codenormal:`:insert{6}` example:" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:151 +msgid "ce 00 00 00 20 MP_UINT = HEADER AND BODY SIZE\n" +"83 MP_MAP, size 3\n" +"00 IPROTO_REQUEST_TYPE\n" +"ce 00 00 00 00 MP_UINT = IPROTO_OK\n" +"01 IPROTO_SYNC\n" +"cf 00 00 00 00 00 00 00 53 MP_UINT = sync value\n" +"05 IPROTO_SCHEMA_VERSION\n" +"ce 00 00 00 68 MP_UINT = schema version\n" +"81 MP_MAP, size 1\n" +"30 IPROTO_DATA\n" +"dd 00 00 00 01 MP_ARRAY, size 1 (row count)\n" +"91 MP_ARRAY, size 1 (field count)\n" +"06 MP_INT = 6 = the value that was inserted" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:168 +msgid "IPROTO_EVAL" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:170 +msgid "Byte codes for the response to the ``conn:eval([[box.schema.space.create('_space');]])`` example:" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:173 +msgid "ce 00 00 00 3b MP_UINT = HEADER AND BODY SIZE\n" +"83 MP_MAP, size 3 (i.e. 3 items in header)\n" +" 00 IPROTO_REQUEST_TYPE\n" +" ce 00 00 80 0a MP_UINT = hexadecimal 800a\n" +" 01 IPROTO_SYNC\n" +" cf 00 00 00 00 00 00 00 26 MP_UINT = sync value\n" +" 05 IPROTO_SCHEMA_VERSION\n" +" ce 00 00 00 78 MP_UINT = schema version value\n" +" 81 MP_MAP, size 1\n" +" 31 IPROTO_ERROR_24\n" +" db 00 00 00 1d 53 70 61 63 etc. MP_STR = \"Space '_space' already exists\"" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:188 +msgid "Creating a table with IPROTO_EXECUTE" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:190 +msgid "Byte codes, if we use the same net.box connection that we used in the beginning and we say |br| ``conn:execute([[CREATE TABLE t1 (dd INT PRIMARY KEY AUTOINCREMENT, дд STRING COLLATE \"unicode\");]])`` |br| ``conn:execute([[INSERT INTO t1 VALUES (NULL, 'a'), (NULL, 'b');]])`` |br| and we watch what tcpdump displays, we will see two noticeable things: (1) the CREATE statement caused a schema change so the response has a new IPROTO_SCHEMA_VERSION value and the body includes the new contents of some system tables (caused by requests from net.box which users will not see); (2) the final bytes of the response to the INSERT will be:" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:201 +msgid "81 MP_MAP, size 1\n" +"42 IPROTO_SQL_INFO\n" +"82 MP_MAP, size 2\n" +"00 Tarantool constant (not in iproto_constants.h) = SQL_INFO_ROW_COUNT\n" +"02 1 = row count\n" +"01 Tarantool constant (not in iproto_constants.h) = SQL_INFO_AUTOINCREMENT_ID\n" +"92 MP_ARRAY, size 2\n" +"01 first autoincrement number\n" +"02 second autoincrement number" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:214 +msgid "SELECT with SQL" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:216 +msgid "Byte codes for the SQL SELECT example, if we ask for full metadata by saying |br| :code:`conn.space._session_settings:update('sql_full_metadata', {{'=', 'value', true}})` |br| and we select the two rows from the table that we just created |br| :code:`conn:execute([[SELECT dd, дд AS д FROM t1;]])` |br| then tcpdump will show this response, after the header:" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:223 +msgid "82 MP_MAP, size 2 (i.e. metadata and rows)\n" +"32 IPROTO_METADATA\n" +"92 MP_ARRAY, size 2 (i.e. 2 columns)\n" +"85 MP_MAP, size 5 (i.e. 5 items for column#1)\n" +"00 a2 44 44 IPROTO_FIELD_NAME and 'DD'\n" +"01 a7 69 6e 74 65 67 65 72 IPROTO_FIELD_TYPE and 'integer'\n" +"03 c2 IPROTO_FIELD_IS_NULLABLE and false\n" +"04 c3 IPROTO_FIELD_IS_AUTOINCREMENT and true\n" +"05 c0 PROTO_FIELD_SPAN and nil\n" +"85 MP_MAP, size 5 (i.e. 5 items for column#2)\n" +"00 a2 d0 94 IPROTO_FIELD_NAME and 'Д' upper case\n" +"01 a6 73 74 72 69 6e 67 IPROTO_FIELD_TYPE and 'string'\n" +"02 a7 75 6e 69 63 6f 64 65 IPROTO_FIELD_COLL and 'unicode'\n" +"03 c3 IPROTO_FIELD_IS_NULLABLE and true\n" +"05 a4 d0 b4 d0 b4 IPROTO_FIELD_SPAN and 'дд' lower case\n" +"30 IPROTO_DATA\n" +"92 MP_ARRAY, size 2\n" +"92 MP_ARRAY, size 2\n" +"01 MP_INT = 1 i.e. contents of row#1 column#1\n" +"a1 61 MP_STR = 'a' i.e. contents of row#1 column#2\n" +"92 MP_ARRAY, size 2\n" +"02 MP_INT = 2 i.e. contents of row#2 column#1\n" +"a1 62 MP_STR = 'b' i.e. contents of row#2 column#2" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:250 +msgid "IPROTO_PREPARE" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:252 +msgid "Byte code for the SQL PREPARE example. If we said |br| :code:`conn:prepare([[SELECT dd, дд AS д FROM t1;]])` |br| then tcpdump would show almost the same response, but there would be no IPROTO_DATA. Instead, additional items will appear:" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:257 +msgid "34 IPROTO_BIND_COUNT\n" +"00 MP_UINT = 0\n" +"\n" +"33 IPROTO_BIND_METADATA\n" +"90 MP_ARRAY, size 0" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:265 +msgid "``MP_UINT = 0`` and ``MP_ARRAY`` has size 0 because there are no parameters to bind. Full output:" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:268 +msgid "84 MP_MAP, size 4\n" +"43 IPROTO_STMT_ID\n" +"ce c2 3c 2c 1e MP_UINT = statement id\n" +"34 IPROTO_BIND_COUNT\n" +"00 MP_INT = 0 = number of parameters to bind\n" +"33 IPROTO_BIND_METADATA\n" +"90 MP_ARRAY, size 0 = there are no parameters to bind\n" +"32 IPROTO_METADATA\n" +"92 MP_ARRAY, size 2 (i.e. 2 columns)\n" +"85 MP_MAP, size 5 (i.e. 5 items for column#1)\n" +"00 a2 44 44 IPROTO_FIELD_NAME and 'DD'\n" +"01 a7 69 6e 74 65 67 65 72 IPROTO_FIELD_TYPE and 'integer'\n" +"03 c2 IPROTO_FIELD_IS_NULLABLE and false\n" +"04 c3 IPROTO_FIELD_IS_AUTOINCREMENT and true\n" +"05 c0 PROTO_FIELD_SPAN and nil\n" +"85 MP_MAP, size 5 (i.e. 5 items for column#2)\n" +"00 a2 d0 94 IPROTO_FIELD_NAME and 'Д' upper case\n" +"01 a6 73 74 72 69 6e 67 IPROTO_FIELD_TYPE and 'string'\n" +"02 a7 75 6e 69 63 6f 64 65 IPROTO_FIELD_COLL and 'unicode'\n" +"03 c3 IPROTO_FIELD_IS_NULLABLE and true\n" +"05 a4 d0 b4 d0 b4 IPROTO_FIELD_SPAN and 'дд' lower case" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:293 +msgid "Heartbeat" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:295 +msgid "Byte code for the :ref:`heartbeat ` example. The master might send this body:" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:297 +msgid "83 MP_MAP, size 3\n" +"00 Main-Map Item #1 IPROTO_REQUEST_TYPE\n" +"00 MP_UINT = 0\n" +"02 Main-Map Item #2 IPROTO_REPLICA_ID\n" +"02 MP_UINT = 2 = id\n" +"04 Main-Map Item #3 IPROTO_TIMESTAMP\n" +"cb MP_DOUBLE (MessagePack \"Float 64\")\n" +"41 d7 ba 06 7b 3a 03 21 8-byte timestamp\n" +"81 MP_MAP (body), size 1\n" +"5a Body Map Item #1 IPROTO_VCLOCK_SYNC\n" +"14 MP_UINT = 20 (vclock sync value)" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:311 +msgid "Byte code for the :ref:`heartbeat ` example. The replica might send back this body:" +msgstr "" + +#: ../../doc/how-to/other/iproto.rst:313 +msgid "81 MP_MAP, size 1\n" +"00 Main-Map Item #1 IPROTO_REQUEST_TYPE\n" +"00 MP_UINT = 0 = IPROTO_OK\n" +"83 MP_MAP (body), size 3\n" +"26 Body Map Item #1 IPROTO_VCLOCK\n" +"81 MP_MAP, size 1 (vclock of 1 component)\n" +"01 MP_UINT = 1 = id (part 1 of vclock)\n" +"06 MP_UINT = 6 = lsn (part 2 of vclock)\n" +"5a Body Map Item #2 IPROTO_VCLOCK_SYNC\n" +"14 MP_UINT = 20 (vclock sync value)\n" +"53 Body Map Item #3 IPROTO_TERM\n" +"31 MP_UINT = 49 (term value)" +msgstr "" diff --git a/locale/en/how-to/other/libslave.pot b/locale/en/how-to/other/libslave.pot new file mode 100644 index 0000000000..73b7ac32b8 --- /dev/null +++ b/locale/en/how-to/other/libslave.pot @@ -0,0 +1,277 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/other/libslave.rst:5 +msgid "libslave tutorial" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:7 +msgid "``libslave`` is a C++ library for reading data changes done by MysQL and, optionally, writing them to a Tarantool database. It works by acting as a replication slave. The MySQL server writes data-change information to a \"binary log\", and transfers the information to any client that says \"I want to see the information starting with this file and this record, continuously\". So, ``libslave`` is primarily good for making a Tarantool database replica (much faster than using a conventional MySQL slave server), and for keeping track of data changes so they can be searched." +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:18 +msgid "We will not go into the many details here -- the `API documentation `_ has them. We will only show an exercise: a minimal program that uses the library." +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:24 +msgid "Use a test machine. Do not use a production machine." +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:26 +msgid "STEP 1: Make sure you have:" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:28 +msgid "a recent version of Linux (versions such as Ubuntu 14.04 will not do)," +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:29 +msgid "a recent version of MySQL 5.6 or MySQL 5.7 server (MariaDB will not do)," +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:30 +msgid "MySQL client development package. For example, on Ubuntu you can download it with this command:" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:33 +msgid "$ sudo apt-get install mysql-client-core-5.7" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:37 +msgid "STEP 2: Download ``libslave``." +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:39 +msgid "The recommended source is https://github.com/tarantool/libslave/. Downloads include the source code only." +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:42 +msgid "$ sudo apt-get install libboost-all-dev\n" +"$ cd ~\n" +"$ git clone https://github.com/tarantool/libslave.git tarantool-libslave\n" +"$ cd tarantool-libslave\n" +"$ git submodule init\n" +"$ git submodule update\n" +"$ cmake .\n" +"$ make" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:53 +msgid "If you see an error message mentioning the word \"vector\", edit ``field.h`` and add this line:" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:56 +msgid "#include " +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:60 +msgid "STEP 3: Start the MySQL server. On the command line, add appropriate switches for doing replication. For example:" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:63 +msgid "$ mysqld --log-bin=mysql-bin --server-id=1" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:67 +msgid "STEP 4: For purposes of this exercise, we are assuming you have:" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:69 +msgid "a \"root\" user with password \"root\" with privileges," +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:70 +msgid "a \"test\" database with a table named \"test\"," +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:71 +msgid "a binary log named \"mysql-bin\"," +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:72 +msgid "a server with server id = 1." +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:74 +msgid "The values are hard-coded in the program, though of course you can change the program -- it's easy to see their settings." +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:77 +msgid "STEP 5: Look at the program:" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:79 +msgid "#include \n" +"#include \n" +"#include \n" +"#include \"Slave.h\"\n" +"#include \"DefaultExtState.h\"\n" +"\n" +"slave::Slave* sl = NULL;\n" +"\n" +"void callback(const slave::RecordSet& event) {\n" +" slave::Position sBinlogPos = sl->getLastBinlogPos();\n" +" switch (event.type_event) {\n" +" case slave::RecordSet::Update: std::cout << \"UPDATE\" << \"\\n\"; break;\n" +" case slave::RecordSet::Delete: std::cout << \"DELETE\" << \"\\n\"; break;\n" +" case slave::RecordSet::Write: std::cout << \"INSERT\" << \"\\n\"; break;\n" +" default: break;\n" +" }\n" +"}\n" +"\n" +"bool isStopping()\n" +"{\n" +" return 0;\n" +"}\n" +"\n" +"int main(int argc, char** argv)\n" +"{\n" +" slave::MasterInfo masterinfo;\n" +" slave::Position position(\"mysql-bin\", 0);\n" +" masterinfo.conn_options.mysql_host = \"127.0.0.1\";\n" +" masterinfo.conn_options.mysql_port = 3306;\n" +" masterinfo.conn_options.mysql_user = \"root\";\n" +" masterinfo.conn_options.mysql_pass = \"root\";\n" +" bool error = false;\n" +" try {\n" +" slave::DefaultExtState sDefExtState;\n" +" slave::Slave slave(masterinfo, sDefExtState);\n" +" sl = &slave;\n" +" sDefExtState.setMasterPosition(position);\n" +" slave.setCallback(\"test\", \"test\", callback);\n" +" slave.init();\n" +" slave.createDatabaseStructure();\n" +" try {\n" +" slave.get_remote_binlog(isStopping);\n" +" } catch (std::exception& ex) {\n" +" std::cout << \"Error reading: \" << ex.what() << std::endl;\n" +" error = true;\n" +" }\n" +" } catch (std::exception& ex) {\n" +" std::cout << \"Error initializing: \" << ex.what() << std::endl;\n" +" error = true;\n" +" }\n" +" return 0;\n" +"}" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:134 +msgid "Everything unnecessary has been stripped so that you can see quickly how it works. At the start of ``main()``, there are some settings used for connecting -- host, port, user, password. Then there is an initialization call with the binary log file name = \"mysql-bin\". Pay particular attention to the ``setCallback`` statement, which passes database name = \"test\", table name = \"test\", and callback function address = callback. The program will be looping and invoking this callback function. See how, earlier in the program, the callback function prints \"UPDATE\" or \"DELETE\" or \"INSERT\" depending on what is passed to it." +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:145 +msgid "STEP 5: Put the program in the ``tarantool-libslave`` directory and name it ``example.cpp``." +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:148 +msgid "Step 6: Compile and build:" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:150 +msgid "$ g++ -I/tarantool-libslave/include example.cpp -o example libslave_a.a -ldl -lpthread" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:156 +msgid "Replace ``tarantool-libslave/include`` with the full directory name." +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:158 +msgid "Notice that the name of the static library is ``libslave_a.a``, not ``libslave.a``." +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:161 +msgid "Step 7: Run:" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:163 +msgid "$ ./example" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:167 +msgid "The result will be nothing -- the program is looping, waiting for the MySQL server to write to the replication binary log." +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:170 +msgid "Step 8: Start a MySQL client program -- any client program will do. Enter these statements:" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:173 +msgid "USE test\n" +"INSERT INTO test VALUES ('A');\n" +"INSERT INTO test VALUES ('B');\n" +"DELETE FROM test;" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:180 +msgid "Watch what happens in ``example.cpp`` output -- it displays:" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:182 +msgid "INSERT\n" +"INSERT\n" +"DELETE\n" +"DELETE" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:189 +msgid "This is row-based replication, so you see two DELETEs, because there are two rows." +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:192 +msgid "What the exercise has shown is:" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:194 +msgid "the library can be built, and" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:195 +msgid "programs that use the library can access everything that the MySQL server dumps." +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:198 +msgid "For the many details and examples of usage in the field, see:" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:0 +msgid "Our downloadable ``libslave`` version:" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:0 +msgid "https://github.com/tarantool/libslave" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:0 +msgid "The version it was forked from (with a different README):" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:0 +msgid "https://github.com/vozbu/libslave/wiki/API" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:206 +msgid "`How to speed up your MySQL with replication to in-memory database `_ article" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:208 +msgid "`Replicating data from MySQL to Tarantool `_ article (in Russian)" +msgstr "" + +#: ../../doc/how-to/other/libslave.rst:210 +msgid "`Asynchronous replication uncensored `_ article (in Russian)" +msgstr "" diff --git a/locale/en/how-to/replication/index.pot b/locale/en/how-to/replication/index.pot new file mode 100644 index 0000000000..781ad2fb72 --- /dev/null +++ b/locale/en/how-to/replication/index.pot @@ -0,0 +1,21 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-07 07:21+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/replication/index.rst:5 +msgid "Replication tutorials" +msgstr "" diff --git a/locale/en/how-to/replication/repl_add_instances.pot b/locale/en/how-to/replication/repl_add_instances.pot new file mode 100644 index 0000000000..45eeb537d7 --- /dev/null +++ b/locale/en/how-to/replication/repl_add_instances.pot @@ -0,0 +1,179 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/replication/repl_add_instances.rst:4 +msgid "Adding instances" +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:8 +msgid "This tutorial is intended as a follow-up to the :ref:`replication bootstrapping ` guide. It continues building on the examples from that page. It is recommended that you complete the bootstrapping guide before you proceed." +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:15 +msgid "Adding a replica" +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:20 +msgid "To add a second **replica** instance to the **master-replica** set from our :ref:`bootstrapping example `, we need an analog of the instance file that we created for the first replica in that set:" +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:24 +msgid "-- instance file for replica #2\n" +"box.cfg{\n" +" listen = 3301,\n" +" replication = {'replicator:password@192.168.0.101:3301', -- master URI\n" +" 'replicator:password@192.168.0.102:3301', -- replica #1 URI\n" +" 'replicator:password@192.168.0.103:3301'}, -- replica #2 URI\n" +" read_only = true\n" +"}\n" +"box.once(\"schema\", function()\n" +" box.schema.user.create('replicator', {password = 'password'})\n" +" box.schema.user.grant('replicator', 'replication') -- grant replication role\n" +" box.schema.space.create(\"test\")\n" +" box.space.test:create_index(\"primary\")\n" +" print('box.once executed on replica #2')\n" +"end)" +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:42 +msgid "Here we add the URI of replica #2 to the :ref:`replication ` parameter, so now it contains three URIs." +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:45 +msgid "After we launch the new replica instance, it gets connected to the master instance and retrieves the master's write-ahead-log and snapshot files:" +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:48 +msgid "$ # launching replica #2\n" +"$ tarantool replica2.lua\n" +"2017-06-14 14:54:33.927 [46945] main/101/replica2.lua C> version 1.7.4-52-g980d30092\n" +"2017-06-14 14:54:33.927 [46945] main/101/replica2.lua C> log level 5\n" +"2017-06-14 14:54:33.928 [46945] main/101/replica2.lua I> mapping 268435456 bytes for tuple arena...\n" +"2017-06-14 14:54:33.930 [46945] main/104/applier/replicator@192.168.0.10 I> remote master is 1.7.4 at 192.168.0.101:3301\n" +"2017-06-14 14:54:33.930 [46945] main/104/applier/replicator@192.168.0.10 I> authenticated\n" +"2017-06-14 14:54:33.930 [46945] main/101/replica2.lua I> bootstrapping replica from 192.168.0.101:3301\n" +"2017-06-14 14:54:33.933 [46945] main/104/applier/replicator@192.168.0.10 I> initial data received\n" +"2017-06-14 14:54:33.933 [46945] main/104/applier/replicator@192.168.0.10 I> final data received\n" +"2017-06-14 14:54:33.934 [46945] snapshot/101/main I> saving snapshot `/var/lib/tarantool/replica2/00000000000000000010.snap.inprogress'\n" +"2017-06-14 14:54:33.934 [46945] snapshot/101/main I> done\n" +"2017-06-14 14:54:33.935 [46945] main/101/replica2.lua I> vinyl checkpoint done\n" +"2017-06-14 14:54:33.935 [46945] main/101/replica2.lua I> ready to accept requests\n" +"2017-06-14 14:54:33.935 [46945] main/101/replica2.lua I> set 'read_only' configuration option to true\n" +"2017-06-14 14:54:33.936 [46945] main C> entering the event loop" +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:67 +msgid "Since we are adding a read-only instance, there is no need to dynamically update the ``replication`` parameter on the other running instances. This update would be required if we :ref:`added a master instance `." +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:71 +msgid "However, we recommend specifying the URI of replica #3 in all instance files of the replica set. This will keep all the files consistent with each other and with the current replication topology, and so will help to avoid configuration errors in case of further configuration updates and replica set restart." +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:79 +msgid "Adding a master" +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:84 +msgid "To add a third master instance to the **master-master** set from our :ref:`bootstrapping example `, we need an analog of the instance files that we created to bootstrap the other master instances in that set:" +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:89 +msgid "-- instance file for master #3\n" +"box.cfg{\n" +" listen = 3301,\n" +" replication = {'replicator:password@192.168.0.101:3301', -- master#1 URI\n" +" 'replicator:password@192.168.0.102:3301', -- master#2 URI\n" +" 'replicator:password@192.168.0.103:3301'}, -- master#3 URI\n" +" read_only = true, -- temporarily read-only\n" +"}\n" +"box.once(\"schema\", function()\n" +" box.schema.user.create('replicator', {password = 'password'})\n" +" box.schema.user.grant('replicator', 'replication') -- grant replication role\n" +" box.schema.space.create(\"test\")\n" +" box.space.test:create_index(\"primary\")\n" +"end)" +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:106 +msgid "Here we make the following changes:" +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:108 +msgid "Add the URI of master #3 to the :ref:`replication ` parameter." +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:110 +msgid "Temporarily specify :ref:`read_only=true ` to disable data-change operations on the instance. After launch, master #3 will act as a replica until it retrieves all data from the other masters in the replica set." +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:114 +msgid "After we launch master #3, it gets connected to the other master instances and retrieves their write-ahead-log and snapshot files:" +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:117 +msgid "$ # launching master #3\n" +"$ tarantool master3.lua\n" +"2017-06-14 17:10:00.556 [47121] main/101/master3.lua C> version 1.7.4-52-g980d30092\n" +"2017-06-14 17:10:00.557 [47121] main/101/master3.lua C> log level 5\n" +"2017-06-14 17:10:00.557 [47121] main/101/master3.lua I> mapping 268435456 bytes for tuple arena...\n" +"2017-06-14 17:10:00.559 [47121] iproto/101/main I> binary: bound to [::]:3301\n" +"2017-06-14 17:10:00.559 [47121] main/104/applier/replicator@192.168.0.10 I> remote master is 1.7.4 at 192.168.0.101:3301\n" +"2017-06-14 17:10:00.559 [47121] main/105/applier/replicator@192.168.0.10 I> remote master is 1.7.4 at 192.168.0.102:3301\n" +"2017-06-14 17:10:00.559 [47121] main/106/applier/replicator@192.168.0.10 I> remote master is 1.7.4 at 192.168.0.103:3301\n" +"2017-06-14 17:10:00.559 [47121] main/105/applier/replicator@192.168.0.10 I> authenticated\n" +"2017-06-14 17:10:00.559 [47121] main/101/master3.lua I> bootstrapping replica from 192.168.0.102:3301\n" +"2017-06-14 17:10:00.562 [47121] main/105/applier/replicator@192.168.0.10 I> initial data received\n" +"2017-06-14 17:10:00.562 [47121] main/105/applier/replicator@192.168.0.10 I> final data received\n" +"2017-06-14 17:10:00.562 [47121] snapshot/101/main I> saving snapshot `/Users/e.shebunyaeva/work/tarantool-test-repl/master3_dir/00000000000000000009.snap.inprogress'\n" +"2017-06-14 17:10:00.562 [47121] snapshot/101/main I> done\n" +"2017-06-14 17:10:00.564 [47121] main/101/master3.lua I> vinyl checkpoint done\n" +"2017-06-14 17:10:00.564 [47121] main/101/master3.lua I> ready to accept requests\n" +"2017-06-14 17:10:00.565 [47121] main/101/master3.lua I> set 'read_only' configuration option to true\n" +"2017-06-14 17:10:00.565 [47121] main C> entering the event loop\n" +"2017-06-14 17:10:00.565 [47121] main/104/applier/replicator@192.168.0.10 I> authenticated" +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:140 +msgid "Next, we add the URI of master #3 to the ``replication`` parameter on the existing two masters. Replication-related parameters are dynamic, so we only need to make a ``box.cfg{}`` request on each of the running instances:" +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:144 +msgid "# adding master #3 URI to replication sources\n" +"tarantool> box.cfg{replication =\n" +" > {'replicator:password@192.168.0.101:3301',\n" +" > 'replicator:password@192.168.0.102:3301',\n" +" > 'replicator:password@192.168.0.103:3301'}}\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:154 +msgid "When master #3 catches up with the other masters' state, we can disable read-only mode for this instance:" +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:157 +msgid "# making master #3 a real master\n" +"tarantool> box.cfg{read_only=false}\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_add_instances.rst:164 +msgid "We also recommend to specify master #3 URI in all instance files in order to keep all the files consistent with each other and with the current replication topology." +msgstr "" diff --git a/locale/en/how-to/replication/repl_bootstrap.pot b/locale/en/how-to/replication/repl_bootstrap.pot new file mode 100644 index 0000000000..aa19cb00fe --- /dev/null +++ b/locale/en/how-to/replication/repl_bootstrap.pot @@ -0,0 +1,754 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-07 07:21+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:5 +msgid "Master-replica: manual failover" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:7 +msgid "**Example on GitHub**: `manual_leader `_" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:9 +msgid "This tutorial shows how to configure and work with a replica set with manual failover." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:15 +msgid "Prerequisites" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:17 +msgid "Before starting this tutorial:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:19 +msgid "Install the :ref:`tt ` utility." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:21 +msgid "Create a tt environment in the current directory by executing the :ref:`tt init ` command." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:23 +msgid "Inside the ``instances.enabled`` directory of the created tt environment, create the ``manual_leader`` directory." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:25 +msgid "Inside ``instances.enabled/manual_leader``, create the ``instances.yml`` and ``config.yaml`` files:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:27 +msgid "``instances.yml`` specifies instances to :ref:`run ` in the current environment and should look like this:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:29 +#: ../../doc/how-to/replication/repl_bootstrap.rst:577 +msgid "instance001:\n" +"instance002:\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:34 +msgid "The ``config.yaml`` file is intended to store a :ref:`replica set configuration `." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:41 +msgid "Configuring a replica set" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:43 +msgid "This section describes how to configure a replica set in ``config.yaml``." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:48 +msgid "Step 1: Configuring a failover mode" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:50 +msgid "First, set the :ref:`replication.failover ` option to ``manual``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:52 +msgid "replication:\n" +" failover: manual\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:61 +msgid "Step 2: Defining a replica set topology" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:63 +msgid "Define a replica set topology inside the :ref:`groups ` section:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:65 +msgid "The :ref:`leader ` option sets ``instance001`` as a replica set leader." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:66 +msgid "The :ref:`iproto.listen ` option specifies an address used to listen for incoming requests and allows replicas to communicate with each other." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:68 +msgid "groups:\n" +" group001:\n" +" replicasets:\n" +" replicaset001:\n" +" leader: instance001\n" +" instances:\n" +" instance001:\n" +" iproto:\n" +" listen: 127.0.0.1:3301\n" +" instance002:\n" +" iproto:\n" +" listen: 127.0.0.1:3302\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:78 +msgid "Step 3: Creating a user for replication" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:80 +msgid "In the :ref:`credentials ` section, create the ``replicator`` user with the ``replication`` role:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:82 +msgid "credentials:\n" +" users:\n" +" replicator:\n" +" password: 'topsecret'\n" +" roles: [replication]\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:92 +msgid "Step 4: Specifying advertise URIs" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:94 +msgid "Set :ref:`iproto.advertise.peer ` to advertise the current instance to other replica set members:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:96 +msgid "iproto:\n" +" advertise:\n" +" peer: replicator@\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:105 +msgid "Resulting configuration" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:107 +msgid "The resulting replica set configuration should look as follows:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:109 +msgid "credentials:\n" +" users:\n" +" replicator:\n" +" password: 'topsecret'\n" +" roles: [replication]\n" +"\n" +"iproto:\n" +" advertise:\n" +" peer: replicator@\n" +"\n" +"replication:\n" +" failover: manual\n" +"\n" +"groups:\n" +" group001:\n" +" replicasets:\n" +" replicaset001:\n" +" leader: instance001\n" +" instances:\n" +" instance001:\n" +" iproto:\n" +" listen: 127.0.0.1:3301\n" +" instance002:\n" +" iproto:\n" +" listen: 127.0.0.1:3302\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:120 +msgid "Working with a replica set" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:125 +msgid "Starting instances" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:127 +msgid "After configuring a replica set, execute the :ref:`tt start ` command from the :ref:`tt environment directory `:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:129 +msgid "$ tt start manual_leader\n" +" • Starting an instance [manual_leader:instance001]...\n" +" • Starting an instance [manual_leader:instance002]..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:135 +msgid "Check that instances are in the ``RUNNING`` status using the :ref:`tt status ` command:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:137 +msgid "$ tt status manual_leader\n" +"INSTANCE STATUS PID\n" +"manual_leader:instance001 RUNNING 15272\n" +"manual_leader:instance002 RUNNING 15273" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:148 +msgid "Checking a replica set status" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:150 +msgid "Connect to ``instance001`` using :ref:`tt connect `:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:152 +msgid "$ tt connect manual_leader:instance001\n" +" • Connecting to the instance...\n" +" • Connected to manual_leader:instance001" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:158 +msgid "Make sure that the instance is in the ``running`` state by executing :ref:`box.info.status `:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:160 +msgid "manual_leader:instance001> box.info.status\n" +"---\n" +"- running\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:167 +msgid "Check that the instance is writable using ``box.info.ro``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:169 +msgid "manual_leader:instance001> box.info.ro\n" +"---\n" +"- false\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:176 +msgid "Execute ``box.info.replication`` to check a replica set status. For ``instance002``, ``upstream.status`` and ``downstream.status`` should be ``follow``." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:179 +msgid "manual_leader:instance001> box.info.replication\n" +"---\n" +"- 1:\n" +" id: 1\n" +" uuid: 9bb111c2-3ff5-36a7-00f4-2b9a573ea660\n" +" lsn: 7\n" +" name: instance001\n" +" 2:\n" +" id: 2\n" +" uuid: 4cfa6e3c-625e-b027-00a7-29b2f2182f23\n" +" lsn: 0\n" +" upstream:\n" +" status: follow\n" +" idle: 0.3893879999996\n" +" peer: replicator@127.0.0.1:3302\n" +" lag: 0.00028800964355469\n" +" name: instance002\n" +" downstream:\n" +" status: follow\n" +" idle: 0.37777199999982\n" +" vclock: {1: 7}\n" +" lag: 0\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:209 +msgid "Adding data" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:211 +msgid "To check that a replica (``instance002``) gets all updates from the master, follow the steps below:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:213 +msgid "On ``instance001``, create a space and add data as described in :ref:`CRUD operation examples `." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:215 +msgid "Open the second terminal, connect to ``instance002`` using ``tt connect``, and use the ``select`` operation to make sure data is replicated." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:217 +msgid "Check that :ref:`box.info.vclock ` values are the same on both instances:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:219 +#: ../../doc/how-to/replication/repl_bootstrap.rst:316 +#: ../../doc/how-to/replication/repl_bootstrap.rst:426 +#: ../../doc/how-to/replication/repl_bootstrap.rst:505 +#: ../../doc/how-to/replication/repl_bootstrap.rst:592 +msgid "``instance001``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:221 +#: ../../doc/how-to/replication/repl_bootstrap.rst:428 +msgid "manual_leader:instance001> box.info.vclock\n" +"---\n" +"- {1: 21}\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:228 +#: ../../doc/how-to/replication/repl_bootstrap.rst:324 +#: ../../doc/how-to/replication/repl_bootstrap.rst:435 +#: ../../doc/how-to/replication/repl_bootstrap.rst:513 +#: ../../doc/how-to/replication/repl_bootstrap.rst:600 +msgid "``instance002``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:230 +#: ../../doc/how-to/replication/repl_bootstrap.rst:437 +msgid "manual_leader:instance002> box.info.vclock\n" +"---\n" +"- {1: 21}\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:241 +msgid "Note that a ``vclock`` value might include the ``0`` component that is related to local space operations and might differ for different instances in a replica set." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:250 +msgid "Adding instances" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:252 +msgid "This section describes how to add a new replica to a replica set." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:257 +msgid "Adding an instance to the configuration" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:259 +msgid "Add ``instance003`` to the ``instances.yml`` file:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:261 +msgid "instance001:\n" +"instance002:\n" +"instance003:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:265 +msgid "Add ``instance003`` with the specified ``iproto.listen`` option to the ``config.yaml`` file:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:267 +msgid "groups:\n" +" group001:\n" +" replicasets:\n" +" replicaset001:\n" +" leader: instance001\n" +" instances:\n" +" instance001:\n" +" iproto:\n" +" listen: 127.0.0.1:3301\n" +" instance002:\n" +" iproto:\n" +" listen: 127.0.0.1:3302\n" +" instance003:\n" +" iproto:\n" +" listen: 127.0.0.1:3303\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:277 +msgid "Starting an instance" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:279 +msgid "Open the third terminal to work with a new instance. Start ``instance003`` using ``tt start``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:282 +msgid "$ tt start manual_leader:instance003\n" +" • Starting an instance [manual_leader:instance003]..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:287 +msgid "Check a replica set status using ``tt status``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:289 +msgid "$ tt status manual_leader\n" +"INSTANCE STATUS PID\n" +"manual_leader:instance001 RUNNING 15272\n" +"manual_leader:instance002 RUNNING 15273\n" +"manual_leader:instance003 RUNNING 15551" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:301 +msgid "Reloading configuration" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:303 +msgid "After you added ``instance003`` to the configuration and started it, you need to reload configurations on all instances. This is required to allow ``instance001`` and ``instance002`` to get data from the new instance in case it becomes a master." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:306 +msgid "Connect to ``instance003`` using ``tt connect``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:308 +msgid "$ tt connect manual_leader:instance003\n" +" • Connecting to the instance...\n" +" • Connected to manual_leader:instance001" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:314 +msgid "Reload configurations on all three instances using the ``reload()`` function provided by the :ref:`config ` module:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:318 +#: ../../doc/how-to/replication/repl_bootstrap.rst:507 +#: ../../doc/how-to/replication/repl_bootstrap.rst:594 +msgid "manual_leader:instance001> require('config'):reload()\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:326 +#: ../../doc/how-to/replication/repl_bootstrap.rst:515 +#: ../../doc/how-to/replication/repl_bootstrap.rst:602 +msgid "manual_leader:instance002> require('config'):reload()\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:332 +#: ../../doc/how-to/replication/repl_bootstrap.rst:445 +msgid "``instance003``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:334 +msgid "manual_leader:instance003> require('config'):reload()\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:341 +msgid "Execute ``box.info.replication`` to check a replica set status. Make sure that ``upstream.status`` and ``downstream.status`` are ``follow`` for ``instance003``." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:344 +msgid "manual_leader:instance001> box.info.replication\n" +"---\n" +"- 1:\n" +" id: 1\n" +" uuid: 9bb111c2-3ff5-36a7-00f4-2b9a573ea660\n" +" lsn: 21\n" +" name: instance001\n" +" 2:\n" +" id: 2\n" +" uuid: 4cfa6e3c-625e-b027-00a7-29b2f2182f23\n" +" lsn: 0\n" +" upstream:\n" +" status: follow\n" +" idle: 0.052655000000414\n" +" peer: replicator@127.0.0.1:3302\n" +" lag: 0.00010204315185547\n" +" name: instance002\n" +" downstream:\n" +" status: follow\n" +" idle: 0.09503500000028\n" +" vclock: {1: 21}\n" +" lag: 0.00026917457580566\n" +" 3:\n" +" id: 3\n" +" uuid: 9a3a1b9b-8a18-baf6-00b3-a6e5e11fd8b6\n" +" lsn: 0\n" +" upstream:\n" +" status: follow\n" +" idle: 0.77522099999987\n" +" peer: replicator@127.0.0.1:3303\n" +" lag: 0.0001838207244873\n" +" name: instance003\n" +" downstream:\n" +" status: follow\n" +" idle: 0.33186100000012\n" +" vclock: {1: 21}\n" +" lag: 0\n" +" ..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:390 +msgid "Performing manual failover" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:392 +msgid "This section shows how to perform manual failover and change a replica set leader." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:397 +msgid "Switching instances to read-only mode" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:399 +msgid "In the ``config.yaml`` file, change the replica set leader from ``instance001`` to ``null``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:401 +msgid "replicaset001:\n" +" leader: null" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:406 +msgid "Reload configurations on all three instances using :ref:`config:reload() ` and check that instances are in read-only mode. The example below shows how to do this for ``instance001``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:409 +msgid "manual_leader:instance001> require('config'):reload()\n" +"---\n" +"...\n" +"manual_leader:instance001> box.info.ro\n" +"---\n" +"- true\n" +"...\n" +"manual_leader:instance001> box.info.ro_reason\n" +"---\n" +"- config\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:424 +msgid "Make sure that :ref:`box.info.vclock ` values are the same on all instances:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:447 +msgid "manual_leader:instance003> box.info.vclock\n" +"---\n" +"- {1: 21}\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:458 +msgid "Configuring a new leader" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:460 +msgid "Change a replica set leader in ``config.yaml`` to ``instance002``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:462 +msgid "replicaset001:\n" +" leader: instance002" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:467 +msgid "Reload configuration on all instances using :ref:`config:reload() `." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:469 +msgid "Make sure that ``instance002`` is a new master:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:471 +msgid "manual_leader:instance002> box.info.ro\n" +"---\n" +"- false\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:478 +msgid "Check replication status using ``box.info.replication``." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:484 +msgid "Removing instances" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:486 +msgid "This section describes the process of removing an instance from a replica set." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:488 +msgid "Before removing an instance, make sure it is in read-only mode. If the instance is a master, perform :ref:`manual failover `." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:494 +msgid "Disconnecting an instance" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:496 +msgid "Clear the ``iproto`` option for ``instance003`` by setting its value to ``{}``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:498 +msgid "instance003:\n" +" iproto: {}" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:503 +#: ../../doc/how-to/replication/repl_bootstrap.rst:590 +msgid "Reload configurations on ``instance001`` and ``instance002``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:521 +msgid "Check that the ``upstream`` section is missing for ``instance003`` by executing ``box.info.replication[3]``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:523 +msgid "manual_leader:instance001> box.info.replication[3]\n" +"---\n" +"- id: 3\n" +" uuid: 9a3a1b9b-8a18-baf6-00b3-a6e5e11fd8b6\n" +" lsn: 0\n" +" downstream:\n" +" status: follow\n" +" idle: 0.4588760000006\n" +" vclock: {1: 21}\n" +" lag: 0\n" +" name: instance003\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:542 +msgid "Stopping an instance" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:544 +msgid "Stop ``instance003`` using the :ref:`tt stop ` command:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:546 +msgid "$ tt stop manual_leader:instance003\n" +" • The Instance manual_leader:instance003 (PID = 15551) has been terminated." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:552 +msgid "Check that ``downstream.status`` is ``stopped`` for ``instance003``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:554 +msgid "manual_leader:instance001> box.info.replication[3]\n" +"---\n" +"- id: 3\n" +" uuid: 9a3a1b9b-8a18-baf6-00b3-a6e5e11fd8b6\n" +" lsn: 0\n" +" downstream:\n" +" status: stopped\n" +" message: 'unexpected EOF when reading from socket, called on fd 27, aka 127.0.0.1:3301,\n" +" peer of 127.0.0.1:54185: Broken pipe'\n" +" system_message: Broken pipe\n" +" name: instance003\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:573 +msgid "Removing an instance from the configuration" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:575 +msgid "Remove ``instance003`` from the ``instances.yml`` file:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:582 +msgid "Remove ``instance003`` from ``config.yaml``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:584 +msgid "instances:\n" +" instance001:\n" +" iproto:\n" +" listen: 127.0.0.1:3301\n" +" instance002:\n" +" iproto:\n" +" listen: 127.0.0.1:3302\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:612 +msgid "Removing an instance from the '_cluster' space" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:614 +msgid "To remove an instance from the replica set permanently, it should be removed from the :ref:`box.space._cluster ` system space:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:616 +msgid "Select all the tuples in the ``box.space._cluster`` system space:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:618 +msgid "manual_leader:instance002> box.space._cluster:select{}\n" +"---\n" +"- - [1, '9bb111c2-3ff5-36a7-00f4-2b9a573ea660', 'instance001']\n" +" - [2, '4cfa6e3c-625e-b027-00a7-29b2f2182f23', 'instance002']\n" +" - [3, '9a3a1b9b-8a18-baf6-00b3-a6e5e11fd8b6', 'instance003']\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:627 +msgid "Delete a tuple corresponding to ``instance003``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:629 +msgid "manual_leader:instance002> box.space._cluster:delete(3)\n" +"---\n" +"- [3, '9a3a1b9b-8a18-baf6-00b3-a6e5e11fd8b6', 'instance003']\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:636 +msgid "Execute ``box.info.replication`` to check the health status:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:638 +msgid "manual_leader:instance002> box.info.replication\n" +"---\n" +"- 1:\n" +" id: 1\n" +" uuid: 9bb111c2-3ff5-36a7-00f4-2b9a573ea660\n" +" lsn: 21\n" +" upstream:\n" +" status: follow\n" +" idle: 0.73316000000159\n" +" peer: replicator@127.0.0.1:3301\n" +" lag: 0.00016212463378906\n" +" name: instance001\n" +" downstream:\n" +" status: follow\n" +" idle: 0.7269320000014\n" +" vclock: {2: 1, 1: 21}\n" +" lag: 0.00083398818969727\n" +" 2:\n" +" id: 2\n" +" uuid: 4cfa6e3c-625e-b027-00a7-29b2f2182f23\n" +" lsn: 1\n" +" name: instance002\n" +"..." +msgstr "" diff --git a/locale/en/how-to/replication/repl_bootstrap_auto.pot b/locale/en/how-to/replication/repl_bootstrap_auto.pot new file mode 100644 index 0000000000..f953e132b3 --- /dev/null +++ b/locale/en/how-to/replication/repl_bootstrap_auto.pot @@ -0,0 +1,545 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-07 07:21+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:4 +msgid "Master-replica: automated failover" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:6 +msgid "**Example on GitHub**: `auto_leader `_" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:8 +msgid "This tutorial shows how to configure and work with a replica set with automated failover." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:14 +msgid "Prerequisites" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:16 +msgid "Before starting this tutorial:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:18 +msgid "Install the :ref:`tt ` utility." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:20 +msgid "Create a tt environment in the current directory by executing the :ref:`tt init ` command." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:22 +msgid "Inside the ``instances.enabled`` directory of the created tt environment, create the ``auto_leader`` directory." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:24 +msgid "Inside ``instances.enabled/auto_leader``, create the ``instances.yml`` and ``config.yaml`` files:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:26 +msgid "``instances.yml`` specifies instances to :ref:`run ` in the current environment and should look like this:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:28 +msgid "instance001:\n" +"instance002:\n" +"instance003:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:32 +msgid "The ``config.yaml`` file is intended to store a :ref:`replica set configuration `." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:40 +msgid "Configuring a replica set" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:42 +msgid "This section describes how to configure a replica set in ``config.yaml``." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:47 +msgid "Step 1: Configuring a failover mode" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:49 +msgid "First, set the :ref:`replication.failover ` option to ``election``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:51 +msgid "replication:\n" +" failover: election\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:60 +msgid "Step 2: Defining a replica set topology" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:62 +msgid "Define a replica set topology inside the :ref:`groups ` section. The :ref:`iproto.listen ` option specifies an address used to listen for incoming requests and allows replicas to communicate with each other." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:65 +msgid "groups:\n" +" group001:\n" +" replicasets:\n" +" replicaset001:\n" +" instances:\n" +" instance001:\n" +" iproto:\n" +" listen: 127.0.0.1:3301\n" +" instance002:\n" +" iproto:\n" +" listen: 127.0.0.1:3302\n" +" instance003:\n" +" iproto:\n" +" listen: 127.0.0.1:3303\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:75 +msgid "Step 3: Creating a user for replication" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:77 +msgid "In the :ref:`credentials ` section, create the ``replicator`` user with the ``replication`` role:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:79 +msgid "credentials:\n" +" users:\n" +" replicator:\n" +" password: 'topsecret'\n" +" roles: [replication]\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:89 +msgid "Step 4: Specifying advertise URIs" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:91 +msgid "Set :ref:`iproto.advertise.peer ` to advertise the current instance to other replica set members:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:93 +msgid "iproto:\n" +" advertise:\n" +" peer: replicator@\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:102 +msgid "Resulting configuration" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:104 +msgid "The resulting replica set configuration should look as follows:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:106 +msgid "credentials:\n" +" users:\n" +" replicator:\n" +" password: 'topsecret'\n" +" roles: [replication]\n" +"\n" +"iproto:\n" +" advertise:\n" +" peer: replicator@\n" +"\n" +"replication:\n" +" failover: election\n" +"\n" +"groups:\n" +" group001:\n" +" replicasets:\n" +" replicaset001:\n" +" instances:\n" +" instance001:\n" +" iproto:\n" +" listen: 127.0.0.1:3301\n" +" instance002:\n" +" iproto:\n" +" listen: 127.0.0.1:3302\n" +" instance003:\n" +" iproto:\n" +" listen: 127.0.0.1:3303\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:117 +msgid "Working with a replica set" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:122 +msgid "Starting instances" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:124 +msgid "After configuring a replica set, execute the :ref:`tt start ` command from the :ref:`tt environment directory `:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:126 +msgid "$ tt start auto_leader\n" +" • Starting an instance [auto_leader:instance001]...\n" +" • Starting an instance [auto_leader:instance002]...\n" +" • Starting an instance [auto_leader:instance003]..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:133 +msgid "Check that instances are in the ``RUNNING`` status using the :ref:`tt status ` command:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:135 +msgid "$ tt status auto_leader\n" +"INSTANCE STATUS PID\n" +"auto_leader:instance001 RUNNING 24768\n" +"auto_leader:instance002 RUNNING 24769\n" +"auto_leader:instance003 RUNNING 24767" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:148 +msgid "Checking a replica set status" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:150 +msgid "Connect to ``instance001`` using :ref:`tt connect `:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:152 +msgid "$ tt connect auto_leader:instance001\n" +" • Connecting to the instance...\n" +" • Connected to auto_leader:instance001" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:158 +msgid "Check the instance state in regard to :ref:`leader election ` using :ref:`box.info.election `. The output below shows that ``instance001`` is a follower while ``instance002`` is a replica set leader." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:161 +msgid "auto_leader:instance001> box.info.election\n" +"---\n" +"- leader_idle: 0.77491499999815\n" +" leader_name: instance002\n" +" state: follower\n" +" vote: 0\n" +" term: 2\n" +" leader: 1\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:173 +msgid "Check that ``instance001`` is in read-only mode using ``box.info.ro``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:175 +msgid "auto_leader:instance001> box.info.ro\n" +"---\n" +"- true\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:182 +msgid "Execute ``box.info.replication`` to check a replica set status. Make sure that ``upstream.status`` and ``downstream.status`` are ``follow`` for ``instance002`` and ``instance003``." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:185 +msgid "auto_leader:instance001> box.info.replication\n" +"---\n" +"- 1:\n" +" id: 1\n" +" uuid: 4cfa6e3c-625e-b027-00a7-29b2f2182f23\n" +" lsn: 9\n" +" upstream:\n" +" status: follow\n" +" idle: 0.8257709999998\n" +" peer: replicator@127.0.0.1:3302\n" +" lag: 0.00012326240539551\n" +" name: instance002\n" +" downstream:\n" +" status: follow\n" +" idle: 0.81174199999805\n" +" vclock: {1: 9}\n" +" lag: 0\n" +" 2:\n" +" id: 2\n" +" uuid: 9bb111c2-3ff5-36a7-00f4-2b9a573ea660\n" +" lsn: 0\n" +" name: instance001\n" +" 3:\n" +" id: 3\n" +" uuid: 9a3a1b9b-8a18-baf6-00b3-a6e5e11fd8b6\n" +" lsn: 0\n" +" upstream:\n" +" status: follow\n" +" idle: 0.83125499999733\n" +" peer: replicator@127.0.0.1:3303\n" +" lag: 0.00010204315185547\n" +" name: instance003\n" +" downstream:\n" +" status: follow\n" +" idle: 0.83213399999659\n" +" vclock: {1: 9}\n" +" lag: 0\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:230 +msgid "Adding data" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:232 +msgid "To check that replicas (``instance001`` and ``instance003``) get all updates from the master (``instance002``), follow the steps below:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:234 +msgid "Connect to ``instance002`` using ``tt connect``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:236 +msgid "$ tt connect auto_leader:instance002\n" +" • Connecting to the instance...\n" +" • Connected to auto_leader:instance002" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:242 +msgid "Create a space and add data as described in :ref:`CRUD operation examples `." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:244 +msgid "Use the ``select`` operation on ``instance001`` and ``instance003`` to make sure data is replicated." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:246 +msgid "Check that the ``1`` component of :ref:`box.info.vclock ` values are the same on all instances:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:248 +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:375 +msgid "``instance001``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:250 +msgid "auto_leader:instance001> box.info.vclock\n" +"---\n" +"- {0: 1, 1: 32}\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:257 +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:384 +msgid "``instance002``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:259 +msgid "auto_leader:instance002> box.info.vclock\n" +"---\n" +"- {0: 1, 1: 32}\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:266 +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:394 +msgid "``instance003``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:268 +msgid "auto_leader:instance003> box.info.vclock\n" +"---\n" +"- {0: 1, 1: 32}\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:5 +msgid "Note that a ``vclock`` value might include the ``0`` component that is related to local space operations and might differ for different instances in a replica set." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:284 +msgid "Testing automated failover" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:286 +msgid "To test how automated failover works if the current master is stopped, follow the steps below:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:288 +msgid "Stop the current master instance (``instance002``) using the ``tt stop`` command:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:290 +msgid "$ tt stop auto_leader:instance002\n" +" • The Instance auto_leader:instance002 (PID = 24769) has been terminated." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:296 +msgid "On ``instance001``, check ``box.info.election``. In this example, a new replica set leader is ``instance001``." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:299 +msgid "auto_leader:instance001> box.info.election\n" +"---\n" +"- leader_idle: 0\n" +" leader_name: instance001\n" +" state: leader\n" +" vote: 2\n" +" term: 3\n" +" leader: 2\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:311 +msgid "Check replication status using ``box.info.replication`` for ``instance002``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:313 +msgid "``upstream.status`` is ``disconnected``." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:314 +msgid "``downstream.status`` is ``stopped``." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:316 +msgid "auto_leader:instance001> box.info.replication\n" +"---\n" +"- 1:\n" +" id: 1\n" +" uuid: 4cfa6e3c-625e-b027-00a7-29b2f2182f23\n" +" lsn: 32\n" +" upstream:\n" +" peer: replicator@127.0.0.1:3302\n" +" lag: 0.00032305717468262\n" +" status: disconnected\n" +" idle: 48.352504000002\n" +" message: 'connect, called on fd 20, aka 127.0.0.1:62575: Connection refused'\n" +" system_message: Connection refused\n" +" name: instance002\n" +" downstream:\n" +" status: stopped\n" +" message: 'unexpected EOF when reading from socket, called on fd 32, aka 127.0.0.1:3301,\n" +" peer of 127.0.0.1:62204: Broken pipe'\n" +" system_message: Broken pipe\n" +" 2:\n" +" id: 2\n" +" uuid: 9bb111c2-3ff5-36a7-00f4-2b9a573ea660\n" +" lsn: 1\n" +" name: instance001\n" +" 3:\n" +" id: 3\n" +" uuid: 9a3a1b9b-8a18-baf6-00b3-a6e5e11fd8b6\n" +" lsn: 0\n" +" upstream:\n" +" status: follow\n" +" idle: 0.18620999999985\n" +" peer: replicator@127.0.0.1:3303\n" +" lag: 0.00012516975402832\n" +" name: instance003\n" +" downstream:\n" +" status: follow\n" +" idle: 0.19718099999955\n" +" vclock: {2: 1, 1: 32}\n" +" lag: 0.00051403045654297\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:360 +msgid "Start ``instance002`` back using ``tt start``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:362 +msgid "$ tt start auto_leader:instance002\n" +" • Starting an instance [auto_leader:instance002]..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:371 +msgid "Choosing a leader manually" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:373 +msgid "Make sure that :ref:`box.info.vclock ` values (except the ``0`` components) are the same on all instances:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:377 +msgid "auto_leader:instance001> box.info.vclock\n" +"---\n" +"- {0: 2, 1: 32, 2: 1}\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:386 +msgid "auto_leader:instance002> box.info.vclock\n" +"---\n" +"- {0: 2, 1: 32, 2: 1}\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:396 +msgid "auto_leader:instance003> box.info.vclock\n" +"---\n" +"- {0: 3, 1: 32, 2: 1}\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:403 +msgid "On ``instance002``, run :ref:`box.ctl.promote() ` to choose it as a new replica set leader:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:405 +msgid "auto_leader:instance002> box.ctl.promote()\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:411 +msgid "Check ``box.info.election`` to make sure ``instance002`` is a leader now:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:413 +msgid "auto_leader:instance002> box.info.election\n" +"---\n" +"- leader_idle: 0\n" +" leader_name: instance002\n" +" state: leader\n" +" vote: 1\n" +" term: 4\n" +" leader: 1\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:430 +msgid "Adding and removing instances" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:432 +msgid "The process of adding instances to a replica set and removing them is similar for all failover modes. Learn how to do this from the :ref:`Master-replica: manual failover ` tutorial:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:435 +msgid ":ref:`Adding instances `" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:436 +msgid ":ref:`Removing instances `" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_auto.rst:438 +msgid "Before removing an instance from a replica set with :ref:`replication.failover ` set to ``election``, make sure this instance is in read-only mode. If the instance is a master, choose a :ref:`new leader manually `." +msgstr "" diff --git a/locale/en/how-to/replication/repl_bootstrap_master_master.pot b/locale/en/how-to/replication/repl_bootstrap_master_master.pot new file mode 100644 index 0000000000..f3f8647945 --- /dev/null +++ b/locale/en/how-to/replication/repl_bootstrap_master_master.pot @@ -0,0 +1,674 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-07 07:21+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:4 +msgid "Master-master" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:6 +msgid "**Example on GitHub**: `master_master `_" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:8 +msgid "This tutorial shows how to configure and work with a master-master replica set." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:14 +msgid "Prerequisites" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:16 +msgid "Before starting this tutorial:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:18 +msgid "Install the :ref:`tt ` utility." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:20 +msgid "Create a tt environment in the current directory by executing the :ref:`tt init ` command." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:22 +msgid "Inside the ``instances.enabled`` directory of the created tt environment, create the ``master_master`` directory." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:24 +msgid "Inside ``instances.enabled/master_master``, create the ``instances.yml`` and ``config.yaml`` files:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:26 +msgid "``instances.yml`` specifies instances to :ref:`run ` in the current environment and should look like this:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:28 +msgid "instance001:\n" +"instance002:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:33 +msgid "The ``config.yaml`` file is intended to store a :ref:`replica set configuration `." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:41 +msgid "Configuring a replica set" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:43 +msgid "This section describes how to configure a replica set in ``config.yaml``." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:49 +msgid "Step 1: Configuring a failover mode" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:51 +msgid "First, set the :ref:`replication.failover ` option to ``off``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:53 +msgid "replication:\n" +" failover: off\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:64 +msgid "Step 2: Defining a replica set topology" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:66 +msgid "Define a replica set topology inside the :ref:`groups ` section:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:68 +msgid "The ``database.mode`` option should be set to ``rw`` to make instances work in read-write mode." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:69 +msgid "The :ref:`iproto.listen ` option specifies an address used to listen for incoming requests and allows replicas to communicate with each other." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:71 +msgid "groups:\n" +" group001:\n" +" replicasets:\n" +" replicaset001:\n" +" instances:\n" +" instance001:\n" +" database:\n" +" mode: rw\n" +" iproto:\n" +" listen: 127.0.0.1:3301\n" +" instance002:\n" +" database:\n" +" mode: rw\n" +" iproto:\n" +" listen: 127.0.0.1:3302\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:81 +msgid "Step 3: Creating a user for replication" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:83 +msgid "In the :ref:`credentials ` section, create the ``replicator`` user with the ``replication`` role:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:85 +msgid "credentials:\n" +" users:\n" +" replicator:\n" +" password: 'topsecret'\n" +" roles: [replication]\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:95 +msgid "Step 4: Specifying advertise URIs" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:97 +msgid "Set :ref:`iproto.advertise.peer ` to advertise the current instance to other replica set members:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:99 +msgid "iproto:\n" +" advertise:\n" +" peer: replicator@\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:109 +msgid "Resulting configuration" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:111 +msgid "The resulting replica set configuration should look as follows:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:113 +msgid "credentials:\n" +" users:\n" +" replicator:\n" +" password: 'topsecret'\n" +" roles: [replication]\n" +"\n" +"iproto:\n" +" advertise:\n" +" peer: replicator@\n" +"\n" +"replication:\n" +" failover: off\n" +"\n" +"groups:\n" +" group001:\n" +" replicasets:\n" +" replicaset001:\n" +" instances:\n" +" instance001:\n" +" database:\n" +" mode: rw\n" +" iproto:\n" +" listen: 127.0.0.1:3301\n" +" instance002:\n" +" database:\n" +" mode: rw\n" +" iproto:\n" +" listen: 127.0.0.1:3302\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:124 +msgid "Working with a replica set" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:129 +msgid "Starting instances" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:131 +msgid "After configuring a replica set, execute the :ref:`tt start ` command from the :ref:`tt environment directory `:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:133 +msgid "$ tt start master_master\n" +" • Starting an instance [master_master:instance001]...\n" +" • Starting an instance [master_master:instance002]..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:139 +msgid "Check that instances are in the ``RUNNING`` status using the :ref:`tt status ` command:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:141 +msgid "$ tt status master_master\n" +"INSTANCE STATUS PID\n" +"master_master:instance001 RUNNING 30818\n" +"master_master:instance002 RUNNING 30819" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:152 +msgid "Checking a replica set status" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:154 +msgid "Connect to both instances using :ref:`tt connect `. Below is the example for ``instance001``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:157 +msgid "$ tt connect master_master:instance001\n" +" • Connecting to the instance...\n" +" • Connected to master_master:instance001" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:163 +msgid "Check that both instances are writable using ``box.info.ro``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:165 +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:264 +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:388 +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:499 +msgid "``instance001``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:167 +msgid "master_master:instance001> box.info.ro\n" +"---\n" +"- false\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:174 +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:273 +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:396 +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:507 +msgid "``instance002``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:176 +msgid "master_master:instance002> box.info.ro\n" +"---\n" +"- false\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:183 +msgid "Execute ``box.info.replication`` to check a replica set status. For ``instance002``, ``upstream.status`` and ``downstream.status`` should be ``follow``." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:186 +msgid "master_master:instance001> box.info.replication\n" +"---\n" +"- 1:\n" +" id: 1\n" +" uuid: 4cfa6e3c-625e-b027-00a7-29b2f2182f23\n" +" lsn: 7\n" +" upstream:\n" +" status: follow\n" +" idle: 0.21281599999929\n" +" peer: replicator@127.0.0.1:3302\n" +" lag: 0.00031614303588867\n" +" name: instance002\n" +" downstream:\n" +" status: follow\n" +" idle: 0.21800899999653\n" +" vclock: {1: 7}\n" +" lag: 0\n" +" 2:\n" +" id: 2\n" +" uuid: 9bb111c2-3ff5-36a7-00f4-2b9a573ea660\n" +" lsn: 0\n" +" name: instance001\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap.rst:5 +msgid "Note that a ``vclock`` value might include the ``0`` component that is related to local space operations and might differ for different instances in a replica set." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:222 +msgid "Adding data" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:224 +msgid "To check that both instances get updates from each other, follow the steps below:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:226 +msgid "On ``instance001``, create a space, format it, and create a primary index:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:228 +msgid "box.schema.space.create('bands')\n" +"box.space.bands:format({\n" +" { name = 'id', type = 'unsigned' },\n" +" { name = 'band_name', type = 'string' },\n" +" { name = 'year', type = 'unsigned' }\n" +"})\n" +"box.space.bands:create_index('primary', { parts = { 'id' } })\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:234 +msgid "Then, add sample data to this space:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:236 +msgid "box.space.bands:insert { 1, 'Roxette', 1986 }\n" +"box.space.bands:insert { 2, 'Scorpions', 1965 }\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:242 +msgid "On ``instance002``, use the ``select`` operation to make sure data is replicated:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:244 +msgid "master_master:instance002> box.space.bands:select()\n" +"---\n" +"- - [1, 'Roxette', 1986]\n" +" - [2, 'Scorpions', 1965]\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:252 +msgid "Add more data to the created space on ``instance002``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:254 +msgid "box.space.bands:insert { 3, 'Ace of Base', 1987 }\n" +"box.space.bands:insert { 4, 'The Beatles', 1960 }\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:260 +msgid "Get back to ``instance001`` and use ``select`` to make sure new records are replicated." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:262 +msgid "Check that :ref:`box.info.vclock ` values are the same on both instances:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:266 +msgid "master_master:instance001> box.info.vclock\n" +"---\n" +"- {2: 5, 1: 9}\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:275 +msgid "master_master:instance002> box.info.vclock\n" +"---\n" +"- {2: 5, 1: 9}\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:287 +msgid "Resolving replication conflicts" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:291 +msgid "To learn how to fix and prevent replication conflicts using trigger functions, see :ref:`Resolving replication conflicts `." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:296 +msgid "Inserting conflicting records" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:298 +msgid "To insert conflicting records to ``instance001`` and ``instance002``, follow the steps below:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:300 +msgid "Stop ``instance001`` using the ``tt stop`` command:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:302 +msgid "$ tt stop master_master:instance001" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:306 +msgid "On ``instance002``, insert a new record:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:308 +msgid "box.space.bands:insert { 5, 'incorrect data', 0 }" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:312 +msgid "Stop ``instance002`` using ``tt stop``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:314 +msgid "$ tt stop master_master:instance002" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:318 +msgid "Start ``instance001`` back:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:320 +msgid "$ tt start master_master:instance001" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:324 +msgid "Connect to ``instance001`` and insert a record that should conflict with a record already inserted on ``instance002``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:326 +msgid "box.space.bands:insert { 5, 'Pink Floyd', 1965 }\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:332 +msgid "Start ``instance002`` back:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:334 +msgid "$ tt start master_master:instance002" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:338 +msgid "Then, check ``box.info.replication`` on ``instance001``. ``upstream.status`` should be ``stopped`` because of the ``Duplicate key exists`` error:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:341 +msgid "master_master:instance001> box.info.replication\n" +"---\n" +"- 1:\n" +" id: 1\n" +" uuid: 4cfa6e3c-625e-b027-00a7-29b2f2182f23\n" +" lsn: 9\n" +" upstream:\n" +" peer: replicator@127.0.0.1:3302\n" +" lag: 143.52251672745\n" +" status: stopped\n" +" idle: 3.9462469999999\n" +" message: Duplicate key exists in unique index \"primary\" in space \"bands\" with\n" +" old tuple - [5, \"Pink Floyd\", 1965] and new tuple - [5, \"incorrect data\", 0]\n" +" name: instance002\n" +" downstream:\n" +" status: stopped\n" +" message: 'unexpected EOF when reading from socket, called on fd 12, aka 127.0.0.1:3301,\n" +" peer of 127.0.0.1:59258: Broken pipe'\n" +" system_message: Broken pipe\n" +" 2:\n" +" id: 2\n" +" uuid: 9bb111c2-3ff5-36a7-00f4-2b9a573ea660\n" +" lsn: 6\n" +" name: instance001\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:373 +msgid "Reseeding a replica" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:375 +msgid "To resolve a replication conflict, ``instance002`` should get the correct data from ``instance001`` first. To achieve this, ``instance002`` should be rebootstrapped:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:378 +msgid "In the ``config.yaml`` file, change ``database.mode`` of ``instance002`` to ``ro``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:380 +msgid "instance002:\n" +" database:\n" +" mode: ro" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:386 +msgid "Reload configurations on both instances using the ``reload()`` function provided by the :ref:`config ` module:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:390 +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:483 +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:501 +msgid "master_master:instance001> require('config'):reload()\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:398 +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:509 +msgid "master_master:instance002> require('config'):reload()\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:404 +msgid "Delete write-ahead logs and snapshots stored in the ``var/lib/instance002`` directory." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:408 +msgid "``var/lib`` is the default directory used by tt to store write-ahead logs and snapshots. Learn more from :ref:`Configuration `." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:411 +msgid "Restart ``instance002`` using the :ref:`tt restart ` command:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:413 +msgid "$ tt restart master_master:instance002" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:417 +msgid "Connect to ``instance002`` and make sure it received the correct data from ``instance001``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:419 +msgid "master_master:instance002> box.space.bands:select()\n" +"---\n" +"- - [1, 'Roxette', 1986]\n" +" - [2, 'Scorpions', 1965]\n" +" - [3, 'Ace of Base', 1987]\n" +" - [4, 'The Beatles', 1960]\n" +" - [5, 'Pink Floyd', 1965]\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:434 +msgid "Restarting replication" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:436 +msgid "After :ref:`reseeding a replica `, you need to resolve a replication conflict that keeps replication stopped:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:438 +msgid "Execute ``box.info.replication`` on ``instance001``. ``upstream.status`` is still stopped:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:441 +msgid "master_master:instance001> box.info.replication\n" +"---\n" +"- 1:\n" +" id: 1\n" +" uuid: 4cfa6e3c-625e-b027-00a7-29b2f2182f23\n" +" lsn: 9\n" +" upstream:\n" +" peer: replicator@127.0.0.1:3302\n" +" lag: 143.52251672745\n" +" status: stopped\n" +" idle: 1309.943383\n" +" message: Duplicate key exists in unique index \"primary\" in space \"bands\" with\n" +" old tuple - [5, \"Pink Floyd\", 1965] and new tuple - [5, \"incorrect data\",\n" +" 0]\n" +" name: instance002\n" +" downstream:\n" +" status: follow\n" +" idle: 0.47881799999959\n" +" vclock: {2: 6, 1: 9}\n" +" lag: 0\n" +" 2:\n" +" id: 2\n" +" uuid: 9bb111c2-3ff5-36a7-00f4-2b9a573ea660\n" +" lsn: 6\n" +" name: instance001\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:471 +msgid "In the ``config.yaml`` file, clear the ``iproto`` option for ``instance001`` by setting its value to ``{}`` to disconnect this instance from ``instance002``. Set ``database.mode`` to ``ro``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:474 +msgid "instance001:\n" +" database:\n" +" mode: ro\n" +" iproto: {}" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:481 +msgid "Reload configuration on ``instance001`` only:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:489 +msgid "Change ``database.mode`` values back to ``rw`` for both instances and restore ``iproto.listen`` for ``instance001``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:491 +msgid "instance001:\n" +" database:\n" +" mode: rw\n" +" iproto:\n" +" listen: 127.0.0.1:3301\n" +"instance002:\n" +" database:\n" +" mode: rw\n" +" iproto:\n" +" listen: 127.0.0.1:3302\n" +"" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:497 +msgid "Reload configurations on both instances one more time:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:515 +msgid "Check ``box.info.replication``. ``upstream.status`` be ``follow`` now." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:518 +msgid "master_master:instance001> box.info.replication\n" +"---\n" +"- 1:\n" +" id: 1\n" +" uuid: 4cfa6e3c-625e-b027-00a7-29b2f2182f23\n" +" lsn: 9\n" +" upstream:\n" +" status: follow\n" +" idle: 0.21281300000192\n" +" peer: replicator@127.0.0.1:3302\n" +" lag: 0.00031113624572754\n" +" name: instance002\n" +" downstream:\n" +" status: follow\n" +" idle: 0.035179000002245\n" +" vclock: {2: 6, 1: 9}\n" +" lag: 0\n" +" 2:\n" +" id: 2\n" +" uuid: 9bb111c2-3ff5-36a7-00f4-2b9a573ea660\n" +" lsn: 6\n" +" name: instance001\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:549 +msgid "Adding and removing instances" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:551 +msgid "The process of adding instances to a replica set and removing them is similar for all failover modes. Learn how to do this from the :ref:`Master-replica: manual failover ` tutorial:" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:554 +msgid ":ref:`Adding instances `" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:555 +msgid ":ref:`Removing instances `" +msgstr "" + +#: ../../doc/how-to/replication/repl_bootstrap_master_master.rst:557 +msgid "Before removing an instance from a replica set with :ref:`replication.failover ` set to ``off``, make sure this instance is in read-only mode." +msgstr "" diff --git a/locale/en/how-to/replication/repl_leader_elect.pot b/locale/en/how-to/replication/repl_leader_elect.pot new file mode 100644 index 0000000000..cadb9fedb1 --- /dev/null +++ b/locale/en/how-to/replication/repl_leader_elect.pot @@ -0,0 +1,121 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:4 +msgid "Managing leader elections" +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:6 +msgid "Starting from version :doc:`2.6.1 `, Tarantool has the built-in functionality managing automated leader election in a replica set. Learn more about the :ref:`concept of leader election `." +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:14 +msgid "Configuration" +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:16 +msgid "box.cfg({\n" +" election_mode = ,\n" +" election_fencing_mode = ,\n" +" election_timeout = ,\n" +" replication_timeout = ,\n" +" replication_synchro_quorum = \n" +"})" +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:26 +msgid "``election_mode`` -- specifies the role of a node in the leader election process. For the details, refer to the :ref:`option description ` in the configuration reference." +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:29 +msgid "``election_fencing_mode`` -- specifies the :ref:`leader fencing mode `. For the details, refer to the :ref:`option description ` in the configuration reference." +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:31 +msgid "``election_timeout`` -- specifies the timeout between election rounds if the previous round ended up with a split vote. For the details, refer to the :ref:`option description ` in the configuration reference." +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:35 +msgid "``replication_timeout`` -- reuse of the :ref:`replication_timeout ` configuration option for the purpose of the leader election process. Heartbeats sent by an active leader have a timeout after which a new election starts. Heartbeats are sent once per seconds. The default value is ``1``. The leader is considered dead if it hasn't sent any heartbeats for the period of ``replication_timeout * 4``." +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:41 +msgid "``replication_synchro_quorum`` -- reuse of the :ref:`replication_synchro_quorum ` option for the purpose of configuring the election quorum. The default value is ``1``, meaning that each node becomes a leader immediately after voting for itself. It is best to set up this option value to the ``( / 2) + 1``. Otherwise, there is no guarantee that there is only one leader at a time." +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:47 +msgid "It is important to know that being a leader is not the only requirement for a node to be writable. The leader should also satisfy the following requirements:" +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:50 +msgid "The :ref:`read_only ` option is set to ``false``." +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:52 +msgid "The leader shouldn't be in the orphan state." +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:54 +msgid "Nothing prevents you from setting the ``read_only`` option to ``true``, but the leader just won't be writable then. The option doesn't affect the election process itself, so a read-only instance can still vote and become a leader." +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:62 +msgid "Monitoring" +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:64 +msgid "To monitor the current state of a node regarding the leader election, you can use the ``box.info.election`` function. For details, refer to the :doc:`function description `." +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:69 +msgid "**Example:**" +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:71 +msgid "tarantool> box.info.election\n" +"---\n" +"- state: follower\n" +" vote: 0\n" +" leader: 0\n" +" term: 1\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:81 +msgid "The Raft-based election implementation logs all its actions with the ``RAFT:`` prefix. The actions are new Raft message handling, node state changing, voting, and term bumping." +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:88 +msgid "Important notes" +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:90 +msgid "Leader election doesn't work correctly if the election quorum is set to less or equal than `` / 2`` because in that case, a split vote can lead to a state when two leaders are elected at once." +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:94 +msgid "For example, suppose there are five nodes. When the quorum is set to ``2``, ``node1`` and ``node2`` can both vote for ``node1``. ``node3`` and ``node4`` can both vote for ``node5``. In this case, ``node1`` and ``node5`` both win the election. When the quorum is set to the cluster majority, that is ``( / 2) + 1`` or greater, the split vote is impossible." +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:100 +msgid "That should be considered when adding new nodes. If the majority value is changing, it's better to update the quorum on all the existing nodes before adding a new one." +msgstr "" + +#: ../../doc/how-to/replication/repl_leader_elect.rst:104 +msgid "Also, the automated leader election doesn't bring many benefits in terms of data safety when used *without* :ref:`synchronous replication `. If the replication is asynchronous and a new leader gets elected, the old leader is still active and considers itself the leader. In such case, nothing stops it from accepting requests from clients and making transactions. Non-synchronous transactions are successfully committed because they are not checked against the quorum of replicas. Synchronous transactions fail because they are not able to collect the quorum -- most of the replicas reject these old leader's transactions since it is not a leader anymore." +msgstr "" diff --git a/locale/en/how-to/replication/repl_remove_instances.pot b/locale/en/how-to/replication/repl_remove_instances.pot new file mode 100644 index 0000000000..74dc280ee4 --- /dev/null +++ b/locale/en/how-to/replication/repl_remove_instances.pot @@ -0,0 +1,268 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:4 +msgid "Removing instances" +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:6 +msgid "Let's assume that we have the following configured replica set with 3 instances (*instance1*, *instance2* and *intance3*) and we want to remove *instance2*." +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:12 +msgid "To remove it politely, follow these steps:" +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:14 +msgid "Disconnect *instance2* from the cluster." +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:15 +msgid "Disconnect the cluster from *instance2*." +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:16 +msgid "Remove *instance2* from the ``_cluster`` space." +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:21 +msgid "**Step 1: disconnecting an instance from the cluster**" +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:23 +msgid "On the disconnecting instance *instance2*, run ``box.cfg{}`` with a blank replication source:" +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:26 +msgid "tarantool> box.cfg{replication=''}" +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:30 +msgid "Then check that it was disconnected. Take a look at ``box.info.replication`` on *instance2* (notice that ``replication.{1,3}.upstream`` is absent):" +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:33 +msgid "tarantool> box.info.replication\n" +"---\n" +"- 1:\n" +" id: 1\n" +" uuid: db89978f-7115-4537-8417-9982bb5a256f\n" +" lsn: 9\n" +"-- upstream is absent\n" +" downstream:\n" +" status: follow\n" +" idle: 0.93983899999876\n" +" vclock: {1: 9}\n" +"2:\n" +" id: 2\n" +" uuid: 0a756d14-e437-4296-85b0-d27a0621613e\n" +" lsn: 0\n" +"3:\n" +" id: 3\n" +" uuid: bb362584-c265-4e53-aeb6-450ae818bf59\n" +" lsn: 0\n" +"-- upstream is absent\n" +" downstream:\n" +" status: follow\n" +" idle: 0.26624799999991\n" +" vclock: {1: 9}\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:61 +msgid "Check *instance1* and *instance3* as well (notice that the status of ``replication.2.downstream`` is ``stopped``):" +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:64 +msgid "-- instance1\n" +"tarantool> box.info.replication\n" +"---\n" +"- 1:\n" +" id: 1\n" +" uuid: db89978f-7115-4537-8417-9982bb5a256f\n" +" lsn: 9\n" +"2:\n" +" id: 2\n" +" uuid: 0a756d14-e437-4296-85b0-d27a0621613e\n" +" lsn: 0\n" +" upstream:\n" +" status: follow\n" +" idle: 0.3533439999992\n" +" peer: replicator@localhost:3302\n" +" lag: 0.0001220703125\n" +" downstream:\n" +" status: stopped -- status has changed:\n" +" message: unexpected EOF when reading from socket, called on fd 13, aka [::1]:3301,\n" +" peer of [::1]:53776\n" +" system_message: Broken pipe\n" +"3:\n" +" id: 3\n" +" uuid: bb362584-c265-4e53-aeb6-450ae818bf59\n" +" lsn: 0\n" +" upstream:\n" +" status: follow\n" +" idle: 0.35327999999936\n" +" peer: replicator@localhost:3303\n" +" lag: 0.00018095970153809\n" +" downstream:\n" +" status: follow\n" +" idle: 0.68685100000221\n" +" vclock: {1: 9}\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:102 +msgid "**Step 2: disconnecting the cluster from the decommissioned instance**" +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:104 +msgid "On every other instance in the cluster remove *instance2* from the ``box.cfg{ replication }`` list and call an appropriate ``box.cfg{ replication = {instance1, instance3} }``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:108 +msgid "tarantool> box.cfg{ replication = { 'instance1-uri', 'instance3-uri' } }" +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:112 +msgid "Take a look at ``box.info.replication`` on *instance2* to check that *instance1* and *instance3* were disconnected (notice that the status of ``replication.{1,3}.downstream`` is ``stopped``):" +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:116 +msgid "tarantool> box.info.replication\n" +"---\n" +"- 1:\n" +" id: 1\n" +" uuid: db89978f-7115-4537-8417-9982bb5a256f\n" +" lsn: 9\n" +" downstream:\n" +" status: stopped -- status has changed\n" +" message: unexpected EOF when reading from socket, called on fd 16, aka [::1]:3302,\n" +" peer of [::1]:53832\n" +" system_message: Broken pipe\n" +"2:\n" +" id: 2\n" +" uuid: 0a756d14-e437-4296-85b0-d27a0621613e\n" +" lsn: 0\n" +"3:\n" +" id: 3\n" +" uuid: bb362584-c265-4e53-aeb6-450ae818bf59\n" +" lsn: 0\n" +" downstream:\n" +" status: stopped -- status has changed\n" +" message: unexpected EOF when reading from socket, called on fd 18, aka [::1]:3302,\n" +" peer of [::1]:53825\n" +" system_message: Broken pipe\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:144 +msgid "Check *instance1* and *instance3* as well (notice that the status of ``replication.2.upstream`` is ``stopped``):" +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:147 +msgid "-- instance1\n" +"tarantool> box.info.replication\n" +"---\n" +"- 1:\n" +" id: 1\n" +" uuid: db89978f-7115-4537-8417-9982bb5a256f\n" +" lsn: 9\n" +"2:\n" +" id: 2\n" +" uuid: 0a756d14-e437-4296-85b0-d27a0621613e\n" +" lsn: 0\n" +" downstream:\n" +" status: stopped -- status has changed\n" +" message: unexpected EOF when reading from socket, called on fd 13, aka [::1]:3301,\n" +" peer of [::1]:53776\n" +" system_message: Broken pipe\n" +"3:\n" +" id: 3\n" +" uuid: bb362584-c265-4e53-aeb6-450ae818bf59\n" +" lsn: 0\n" +" upstream:\n" +" status: follow\n" +" idle: 0.50240100000156\n" +" peer: replicator@localhost:3303\n" +" lag: 0.00015711784362793\n" +" downstream:\n" +" status: follow\n" +" idle: 0.14237199999843\n" +" vclock: {1: 9}\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:180 +msgid "**Step 3: persistent removal**" +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:182 +msgid "If a removed instance rejoins later, it will receive all the updates made by the other instances while it was disconnected." +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:185 +msgid "If an instance is decommissioned forever, we should clean up the ``_cluster`` space. First, discover the ``id`` and ``uuid`` of the instance. On *instance2*, call ``return box.info.id, box.info.uuid``:" +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:189 +msgid "tarantool> return box.info.id, box.info.uuid\n" +"---\n" +"- 2\n" +"- '0a756d14-e437-4296-85b0-d27a0621613e'\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:197 +msgid "Take a note of ``id`` and ``uuid``." +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:199 +msgid "Now choose any master from the remaining cluster and perform the following actions on it (let's assume that we chose *instance1*):" +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:202 +msgid "Select all records from the ``_cluster`` space:" +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:204 +msgid "tarantool> box.space._cluster:select{}\n" +"---\n" +"- - [1, 'db89978f-7115-4537-8417-9982bb5a256f']\n" +"- [2, '0a756d14-e437-4296-85b0-d27a0621613e']\n" +"- [3, 'bb362584-c265-4e53-aeb6-450ae818bf59']\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:213 +msgid "Check if the ``id`` and ``uuid`` of *instance2* are correct and remove them from the cluster:" +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:216 +msgid "tarantool> box.space._cluster:delete(2)\n" +"---\n" +"- [2, '0a756d14-e437-4296-85b0-d27a0621613e']\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:223 +msgid "**Final checks**" +msgstr "" + +#: ../../doc/how-to/replication/repl_remove_instances.rst:225 +msgid "After all modifications, say ``box.info.replication`` to check the health status." +msgstr "" diff --git a/locale/en/how-to/replication/repl_sync.pot b/locale/en/how-to/replication/repl_sync.pot new file mode 100644 index 0000000000..222cf60b8b --- /dev/null +++ b/locale/en/how-to/replication/repl_sync.pot @@ -0,0 +1,126 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/replication/repl_sync.rst:4 +msgid "Configuring synchronous replication" +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:6 +msgid "Since version :doc:`2.5.1 `, :ref:`synchronous replication ` can be enabled per-space by using the ``is_sync`` option:" +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:10 +msgid "box.schema.create_space('test1', {is_sync = true})" +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:14 +msgid "Any transaction doing a DML request on this space becomes synchronous. Notice that DDL on this space (including truncation) is **not** synchronous." +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:17 +msgid "To control the behavior of synchronous transactions, there exist global ``box.cfg`` :ref:`options `:" +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:20 +msgid "box.cfg{replication_synchro_quorum = }" +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:24 +msgid "box.cfg{replication_synchro_quorum = \"N / 2 + 1\"}" +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:28 +msgid "This option tells how many replicas should confirm the receipt of a synchronous transaction before it is committed. Since version :doc:`2.5.3 `, the parameter supports dynamic evaluation of the quorum number (see :ref:`reference for the replication_synchro_quorum parameter ` for details). Since version :doc:`2.10.0 `, this option does not account for anonymous replicas. As a usage example, consider this:" +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:35 +msgid "-- Instance 1\n" +"box.cfg{\n" +" listen = 3313,\n" +" replication_synchro_quorum = 2,\n" +"}\n" +"box.schema.user.grant('guest', 'super')\n" +"_ = box.schema.space.create('sync', {is_sync=true})\n" +"_ = _:create_index('pk')" +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:46 +msgid "-- Instance 2\n" +"box.cfg{\n" +" listen = 3314,\n" +" replication = 'localhost:3313'\n" +"}" +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:54 +msgid "-- Instance 1\n" +"box.space.sync:replace{1}" +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:59 +msgid "When the first instance makes ``replace()``, it won't finish until the second instance confirms its receipt and successful appliance. Note that the quorum is set to 2, but the transaction was still committed even though there is only one replica. This is because the master instance itself also participates in the quorum." +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:64 +msgid "Now, if the second instance is down, the first one won't be able to commit any synchronous change." +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:67 +msgid "-- Instance 2\n" +"Ctrl+D" +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:72 +msgid "-- Instance 1\n" +"tarantool> box.space.sync:replace{2}\n" +"---\n" +"- error: Quorum collection for a synchronous transaction is timed out\n" +"..." +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:80 +msgid "The transaction wasn't committed because it failed to achieve the quorum in the given time. The time is a second configuration option:" +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:83 +msgid "box.cfg{replication_synchro_timeout = }" +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:87 +msgid "It tells how many seconds to wait for a synchronous transaction quorum replication until it is declared failed and is rolled back." +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:90 +msgid "A successful synchronous transaction commit is persisted in the WAL as a special CONFIRM record. The rollbacks are similarly persisted with a ROLLBACK record." +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:93 +msgid "The ``timeout`` and ``quorum`` options are not used on replicas. It means if the master dies, the pending synchronous transactions will be kept waiting on the replicas until a new master is elected." +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:99 +msgid "Tips and tricks" +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:101 +msgid "If a transaction is rolled back, it does not mean the ROLLBACK message reached the replicas. It still can happen that the master node suddenly dies, so the transaction will be committed by the new master. Your application logic should be ready for that." +msgstr "" + +#: ../../doc/how-to/replication/repl_sync.rst:106 +msgid "Synchronous transactions are better to use with full mesh. Then the replicas can talk to each other in case of the master node's death and still confirm some pending transactions." +msgstr "" diff --git a/locale/en/how-to/sql/improving_mysql.pot b/locale/en/how-to/sql/improving_mysql.pot new file mode 100644 index 0000000000..7c32537dfa --- /dev/null +++ b/locale/en/how-to/sql/improving_mysql.pot @@ -0,0 +1,378 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/sql/improving_mysql.rst:5 +msgid "Improving MySQL with Tarantool" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:7 +msgid "Replicating MySQL is one of the Tarantool’s killer functions. It allows you to keep your existing MySQL database while at the same time accelerating it and scaling it out horizontally. Even if you aren’t interested in extensive expansion, simply replacing existing replicas with Tarantool can save you money, because Tarantool is more efficient per core than MySQL. To read a testimonial of a company that implemented Tarantool replication on a large scale, please see `here `_." +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:16 +msgid "Notes:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:18 +msgid "if you run into any trouble with regards to the basics of Tarantool, you may wish to consult the :ref:`Getting started guide ` or the :ref:`Data model description `." +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:22 +msgid "these instructions are for **CentOS 7.5** and **MySQL 5.7**. They also assume that you have systemd installed and are working with an existing MySQL installation." +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:25 +msgid "a helpful log for troubleshooting during this tutorial is ``replicatord.log`` in ``/var/log``. You can also have a look at the instance’s log ``example.log`` in ``/var/log/tarantool``." +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:29 +msgid "So let’s proceed." +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:31 +msgid "First we’ll install the necessary packages in CentOS:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:33 +msgid "yum -y install git ncurses-devel cmake gcc-c++ boost boost-devel wget unzip nano bzip2 mysql-devel mysql-lib" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:37 +msgid "Next we’ll clone the Tarantool-MySQL replication package from GitHub:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:39 +msgid "git clone https://github.com/tarantool/mysql-tarantool-replication.git" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:43 +msgid "Now we can build the replicator with cmake:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:45 +msgid "cd mysql-tarantool-replication\n" +"git submodule update --init --recursive\n" +"cmake .\n" +"make" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:52 +msgid "Our replicator will run as a systemd daemon called replicatord, so let’s edit its systemd service file, ``replicatord.service``, in the mysql-tarantool-replication repo." +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:56 +msgid "nano replicatord.service" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:60 +msgid "Change the following line:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:62 +msgid "ExecStart=/usr/local/sbin/replicatord -c /usr/local/etc/replicatord.cfg" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:66 +msgid "Replace the ``.cfg`` extension with ``.yml``:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:68 +msgid "ExecStart=/usr/local/sbin/replicatord -c /usr/local/etc/replicatord.yml" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:72 +msgid "Next let’s copy some files from our replicatord repo to other necessary locations:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:74 +msgid "cp replicatord /usr/local/sbin/replicatord\n" +"cp replicatord.service /etc/systemd/system" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:79 +msgid "Now let’s enter the MySQL console and create a sample database (depending on your existing installation, you may of course be a user other than root):" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:82 +msgid "mysql -u root -p\n" +"CREATE DATABASE menagerie;\n" +"QUIT" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:88 +msgid "Next we’ll get some sample data from MySQL, which we’ll pull into our root directory, then install from the terminal:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:91 +msgid "cd\n" +"wget http://downloads.mysql.com/docs/menagerie-db.zip\n" +"unzip menagerie-db.zip\n" +"cd menagerie-db\n" +"mysql -u root -p menagerie < cr_pet_tbl.sql\n" +"mysql -u root -p menagerie < load_pet_tbl.sql\n" +"mysql menagerie -u root -p < ins_puff_rec.sql\n" +"mysql menagerie -u root -p < cr_event_tbl.sql" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:102 +msgid "Let’s enter the MySQL console now and massage the data for use with the Tarantool replicator (we are adding an ID, changing a field name to avoid conflict, and cutting down the number of fields; note that with real data, this is the step that will involve the most tweaking):" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:107 +msgid "mysql -u root -p\n" +"USE menagerie;\n" +"ALTER TABLE pet ADD id INT PRIMARY KEY AUTO_INCREMENT FIRST;\n" +"ALTER TABLE pet CHANGE COLUMN 'name' 'name2' VARCHAR(255);\n" +"ALTER TABLE pet DROP sex, DROP birth, DROP death;\n" +"QUIT" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:116 +msgid "Now that we have the sample data set up, we’ll need to edit MySQL’s configuration file for use with the replicator." +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:119 +msgid "cd\n" +"nano /etc/my.cnf" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:124 +msgid "Note that your ``my.cnf`` for MySQL could be in a slightly different location. Set:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:127 +msgid "[mysqld]\n" +"binlog_format = ROW\n" +"server_id = 1\n" +"log-bin = mysql-bin\n" +"interactive_timeout = 3600\n" +"wait_timeout = 3600\n" +"max_allowed_packet = 32M\n" +"socket = /var/lib/mysql/mysql.sock\n" +"bind-address = 127.0.0.1\n" +"\n" +"[client]\n" +"socket = /var/lib/mysql/mysql.sock" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:142 +msgid "After exiting nano, we’ll restart mysqld:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:144 +msgid "systemctl restart mysqld" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:148 +msgid "Next, let’s install Tarantool and set up spaces for replication. Go to the `Download page `_ and follow the instructions there to install Tarantool." +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:153 +msgid "Now we will write a standard Tarantool program by editing the Lua example, which comes with Tarantool:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:156 +msgid "cd\n" +"nano /etc/tarantool/instances.available/example.lua" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:161 +msgid "Replace the entire contents of the file with the following:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:163 +msgid "box.cfg {\n" +" listen = 3301;\n" +" memtx_memory = 128 * 1024 * 1024; -- 128Mb\n" +" memtx_min_tuple_size = 16;\n" +" memtx_max_tuple_size = 128 * 1024 * 1024; -- 128Mb\n" +" vinyl_memory = 128 * 1024 * 1024; -- 128Mb\n" +" vinyl_cache = 128 * 1024 * 1024; -- 128Mb\n" +" vinyl_max_tuple_size = 128 * 1024 * 1024; -- 128Mb\n" +" vinyl_write_threads = 2;\n" +" wal_mode = \"none\";\n" +" wal_max_size = 256 * 1024 * 1024;\n" +" checkpoint_interval = 60 * 60; -- one hour\n" +" checkpoint_count = 6;\n" +" force_recovery = true;\n" +"\n" +" -- 1 – SYSERROR\n" +" -- 2 – ERROR\n" +" -- 3 – CRITICAL\n" +" -- 4 – WARNING\n" +" -- 5 – INFO\n" +" -- 6 – VERBOSE\n" +" -- 7 – DEBUG\n" +" log_level = 7;\n" +" too_long_threshold = 0.5;\n" +" }\n" +"\n" +"box.schema.user.grant('guest','read,write,execute','universe')\n" +"\n" +"local function bootstrap()\n" +"\n" +" if not box.space.mysqldaemon then\n" +" s = box.schema.space.create('mysqldaemon')\n" +" s:create_index('primary',\n" +" {type = 'tree', parts = {1, 'unsigned'}, if_not_exists = true})\n" +" end\n" +"\n" +" if not box.space.mysqldata then\n" +" t = box.schema.space.create('mysqldata')\n" +" t:create_index('primary',\n" +" {type = 'tree', parts = {1, 'unsigned'}, if_not_exists = true})\n" +" end\n" +"\n" +"end\n" +"\n" +"bootstrap()" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:211 +msgid "To understand more of what’s happening here, it would be best to have a look back at the earlier `articles `_ in the Tarantool 101 series or use the :ref:`getting-started ` guide." +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:216 +msgid "Now we need to create a symlink from ``instances.available`` to a directory named ``instances.enabled`` (similar to NGINX). So in ``/etc/tarantool`` run the following:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:220 +msgid "mkdir instances.enabled\n" +"ln -s /instances.available/example.lua instances.enabled" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:225 +msgid "Next we can start up our Lua program with ``tt``, the Tarantool command-line utility:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:228 +msgid "tt start example" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:232 +msgid "Now let’s enter our Tarantool instance, where we can check that our target spaces were successfully created:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:235 +#: ../../doc/how-to/sql/improving_mysql.rst:297 +#: ../../doc/how-to/sql/improving_mysql.rst:329 +msgid "tt connect example" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:239 +msgid "tarantool> box.space._space:select()" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:243 +msgid "At the bottom you will see \"mysqldaemon\" and \"mysqldata\" spaces. Then exit with \"CTRL+C\"." +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:245 +msgid "Now that we have MySQL and Tarantool set up, we can proceed to configure our replicator. First let’s work with ``replicatord.yml`` in the main ``tarantool-mysql-replication`` directory." +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:249 +msgid "nano replicatord.yml" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:253 +msgid "Change the entire file as follows, making sure to add your MySQL password and to set the appropriate user:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:256 +msgid "mysql:\n" +" host: 127.0.0.1\n" +" port: 3306\n" +" user: root\n" +" password:\n" +" connect_retry: 15 # seconds\n" +"\n" +"tarantool:\n" +" host: 127.0.0.1:3301\n" +" binlog_pos_space: 512\n" +" binlog_pos_key: 0\n" +" connect_retry: 15 # seconds\n" +" sync_retry: 1000 # milliseconds\n" +"\n" +"mappings:\n" +" - database: menagerie\n" +" table: pet\n" +" columns: [ id, name2, owner, species ]\n" +" space: 513\n" +" key_fields: [ 0 ]\n" +" # insert_call: function_name\n" +" # update_call: function_name\n" +" # delete_call: function_name" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:282 +msgid "Now we need to copy replicatord.yml to the location where systemd looks for it:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:284 +msgid "cp replicatord.yml /usr/local/etc/replicatord.yml" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:288 +msgid "Next we can start up the replicator:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:290 +msgid "systemctl start replicatord" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:294 +msgid "Now we can enter our Tarantool instance and do a select on the “mysqldata” space. We will see the replicated content from MySQL:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:301 +msgid "tarantool> box.space.mysqldata:select()\n" +"---\n" +"- - [1, 'Fluffy', 'Harold', 'cat']\n" +" - [2, 'Claws', 'Gwen', 'cat']\n" +" - [3, 'Buffy', 'Harold', 'dog']\n" +" - [4, 'Fang', 'Benny', 'dog']\n" +" - [5, 'Bowser', 'Diane', 'dog']\n" +" - [6, 'Chirpy', 'Gwen', 'bird']\n" +" - [7, 'Whistler', 'Gwen', 'bird']\n" +" - [8, 'Slim', 'Benny', 'snake']\n" +" - [9, 'Puffball', 'Diane', 'hamster']" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:316 +msgid "Finally let’s enter a record into MySQL and then go back to Tarantool to make sure it’s replicated. So first we’ll exit our Tarantool instance with ``CTRL-C``, and then say:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:320 +msgid "mysql -u root -p\n" +"USE menagerie;\n" +"INSERT INTO pet(name2, owner, species) VALUES ('Spot', 'Brad', 'dog');\n" +"QUIT" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:327 +msgid "Once back in the terminal enter:" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:333 +msgid "tarantool> box.space.mysqldata:select()" +msgstr "" + +#: ../../doc/how-to/sql/improving_mysql.rst:337 +msgid "You should see the replicated data in Tarantool!" +msgstr "" diff --git a/locale/en/how-to/sql/index.pot b/locale/en/how-to/sql/index.pot new file mode 100644 index 0000000000..252e63ce5d --- /dev/null +++ b/locale/en/how-to/sql/index.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/sql/index.rst:2 +msgid "SQL guides" +msgstr "" + +#: ../../doc/how-to/sql/index.rst:4 +msgid "This section contains hands-on SQL guides. You might also want to read the in-depth :ref:`SQL reference `." +msgstr "" diff --git a/locale/en/how-to/sql/sql_beginners_guide.pot b/locale/en/how-to/sql/sql_beginners_guide.pot new file mode 100644 index 0000000000..d561b3ad5b --- /dev/null +++ b/locale/en/how-to/sql/sql_beginners_guide.pot @@ -0,0 +1,942 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:4 +msgid "SQL beginners' guide" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:6 +msgid "The Beginners' Guide describes how users can start up with SQL with Tarantool, and necessary concepts." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:8 +msgid "The SQL Beginners' Guide is about databases in general, and about the relationship between Tarantool's NoSQL and SQL products. Most of the matters in the Beginners' Guide will already be familiar to people who have used relational databases before." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:15 +msgid "Sample table" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:17 +msgid "In football training camp it is traditional for the trainer to begin by showing a football and saying \"this is a football\". In that spirit, this is a table:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:20 +msgid "TABLE\n" +" [1] [2] [3]\n" +" +-----------------+----------------+----------------+\n" +" Row#1 | Row#1,Column#1 | Row#1,Column#2 | Row#1,Column#3 |\n" +" +-----------------+----------------+----------------+\n" +" Row#2 | Row#2,Column#1 | Row#2,Column#2 | Row#2,Column#3 |\n" +" +-----------------+----------------+----------------+\n" +" Row#3 | Row#3,Column#1 | Row#3,Column#2 | Row#3,Column#3 |\n" +" +-----------------+----------------+----------------+" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:32 +msgid "But the labels are misleading -- one usually doesn't identify rows and columns by their ordinal positions, one prefers to pick out specific items by their contents. In that spirit, this is a table:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:35 +#: ../../doc/how-to/sql/sql_beginners_guide.rst:698 +msgid "MODULES\n" +"\n" +"+-----------------+------+---------------------+\n" +"| NAME | SIZE | PURPOSE |\n" +"+-----------------+------+---------------------+\n" +"| box | 1432 | Database Management |\n" +"| clock | 188 | Seconds |\n" +"| crypto | 4 | Cryptography |\n" +"+-----------------+------+---------------------+" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:47 +msgid "So one does not use longitude/latitude navigation by talking about \"Row#2 Column #2\", one uses the contents of the Name column and the name of the Size column by talking about \"the size, where the name is 'clock'\". To be more exact, this is what one says:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:52 +#: ../../doc/how-to/sql/sql_beginners_guide.rst:331 +#: ../../doc/how-to/sql/sql_beginners_guide.rst:386 +msgid "SELECT size FROM modules WHERE name = 'clock';" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:56 +msgid "If you're familiar with Tarantool's architecture -- and ideally you read about that before coming to this chapter -- then you know that there is a NoSQL way to get the same thing:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:60 +msgid "box.space.MODULES:select()[2][2]" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:64 +msgid "Well, you can do that. One of the advantages of Tarantool is that if you can get data via an SQL statement, then you can get the same data via a NoSQL request. But the reverse is not true, because not all NoSQL tuple sets are definable as SQL tables. These restrictions apply for SQL that do not apply for NoSQL: |br| 1. Every column must have a name. |br| 2. Every column should have a scalar type (Tarantool is relaxed about which particular scalar type you can have, but there is no way to index and search arrays, tables within tables, or what MessagePack calls \"maps\".)" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:73 +msgid "Tarantool/NoSQL's \"format\" clause causes the same restrictions." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:75 +msgid "So an SQL \"table\" is a NoSQL \"tuple set with format restrictions\", an SQL \"row\" is a NoSQL \"tuple\", an SQL \"column\" is a NoSQL \"list of fields within a tuple set\"." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:81 +msgid "Creating a table" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:83 +msgid "This is how to create the modules table:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:85 +msgid "CREATE TABLE modules (name STRING, size INTEGER, purpose STRING, PRIMARY KEY (name));" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:89 +msgid "The words that are IN CAPITAL LETTERS are \"keywords\" (although it is only a convention in this manual that keywords are in capital letters, in practice many programmers prefer to avoid shouting). A keyword has meaning for the SQL parser so many keywords are reserved, they cannot be used as names unless they are enclosed inside quotation marks." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:94 +msgid "The word \"modules\" is a \"table name\", and the words \"name\" and \"size\" and \"purpose\" are \"column names\". All tables and all columns must have names." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:97 +msgid "The words \"STRING\" and \"INTEGER\" are \"data types\". STRING means \"the contents should be characters, the length is indefinite, the equivalent NoSQL type is 'string''\". INTEGER means \"the contents should be numbers without decimal points, the equivalent NoSQL type is 'integer'\". Tarantool supports other data types but this section's example table has data types from the two main groups, namely, data types for numbers and data types for strings." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:103 +msgid "The final clause, PRIMARY KEY (name), means that the name column is the main column used to identify the row." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:108 +msgid "Nulls" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:110 +msgid "Frequently it is necessary, at least temporarily, that a column value should be NULL. Typical situations are: the value is unknown, or the value is not applicable. For example, you might make a module as a placeholder but you don't want to say its size or purpose. If such things are possible, the column is \"nullable\". The example table's name column cannot contain nulls, and it could be defined explicitly as \"name STRING NOT NULL\", but in this case that's unnecessary -- a column defined as PRIMARY KEY is automatically NOT NULL." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:117 +msgid "Is a NULL in SQL the same thing as a nil in Lua? No, but it is close enough that there will be confusion. When nil means \"unknown\" or \"inapplicable\", yes. But when nil means \"nonexistent\" or \"type is nil\", no. NULL is a value, it has a data type because it is inside a column which is defined with that data type." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:126 +msgid "Creating an index" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:128 +msgid "This is how to create indexes for the modules table:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:130 +msgid "CREATE INDEX size ON modules (size);\n" +"CREATE UNIQUE INDEX purpose ON modules (purpose);" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:135 +msgid "There is no need to create an index on the name column, because Tarantool creates an index automatically when it sees a PRIMARY KEY clause in the CREATE TABLE statement. In fact there is no need to create indexes on the size or purpose columns either -- if indexes don't exist, then it is still possible to use the columns for searches. Typically people create non-primary indexes, also called secondary indexes, when it becomes clear that the table will grow large and searches will be frequent, because searching with an index is generally much faster than searching without an index." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:143 +msgid "Another use for indexes is to enforce uniqueness. When an index is created with CREATE UNIQUE INDEX for the purpose column, it is not possible to have duplicate values in that column." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:150 +msgid "Data change" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:152 +msgid "Putting data into a table is called \"inserting\". Changing data is called \"updating\". Removing data is called \"deleting\". Together, the three SQL statements INSERT plus UPDATE plus DELETE are the three main \"data-change\" statements." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:157 +msgid "This is how to insert, update, and delete a row in the modules table:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:159 +msgid "INSERT INTO modules VALUES ('json', 14, 'format functions for JSON');\n" +"UPDATE modules SET size = 15 WHERE name = 'json';\n" +"DELETE FROM modules WHERE name = 'json';" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:165 +msgid "The corresponding non-SQL Tarantool requests would be:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:167 +msgid "box.space.MODULES:insert{'json', 14, 'format functions for JSON'}\n" +"box.space.MODULES:update('json', {{'=', 2, 15}})\n" +"box.space.MODULES:delete{'json'}" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:173 +msgid "This is how one would populate the table with the values that was shown earlier:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:175 +msgid "INSERT INTO modules VALUES ('box', 1432, 'Database Management');\n" +"INSERT INTO modules VALUES ('clock', 188, 'Seconds');\n" +"INSERT INTO modules VALUES ('crypto', 4, 'Cryptography');" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:184 +msgid "Constraints" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:186 +msgid "Some data-change statements are illegal due to something in the table's definition. This is called \"constraining what can be done\". Some types of constraints have already been shown ..." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:189 +msgid "NOT NULL -- if a column is defined with a NOT NULL clause, it is illegal to put NULL into it. A primary-key column is automatically NOT NULL." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:192 +msgid "UNIQUE -- if a column has a UNIQUE index, it is illegal to put a duplicate into it. A primary-key column automatically has a UNIQUE index." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:195 +msgid "data domain -- if a column is defined as having data type INTEGER, it is illegal to put a non-number into it. More generally, if a value doesn't correspond to the data type of the definition, it is illegal. Some database management systems (DBMSs) are very forgiving and will try to make allowances for bad values rather than reject them; Tarantool is a bit more strict than those DBMSs." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:200 +msgid "Now, here are other types of constraints ..." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:202 +msgid "CHECK -- a table description can have a clause \"CHECK (conditional expression)\". For example, if the CREATE TABLE modules statement looked like this:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:205 +msgid "CREATE TABLE modules (name STRING,\n" +" size INTEGER,\n" +" purpose STRING,\n" +" PRIMARY KEY (name),\n" +" CHECK (size > 0));" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:213 +msgid "then this INSERT statement would be illegal: |br| ``INSERT INTO modules VALUES ('box', 0, 'The Database Kernel');`` |br| because there is a CHECK constraint saying that the second column, the size column, cannot contain a value which is less than or equal to zero. Try this instead: |br| ``INSERT INTO modules VALUES ('box', 1, 'The Database Kernel');``" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:219 +msgid "FOREIGN KEY -- a table description can have a clause \"FOREIGN KEY (column-list) REFERENCES table (column-list)\". For example, if there is a new table \"submodules\" which in a way depends on the modules table, it can be defined like this:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:224 +msgid "CREATE TABLE submodules (name STRING,\n" +" module_name STRING,\n" +" size INTEGER,\n" +" purpose STRING,\n" +" PRIMARY KEY (name),\n" +" FOREIGN KEY (module_name) REFERENCES\n" +" modules (name));" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:234 +msgid "Now try to insert a new row into this submodules table:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:236 +msgid "INSERT INTO submodules VALUES\n" +" ('space', 'Box', 10000, 'insert etc.');" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:241 +msgid "The insert will fail because the second column (module_name) refers to the name column in the modules table, and the name column in the modules table does not contain 'Box'. However, it does contain 'box'. By default searches in Tarantool's SQL use a binary collation. This will work:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:247 +msgid "INSERT INTO submodules\n" +" VALUES ('space', 'box', 10000, 'insert etc.');" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:252 +msgid "Now try to delete the corresponding row from the modules table:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:254 +msgid "DELETE FROM modules WHERE name = 'box';" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:258 +msgid "The delete will fail because the second column (module_name) in the submodules table refers to the name column in the modules table, and the name column in the modules table would not contain 'box' if the delete succeeded. So the FOREIGN KEY constraint affects both the table which contains the FOREIGN KEY clause and the table that the FOREIGN KEY clause refers to." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:264 +msgid "The constraints in a table's definition -- NOT NULL, UNIQUE, data domain, CHECK, and FOREIGN KEY -- are guarantors of the database's integrity. It is important that they are fixed and well-defined parts of the definition, and hard to bypass with SQL. This is often seen as a difference between SQL and NoSQL -- SQL emphasizes law and order, NoSQL emphasizes freedom and making your own rules." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:274 +msgid "Table relationships" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:276 +msgid "Think about the two tables that have been discussed so far:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:278 +msgid "CREATE TABLE modules (name STRING,\n" +" size INTEGER,\n" +" purpose STRING,\n" +" PRIMARY KEY (name),\n" +" CHECK (size > 0));\n" +"\n" +"CREATE TABLE submodules (name STRING,\n" +" module_name STRING,\n" +" size INTEGER,\n" +" purpose STRING,\n" +" PRIMARY KEY (name),\n" +" FOREIGN KEY (module_name) REFERENCES\n" +" modules (name));" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:300 +msgid "Because of the FOREIGN KEYS clause in the submodules table, there is clearly a many-to-one relationship: |br| submodules -->> modules |br| that is, every submodules row must refer to one (and only one) modules row, while every modules row can be referred to in zero or more submodules rows." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:305 +msgid "Table relationships are important, but beware: do not trust anyone who tells you that databases made with SQL are relational \"because there are relationships between tables\". That is wrong, as will be clear in the discussion about what makes a database relational, later." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:313 +msgid "Selecting with WHERE" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:317 +msgid "By default, Tarantool prohibits ``SELECT`` queries that scan table rows instead of using indexes to avoid unwanted heavy load. For the purposes of this tutorial, allow SQL scan queries in Tarantool by running the command:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:321 +msgid "SET SESSION \"sql_seq_scan\" = true;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:325 +msgid "Alternatively, you can allow a specific query to perform a table scan by adding the ``SEQSCAN`` keyword before the table name. Learn more about using ``SEQSCAN`` in SQL scan queries in the :ref:`SQL FROM clause description `." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:329 +msgid "We gave a simple example of a SELECT statement earlier:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:335 +msgid "The clause \"WHERE name = 'clock'\" is legal in other statements -- it is in examples with UPDATE and DELETE -- but here the only examples will be with SELECT." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:338 +msgid "The first variation is that the WHERE clause does not have to be specified at all, it is optional. So this statement would return all rows:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:341 +msgid "SELECT size FROM modules;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:345 +msgid "The second variation is that the comparison operator does not have to be '=', it can be anything that makes sense: '>' or '>=' or '<' or '<=', or 'LIKE' which is an operator that works with strings that may contain wildcard characters '_' meaning 'match any one character' or '%' meaning 'match any zero or one or many characters'. These are legal statements which return all rows:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:352 +msgid "SELECT size FROM modules WHERE name >= '';\n" +"SELECT size FROM modules WHERE name LIKE '%';" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:357 +msgid "The third variation is that IS [NOT] NULL is a special condition. Remembering that the NULL value can mean \"it is unknown what the value should be\", and supposing that in some row the size is NULL, then the condition \"size > 10\" is not certainly true and it is not certainly false, so it is evaluated as \"unknown\". Ordinarily the application of a WHERE clause filters out both false and unknown results. So when searching for NULL, say IS NULL; when searching anything that is not NULL, say IS NOT NULL. This statement will return all rows because (due to the definition) there are no NULLs in the name column:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:367 +msgid "SELECT size FROM modules WHERE name IS NOT NULL;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:371 +msgid "The fourth variation is that conditions can be combined with AND / OR, and negated with NOT." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:373 +msgid "So this statement would return all rows (the first condition is false but the second condition is true, and OR means \"return true if either condition is true\"):" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:376 +msgid "SELECT size\n" +"FROM modules\n" +"WHERE name = 'wombat' OR size IS NOT NULL;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:382 +msgid "**Selecting with a select list**" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:384 +msgid "Yet again, here is a simple example of a SELECT statement:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:390 +msgid "The words between SELECT and FROM are the select list. In this case, the select list is just one word: size. Formally it means that the desire is to return the size values, and technically the name for picking a particular column is called \"projection\"." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:395 +msgid "The first variation is that one can specify any column in any order:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:397 +msgid "SELECT name, purpose, size FROM modules;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:401 +msgid "The second variation is that one can specify an expression, it does not have to be a column name, it does not even have to include a column name. The common expression operators for numbers are the arithmetic operators ``+ - / *``; the common expression operator for strings is the concatenation operator ||. For example this statement will return 8, 'XY':" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:407 +msgid "SELECT size * 2, 'X' || 'Y' FROM modules WHERE size = 4;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:411 +msgid "The third variation is that one can add a clause [AS name] after every expression, so that in the return the column titles will make sense. This is especially important when a title might otherwise be ambiguous or meaningless. For example this statement will return 8, 'XY' as before" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:416 +msgid "SELECT size * 2 AS double_size, 'X' || 'Y' AS concatenated_literals FROM modules\n" +" WHERE size = 4;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:421 +msgid "but displayed as a table the result will look like" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:423 +msgid "+----------------+------------------------+\n" +"| DOUBLE_SIZE | CONCATENATED_LITERALS |\n" +"+----------------+------------------------+\n" +"| 8 | XY |\n" +"+----------------+------------------------+" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:431 +msgid "**Selecting with a select list with asterisk**" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:433 +msgid "Instead of listing columns in a select list, one can just say ``'*'``. For example" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:435 +msgid "SELECT * FROM modules;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:439 +msgid "This is the same thing as" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:441 +msgid "SELECT name, size, purpose FROM modules;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:445 +msgid "Selecting with ``\"*\"`` saves time for the writer, but it is unclear to a reader who has not memorized what the column names are. Also it is unstable, because there is a way to change a table's definition (the ALTER statement, which is an advanced topic). Nevertheless, although it might be bad to use it for production, it is handy to use it for introduction, so ``\"*\"`` will appear in some following examples." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:455 +msgid "Select with subqueries" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:457 +msgid "Remember that there is a modules table and there is a submodules table. Suppose that there is a desire to list the submodules that refer to modules for which the purpose is X. That is, this involves a search of one table using a value in another table. This can be done by enclosing \"(SELECT ...)\" within the WHERE clause. For example:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:462 +msgid "SELECT name FROM submodules\n" +"WHERE module_name =\n" +" (SELECT name FROM modules WHERE purpose LIKE '%Database%');" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:468 +msgid "Subqueries are also useful in the select list, when one wishes to combine information from more than one table. For example this statement will display submodules rows but will include values that come from the modules table:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:472 +msgid "SELECT name AS submodules_name,\n" +" (SELECT purpose FROM modules\n" +" WHERE modules.name = submodules.module_name)\n" +" AS modules_purpose,\n" +" purpose AS submodules_purpose\n" +"FROM submodules;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:481 +msgid "Whoa. What are \"modules.name\" and \"submodules.name\"? Whenever you see \"x . y\" you are looking at a \"qualified column name\", and the first part is a table identifier, the second part is a column identifier. It is always legal to use qualified column names, but until now it has not been necessary. Now it is necessary, or at least it is a good idea, because both tables have a column named \"name\"." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:487 +#: ../../doc/how-to/sql/sql_beginners_guide.rst:720 +#: ../../doc/how-to/sql/sql_beginners_guide.rst:741 +msgid "The result will look like this:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:489 +msgid "+-------------------+------------------------+--------------------+\n" +"| SUBMODULES_NAME | MODULES_PURPOSE | SUBMODULES_PURPOSE |\n" +"+-------------------+------------------------+--------------------+\n" +"| space | Database Management | insert etc. |\n" +"+-------------------+------------------------+--------------------+" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:497 +msgid "Perhaps you have read somewhere that SQL stands for \"Structured Query Language\". That is not true any more. But it is true that the query syntax allows for a structural component, namely the subquery, and that was the original idea. However, there is a different way to combine tables -- with joins instead of subqueries." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:506 +msgid "Select with Cartesian join" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:508 +msgid "Until now only \"FROM modules\" or \"FROM submodules\" was used in SELECT statements. What if there was more than one table in the FROM clause? For example" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:511 +msgid "SELECT * FROM modules, submodules;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:515 +msgid "or" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:517 +msgid "SELECT * FROM modules JOIN submodules;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:521 +msgid "That is legal. Usually it is not what you want, but it is a learning aid. The result will be:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:523 +msgid "{ columns from modules table } { columns from submodules table }\n" +"+--------+------+---------------------+-------+-------------+-------+-------------+\n" +"| NAME | SIZE | PURPOSE | NAME | MODULE_NAME | SIZE | PURPOSE |\n" +"+--------+------+---------------------+-------+-------------+-------+-------------+\n" +"| box | 1432 | Database Management | space | box | 10000 | insert etc. |\n" +"| clock | 188 | Seconds | space | box | 10000 | insert etc. |\n" +"| crypto | 4 | Cryptography | space | box | 10000 | insert etc. |\n" +"+--------+------+---------------------+-------+-------------+-------+-------------+" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:534 +msgid "It is not an error. The meaning of this type of join is \"combine every row in table-1 with every row in table-2\". It did not specify what the relationship should be, so the result has everything, even when the submodule has nothing to do with the module." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:538 +msgid "It is handy to look at the above result, called a \"Cartesian join\" result, to see what would really be desirable. Probably for this case the row that actually makes sense is the one where the modules.name = submodules.module_name, and it's better to make that clear in both the select list and the WHERE clause, thus:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:542 +msgid "SELECT modules.name AS modules_name,\n" +" modules.size AS modules_size,\n" +" modules.purpose AS modules_purpose,\n" +" submodules.name,\n" +" module_name,\n" +" submodules.size,\n" +" submodules.purpose\n" +"FROM modules, submodules\n" +"WHERE modules.name = submodules.module_name;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:554 +msgid "The result will be:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:556 +msgid "+----------+-----------+------------+--------+---------+-------+-------------+\n" +"| MODULES_ | MODULES_ | MODULES_ | NAME | MODULE_ | SIZE | PURPOSE |\n" +"| NAME | SIZE | PURPOSE | | NAME | | |\n" +"+----------+-----------+--------- --+--------+---------+-------+-------------+\n" +"| box | 1432 | Database | space | box | 10000 | insert etc. |\n" +"| | | Management | | | | |\n" +"+----------+-----------+------------+--------+---------+-------+-------------+" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:566 +msgid "In other words, you can specify a Cartesian join in the FROM clause, then you can filter out the irrelevant rows in the WHERE clause, and then you can rename columns in the select list. This is fine, and every SQL DBMS supports this. But it is worrisome that the number of rows in a Cartesian join is always (number of rows in first table multiplied by number of rows in second table), which means that conceptually you are often filtering in a large set of rows." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:574 +msgid "It is good to start by looking at Cartesian joins because they show the concept. Many people, though, prefer to use different syntaxes for joins because they look better or clearer. So now those alternatives will be shown." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:581 +msgid "Select with join with ON clause" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:583 +msgid "The ON clause would have the same comparisons as the WHERE clause that was illustrated for the previous section, but the use of different syntax would be making it clear \"this is for the sake of the join\". Readers can see at a glance that it is, in concept at least, an initial step before the result rows are filtered. For example this" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:589 +msgid "SELECT * FROM modules JOIN submodules\n" +" ON (modules.name = submodules.module_name);" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:594 +msgid "is the same as" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:596 +msgid "SELECT * FROM modules, submodules\n" +" WHERE modules.name = submodules.module_name;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:604 +msgid "Select with join with USING clause" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:606 +msgid "The USING clause would take advantage of names that are held in common between the two tables, with the assumption that the intent is to match those columns with '=' comparisons. For example," +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:609 +msgid "SELECT * FROM modules JOIN submodules USING (name);" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:613 +msgid "has the same effect as" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:615 +msgid "SELECT * FROM modules JOIN submodules WHERE modules.name = submodules.name;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:619 +msgid "If the table had been created with a plan in advance to use USING clauses, that would save time. But that did not happen. So, although the above example \"works\", the results will not be sensible." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:626 +msgid "Select with natural join" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:628 +msgid "A natural join would take advantage of names that are held in common between the two tables, and would do the filtering automatically based on that knowledge, and throw away duplicate columns." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:631 +msgid "If the table had been created with a plan in advance to use natural joins, that would be very handy. But that did not happen. So, although the following example \"works\", the results won't be sensible." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:634 +msgid "SELECT * FROM modules NATURAL JOIN submodules;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:638 +msgid "Result: nothing, because modules.name does not match submodules.name, and so on And even if there had been a result, it would only have included four columns: name, module_name, size, purpose." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:645 +msgid "Select with left join" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:647 +msgid "Now what if there is a desire to join modules to submodules, but it's necessary to be sure that all the modules are found? In other words, suppose the requirement is to get modules even if the condition submodules.module_name = modules.name is not true, because the module has no submodules." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:652 +msgid "When that is the requirement, the type of join is an \"outer join\" (as opposed to the type that has been used so far which is an \"inner join\"). Specifically the format will be LEFT [OUTER] JOIN because the main table, modules, is on the left. For example:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:656 +msgid "SELECT *\n" +"FROM modules LEFT JOIN submodules\n" +"ON modules.name = submodules.module_name;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:662 +msgid "which returns:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:664 +msgid "{ columns from modules table } { columns from submodules table }\n" +"+--------+------+---------------------+-------+-------------+-------+-------------+\n" +"| NAME | SIZE | PURPOSE | NAME | MODULE_NAME | SIZE | PURPOSE |\n" +"+--------+------+---------------------+-------+-------------+-------+-------------+\n" +"| box | 1432 | Database Management | space | box | 10000 | insert etc. |\n" +"| clock | 188 | Seconds | NULL | NULL | NULL | NULL |\n" +"| crypto | 4 | Cryptography | NULL | NULL | NULL | NULL |\n" +"+--------+------+---------------------+-------+-------------+-------+-------------+" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:675 +msgid "Thus, for the submodules of the clock module and the submodules of the crypto module -- which do not exist -- there are NULLs in every column." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:681 +msgid "Select with functions" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:683 +msgid "A function can take any expression, including an expression that contains another function, and return a scalar value. There are many such functions. Here will be a description of only one, SUBSTR, which returns a substring of a string." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:687 +msgid "Format: :samp:`SUBSTR({input-string}, {start-with} [, {length}])`" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:689 +msgid "Description: SUBSTR takes input-string, eliminates any characters before start-with, eliminates any characters after (start-with plus length), and returns the result." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:692 +msgid "Example: ``SUBSTR('abcdef', 2, 3)`` returns 'bcd'." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:694 +msgid "Select with aggregation, GROUP BY, and HAVING" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:696 +msgid "Remember that the modules table looks like this:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:711 +msgid "Suppose that there is no need to know all the individual size values, all that is important is their aggregation, that is, take the attributes of the collection. SQL allows aggregation functions including: AVG (average), SUM, MIN (minimum), MAX (maximum), and COUNT. For example" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:716 +msgid "SELECT AVG(size), SUM(size), MIN(size), MAX(size), COUNT(size) FROM modules;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:722 +msgid "+-----------+-----------+-----------+-----------+-----------+\n" +"| COLUMN_1 | COLUMN_2 | COLUMN_3 | COLUMN_4 | COLUMN_5 |\n" +"+-----------+-----------+-----------+-----------+-----------|\n" +"| 541 | 1624 | 4 | 1432 | 3 |\n" +"+-----------+-----------+-----------+-----------+-----------+" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:730 +msgid "Suppose that the requirement is aggregations, but aggregations of rows that have some common characteristic. Supposing further, the rows should be divided into two groups, the ones whose names begin with 'b' and the ones whose names begin with 'c'. This can be done by adding a clause [GROUP BY expression]. For example," +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:735 +msgid "SELECT SUBSTR(name, 1, 1), AVG(size), SUM(size), MIN(size), MAX(size), COUNT(size)\n" +"FROM modules\n" +"GROUP BY SUBSTR(name, 1, 1);" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:743 +msgid "+------------+--------------+-----------+-----------+-----------+-------------+\n" +"| COLUMN_1 | COLUMN_2 | COLUMN_3 | COLUMN_4 | COLUMN_5 | COLUMN_6 |\n" +"+------------+--------------+-----------+-----------+-----------+-------------+\n" +"| b | 1432 | 1432 | 1432 | 1432 | 1 |\n" +"| c | 96 | 192 | 4 | 188 | 2 |\n" +"+------------+--------------+-----------+-----------+-----------+-------------+" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:756 +msgid "Select with common table expression" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:758 +msgid "It is possible to define a temporary (viewed) table within a statement, usually within a SELECT statement, using a WITH clause. For example:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:761 +msgid "WITH tmp_table AS (SELECT x1 FROM t1) SELECT * FROM tmp_table;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:768 +msgid "Select with order, limit, and offset clauses" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:770 +msgid "So far, tor every search in the modules table, the rows have come out in alphabetical order by name: 'box', then 'clock', then 'crypto'. However, to really be sure about the order, or to ask for a different order, it is necessary to be explicit and add a clause: ``ORDER BY column-name [ASC|DESC]``. (ASC stands for ASCending, DESC stands for DESCending.) For example:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:778 +msgid "SELECT * FROM modules ORDER BY name DESC;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:782 +msgid "The result will be the usual rows, in descending alphabetical order: 'crypto' then 'clock' then 'box'." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:784 +msgid "After the ORDER BY clause there can be a clause LIMIT n, where n is the maximum number of rows to retrieve. For example:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:786 +msgid "SELECT * FROM modules ORDER BY name DESC LIMIT 2;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:790 +msgid "The result will be the first two rows, 'crypto' and 'clock'." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:792 +msgid "After the ORDER BY clause and the LIMIT clause there can be a clause OFFSET n, where n is the row to start with. The first offset is 0. For example:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:795 +msgid "SELECT * FROM modules ORDER BY name DESC LIMIT 2 OFFSET 2;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:799 +msgid "The result will be the third row, 'box'." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:804 +msgid "Views" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:806 +msgid "A view is a canned SELECT. If you have a complex SELECT that you want to run frequently, create a view and then do a simple SELECT on the view. For example:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:808 +msgid "CREATE VIEW v AS SELECT size, (size *5) AS size_times_5\n" +"FROM modules\n" +"GROUP BY size, name\n" +"ORDER BY size_times_5;\n" +"SELECT * FROM v;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:819 +msgid "Transactions" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:821 +msgid "Tarantool has a \"Write Ahead Log\" (WAL). Effects of data-change statements are logged before they are permanently stored on disk. This is a reason that, although entire databases can be stored in temporary memory, they are not vulnerable in case of power failure." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:826 +msgid "Tarantool supports commits and rollbacks. In effect, asking for a commit means asking for all the recent data-change statements, since a transaction began, to become permanent. In effect, asking for a rollback means asking for all the recent data-change statements, since a transaction began, to be cancelled." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:832 +msgid "For example, consider these statements:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:834 +msgid "CREATE TABLE things (remark STRING, PRIMARY KEY (remark));\n" +"START TRANSACTION;\n" +"INSERT INTO things VALUES ('A');\n" +"COMMIT;\n" +"START TRANSACTION;\n" +"INSERT INTO things VALUES ('B');\n" +"ROLLBACK;\n" +"SELECT * FROM things;" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:845 +msgid "The result will be: one row, containing 'A'. The ROLLBACK cancelled the second INSERT statement, but did not cancel the first one, because it had already been committed." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:848 +msgid "Ordinarily every statement is automatically committed." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:850 +msgid "After START TRANSACTION, statements are not automatically committed -- Tarantool considers that a transaction is now \"active\", until the transaction ends with a COMMIT statement or a ROLLBACK statement. While a transaction is active, all statements are legal except another START TRANSACTION." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:857 +msgid "Implementing Tarantool's SQL On Top of NoSQL" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:859 +msgid "Tarantool's SQL data is the same as Tarantool's NoSQL data. When you create a table or an index with SQL, you are creating a space or an index in NoSQL. For example:" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:862 +msgid "CREATE TABLE things (remark STRING, PRIMARY KEY (remark));\n" +"INSERT INTO things VALUES ('X');" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:867 +msgid "is somewhat similar to" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:869 +msgid "box.schema.space.create('THINGS',\n" +"{\n" +" format = {\n" +" [1] = {[\"name\"] = \"REMARK\", [\"type\"] = \"string\"}\n" +" }\n" +"})\n" +"box.space.THINGS:create_index('pk_unnamed_THINGS_1',{unique=true,parts={1,'string'}})\n" +"box.space.THINGS:insert{'X'}" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:880 +msgid "Therefore you can take advantage of Tarantool's NoSQL features even though your primary language is SQL. Here are some possibilities." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:883 +msgid "(1) NoSQL applications written in one of the connector languages may be slightly faster than SQL applications because SQL statements may require more parsing and may be translated to NoSQL requests." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:886 +msgid "(2) You can write stored procedures in Lua, combining Lua loop-control and Lua library-access statements with SQL statements. These routines are executed on the server, which is the principal advantage of pure-SQL stored procedures." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:889 +msgid "(3) There are some options that are implemented in NoSQL that are not (yet) implemented in SQL. For example you can use NoSQL to change an index option, and to deny access to users named 'guest'." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:892 +msgid "(4) System spaces such as _space and _index can be accessed with SQL SELECT statements. This is not quite the same as an information_schema, but it does mean that you can use SQL to access the database's metadata catalog." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:896 +msgid "Fields in NoSQL spaces can be accessed with SQL if and only if they are scalar and are defined in format clauses. Indexes of NoSQL spaces will be used with SQL if and only if they are TREE indexes." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:902 +msgid "Relational databases" +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:904 +msgid "Edgar F. Codd, the person most responsible for researching and explaining relational database concepts, listed the main criteria as (`Codd's 12 rules `_)." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:908 +msgid "Although Tarantool is not advertised as \"relational\", Tarantool comes with a claim that it complies with these rules, with the following caveats and exceptions ..." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:911 +msgid "The rules state that all data must be viewable as relations. A Tarantool SQL table is a relation. However, it is possible to have duplicate values in SQL tables and it is possible to have an implicit ordering. Those characteristics are not allowed for true relations." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:916 +msgid "The rules state that there must be a dynamic online catalog. Tarantool has one but some metadata is missing from it." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:918 +msgid "The rules state that the data language must support authorization. Tarantool's SQL does not. Authorization occurs via NoSQL requests." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:921 +msgid "The rules require that data must be physically independent (from underlying storage changes) and logically independent (from application program changes). So far there is not enough experience to make this guarantee." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:925 +msgid "The rules require certain types of updatable views. Tarantool's views are not updatable." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:927 +msgid "The rules state that it should be impossible to use a low-level language to bypass integrity as defined in the relational-level language. In Tarantool's case, this is not true, for example one can execute a request with Tarantool's NoSQL to violate a foreign-key constraint that was defined with Tarantool's SQL." +msgstr "" + +#: ../../doc/how-to/sql/sql_beginners_guide.rst:932 +msgid "To learn more about SQL in Tarantool, check the :ref:`reference `." +msgstr "" diff --git a/locale/en/how-to/sql/sql_tutorial.pot b/locale/en/how-to/sql/sql_tutorial.pot new file mode 100644 index 0000000000..032a45bebc --- /dev/null +++ b/locale/en/how-to/sql/sql_tutorial.pot @@ -0,0 +1,963 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/sql/sql_tutorial.rst:4 +msgid "SQL tutorial" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:6 +msgid "This tutorial is a demonstration of the support for SQL in Tarantool. It includes the functionality that you'd encounter in an \"SQL-101\" course." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:12 +msgid "Starting up with a first table and SELECTs" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:15 +msgid "Initialize" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:17 +msgid "In this tutorial, the requests are done in the Tarantool interactive console. Start Tarantool and initialize it with :ref:`default settings ` by calling ``box.cfg{}``:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:21 +msgid "tarantool> box.cfg{}" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:25 +msgid "Now you can start working with the database." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:28 +msgid "Switch to the SQL language" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:30 +msgid "A feature of the client console program is that you can switch languages and specify the end-of-statement delimiter." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:33 +msgid "Run the following commands to set the console input language to SQL and use semicolon as a delimiter:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:36 +msgid "tarantool> \\set language sql\n" +"tarantool> \\set delimiter ;" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:43 +msgid "CREATE, INSERT, UPDATE, SELECT" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:45 +msgid "To get started, enter simple SQL statements:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:47 +msgid "CREATE TABLE table1 (column1 INTEGER PRIMARY KEY, column2 VARCHAR(100));\n" +"INSERT INTO table1 VALUES (1, 'A');\n" +"UPDATE table1 SET column2 = 'B';\n" +"SELECT * FROM table1 WHERE column1 = 1;" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:54 +msgid "The result of the ``SELECT`` statement looks like this:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:56 +msgid "tarantool> SELECT * FROM table1 WHERE column1 = 1;\n" +"---\n" +"- metadata:\n" +" - name: COLUMN1\n" +" type: integer\n" +" - name: COLUMN2\n" +" type: string\n" +" rows:\n" +" - [1, 'B']\n" +"..." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:69 +msgid "The result includes:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:71 +msgid "Metadata: the names and data types of each column" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:72 +msgid "Result rows" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:74 +msgid "For conciseness, metadata is skipped in query results in this tutorial. Only the result rows are shown." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:78 +msgid "CREATE TABLE" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:80 +msgid "Here is ``CREATE TABLE`` with more details:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:82 +msgid "There are multiple columns, with different data types." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:83 +msgid "There is a ``PRIMARY KEY`` (unique and not-null) for two of the columns." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:85 +msgid "CREATE TABLE table2 (column1 INTEGER,\n" +" column2 VARCHAR(100),\n" +" column3 SCALAR,\n" +" column4 DOUBLE,\n" +" PRIMARY KEY (column1, column2));" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:93 +msgid "The result is: ``row_count: 1``." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:96 +msgid "INSERT" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:98 +msgid "Put four rows in the table:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:100 +msgid "The INTEGER and DOUBLE columns get numbers" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:101 +msgid "The VARCHAR and SCALAR columns get strings (the SCALAR strings are expressed as hexadecimals)" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:104 +msgid "INSERT INTO table2 VALUES (1, 'AB', X'4142', 5.5);\n" +"INSERT INTO table2 VALUES (1, 'CD', X'2020', 1E4);\n" +"INSERT INTO table2 VALUES (2, 'AB', X'2020', 12.34567);\n" +"INSERT INTO table2 VALUES (-1000, '', X'', 0.0);" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:111 +msgid "Then try to put another row:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:113 +msgid "INSERT INTO table2 VALUES (1, 'AB', X'A5', -5.5);" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:117 +msgid "This ``INSERT`` fails because of a primary-key violation: the row with the primary key ``1, 'AB'`` already exists." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:121 +msgid "The SEQSCAN keyword" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:123 +msgid "In Tarantool, ``SELECT`` SQL queries that perform sequential scans (that is, go through all the table rows instead of using indexes) are prohibited by default. For example, this query leads to the error ``Scanning is not allowed for 'table2'``:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:127 +msgid "SELECT * FROM table2;" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:131 +msgid "To execute a scan query, put the ``SEQSCAN`` keyword before the table name:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:133 +msgid "SELECT * FROM SEQSCAN table2;" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:137 +msgid "Try to execute these queries that use indexed ``column1`` in filters:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:139 +msgid "SELECT * FROM table2 WHERE column1 = 1;\n" +"SELECT * FROM table2 WHERE column1 + 1 = 2;" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:144 +#: ../../doc/how-to/sql/sql_tutorial.rst:185 +#: ../../doc/how-to/sql/sql_tutorial.rst:244 +#: ../../doc/how-to/sql/sql_tutorial.rst:310 +#: ../../doc/how-to/sql/sql_tutorial.rst:355 +#: ../../doc/how-to/sql/sql_tutorial.rst:443 +#: ../../doc/how-to/sql/sql_tutorial.rst:519 +#: ../../doc/how-to/sql/sql_tutorial.rst:542 +#: ../../doc/how-to/sql/sql_tutorial.rst:574 +#: ../../doc/how-to/sql/sql_tutorial.rst:597 +#: ../../doc/how-to/sql/sql_tutorial.rst:666 +#: ../../doc/how-to/sql/sql_tutorial.rst:695 +#: ../../doc/how-to/sql/sql_tutorial.rst:760 +msgid "The result is:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:146 +msgid "The first query returns rows:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:148 +msgid "- [1, 'AB', 'AB', 10.5]\n" +"- [1, 'CD', ' ', 10005]" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:153 +msgid "The second query fails with the error ``Scanning is not allowed for 'TABLE2'``. Although ``column1`` is indexed, the expression ``column1 + 1`` is not calculated from the index, which makes this ``SELECT`` a scan query." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:159 +msgid "You can allow SQL scan queries without ``SEQSCAN`` for the current session by running the command:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:162 +msgid "SET SESSION \"sql_seq_scan\" = true;" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:167 +msgid "Learn more about using ``SEQSCAN`` in the :ref:`SQL FROM clause description `." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:170 +msgid "SELECT with ORDER BY clause" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:172 +msgid "Retrieve the 4 rows in the table, in descending order by ``column2``, then (where the ``column2`` values are the same) in ascending order by ``column4``." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:175 +msgid "``*`` is short for \"all columns\"." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:177 +msgid "SELECT * FROM SEQSCAN table2 ORDER BY column2 DESC, column4 ASC;" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:183 +msgid "Tarantool has its own" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:187 +msgid "- - [1, 'CD', ' ', 10000]\n" +" - [1, 'AB', 'AB', 5.5]\n" +" - [2, 'AB', ' ', 12.34567]\n" +" - [-1000, '', '', 0]" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:195 +msgid "SELECT with WHERE clauses" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:197 +msgid "Retrieve some of what you inserted:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:199 +msgid "The first statement uses the ``LIKE`` comparison operator which is asking for \"first character must be 'A', the next characters can be anything.\"" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:202 +msgid "The second statement uses logical operators and parentheses, so the ANDed expressions must be true, or the ORed expression must be true. Notice the columns don't have to be indexed." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:206 +msgid "SELECT column1, column2, column1 * column4 FROM SEQSCAN table2 WHERE column2\n" +"LIKE 'A%';\n" +"SELECT column1, column2, column3, column4 FROM SEQSCAN table2\n" +" WHERE (column1 < 2 AND column4 < 10)\n" +" OR column3 = X'2020';" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:214 +#: ../../doc/how-to/sql/sql_tutorial.rst:271 +msgid "The results are:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:216 +msgid "- - [1, 'AB', 5.5]\n" +" - [2, 'AB', 24.69134]" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:221 +msgid "and" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:223 +msgid "- - [-1000, '', '', 0]\n" +" - [1, 'AB', 'AB', 5.5]\n" +" - [1, 'CD', ' ', 10000]\n" +" - [2, 'AB', ' ', 12.34567]" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:231 +msgid "SELECT with GROUP BY and aggregate functions" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:233 +msgid "Retrieve with grouping." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:235 +msgid "The rows which have the same values for ``column2`` are grouped and are aggregated -- summed, counted, averaged -- for ``column4``." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:238 +msgid "SELECT column2, SUM(column4), COUNT(column4), AVG(column4)\n" +"FROM SEQSCAN table2\n" +"GROUP BY column2;" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:246 +msgid "- - ['', 0, 1, 0]\n" +" - ['AB', 17.84567, 2, 8.922835]\n" +" - ['CD', 10000, 1, 10000]" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:255 +msgid "Complications and complex SELECTs" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:258 +msgid "NULLs" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:260 +msgid "Insert rows that contain ``NULL`` values." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:262 +msgid "``NULL`` is not the same as Lua ``nil``; it commonly is used in SQL for unknown or not-applicable." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:265 +msgid "INSERT INTO table2 VALUES (1, NULL, X'4142', 5.5);\n" +"INSERT INTO table2 VALUES (0, '!!@', NULL, NULL);\n" +"INSERT INTO table2 VALUES (0, '!!!', X'00', NULL);" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:273 +msgid "The first ``INSERT`` fails because ``NULL`` is not permitted for a column that was defined with a ``PRIMARY KEY`` clause." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:276 +msgid "The other ``INSERT`` statements succeed." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:279 +msgid "Indexes" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:281 +msgid "Create a new index on ``column4``." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:283 +msgid "There already is an index for the primary key. Indexes are useful for making queries faster. In this case, the index also acts as a constraint, because it prevents two rows from having the same values in ``column4``. However, it is not an error that ``column4`` has multiple occurrences of NULLs." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:288 +msgid "CREATE UNIQUE INDEX i ON table2 (column4);" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:292 +msgid "The result is: ``rowcount: 1``." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:295 +msgid "Create a subset table" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:297 +msgid "Create a table ``table3``, which contains a subset of the ``table2`` columns and a subset of the ``table2`` rows." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:300 +msgid "You can do this by combining ``INSERT`` with ``SELECT``. Then select everything from the result table." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:303 +msgid "CREATE TABLE table3 (column1 INTEGER, column2 VARCHAR(100), PRIMARY KEY\n" +"(column2));\n" +"INSERT INTO table3 SELECT column1, column2 FROM SEQSCAN table2 WHERE column1 <> 2;\n" +"SELECT * FROM SEQSCAN table3;" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:312 +msgid "- - [-1000, '']\n" +" - [0, '!!!']\n" +" - [0, '!!@']\n" +" - [1, 'AB']\n" +" - [1, 'CD']" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:321 +msgid "SELECT with a subquery" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:323 +msgid "A subquery is a query within a query." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:325 +msgid "Find all the rows in ``table2`` whose ``(column1, column2)`` values are not present in ``table3``." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:328 +msgid "SELECT * FROM SEQSCAN table2 WHERE (column1, column2) NOT IN (SELECT column1,\n" +"column2 FROM SEQSCAN table3);" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:333 +msgid "The result is the single row that was excluded when inserting the rows with the ``INSERT ... SELECT`` statement:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:336 +msgid "- - [2, 'AB', ' ', 12.34567]" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:341 +msgid "SELECT with a join" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:343 +msgid "A join is a combination of two tables. There is more than one way to do them in Tarantool: \"Cartesian joins\", \"left outer joins\", and so on." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:346 +msgid "This example shows the most typical case, where column values from one table match column values from another table." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:349 +msgid "SELECT * FROM SEQSCAN table2, table3\n" +" WHERE table2.column1 = table3.column1 AND table2.column2 = table3.column2\n" +" ORDER BY table2.column4;" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:357 +msgid "- - [0, '!!!', \"\\0\", null, 0, '!!!']\n" +" - [0, '!!@', null, null, 0, '!!@']\n" +" - [-1000, '', '', 0, -1000, '']\n" +" - [1, 'AB', 'AB', 5.5, 1, 'AB']\n" +" - [1, 'CD', ' ', 10000, 1, 'CD']" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:368 +msgid "Constraints and foreign keys" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:371 +msgid "CREATE TABLE with a CHECK clause" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:373 +msgid "Create a table which includes a constraint that there must not be any rows containing ``13`` in ``column2``. Then try to insert such a row." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:376 +msgid "CREATE TABLE table4 (column1 INTEGER PRIMARY KEY, column2 INTEGER, CHECK\n" +"(column2 <> 13));\n" +"INSERT INTO table4 VALUES (12, 13);" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:382 +msgid "Result: the insert fails, as it should, with the message ``Check constraint 'ck_unnamed_TABLE4_1' failed for tuple``." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:386 +msgid "CREATE TABLE with a FOREIGN KEY clause" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:388 +msgid "Create a table which includes a constraint that there must not be any rows containing values that do not appear in ``table2``." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:391 +msgid "CREATE TABLE table5 (column1 INTEGER, column2 VARCHAR(100),\n" +" PRIMARY KEY (column1),\n" +" FOREIGN KEY (column1, column2) REFERENCES table2 (column1, column2));\n" +"INSERT INTO table5 VALUES (2,'AB');\n" +"INSERT INTO table5 VALUES (3,'AB');" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:399 +#: ../../doc/how-to/sql/sql_tutorial.rst:491 +msgid "Result:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:401 +msgid "The first ``INSERT`` statement succeeds because ``table3`` contains a row with ``[2, 'AB', ' ', 12.34567]``." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:403 +msgid "The second ``INSERT`` statement, correctly, fails with the message ``Foreign key constraint ''fk_unnamed_TABLE5_1'' failed: foreign tuple was not found``." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:407 +msgid "UPDATE" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:409 +msgid "Due to earlier ``INSERT`` statements, these values are in ``column4`` of ``table2``: ``{0, NULL, NULL, 5.5, 10000, 12.34567}``. Add ``5`` to each of these values except ``0``. Adding ``5`` to ``NULL`` results in NULL, as SQL arithmetic requires. Use ``SELECT`` to see what happened to ``column4``." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:414 +msgid "UPDATE table2 SET column4 = column4 + 5 WHERE column4 <> 0;\n" +"SELECT column4 FROM SEQSCAN table2 ORDER BY column4;" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:419 +msgid "The result is: ``{NULL, NULL, 0, 10.5, 17.34567, 10005}``." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:422 +msgid "DELETE" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:424 +msgid "Due to earlier ``INSERT`` statements, there are 6 rows in ``table2``:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:426 +msgid "- - [-1000, '', '', 0]\n" +" - [0, '!!!', \"\\0\", null]\n" +" - [0, '!!@', null, null]\n" +" - [1, 'AB', 'AB', 10.5]\n" +" - [1, 'CD', ' ', 10005]\n" +" - [2, 'AB', ' ', 17.34567]" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:435 +msgid "Try to delete the last and first of these rows:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:437 +msgid "DELETE FROM table2 WHERE column1 = 2;\n" +"DELETE FROM table2 WHERE column1 = -1000;\n" +"SELECT COUNT(column1) FROM SEQSCAN table2;" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:445 +msgid "The first ``DELETE`` statement causes an error because there's a foreign-key constraint." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:447 +msgid "The second ``DELETE`` statement succeeds." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:448 +msgid "The ``SELECT`` statement shows that there are 5 rows remaining." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:451 +msgid "ALTER TABLE with a FOREIGN KEY clause" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:453 +msgid "Create another constraint that there must not be any rows in ``table1`` containing values that do not appear in ``table5``. This was impossible during the ``table1`` creation because at that time ``table5`` did not exist. You can add constraints to existing tables with the ``ALTER TABLE`` statement." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:458 +msgid "ALTER TABLE table1 ADD CONSTRAINT c\n" +" FOREIGN KEY (column1) REFERENCES table5 (column1);\n" +"DELETE FROM table1;\n" +"ALTER TABLE table1 ADD CONSTRAINT c\n" +" FOREIGN KEY (column1) REFERENCES table5 (column1);" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:466 +msgid "Result: the ``ALTER TABLE`` statement fails the first time because there is a row in ``table1``, and ``ADD CONSTRAINT`` requires that the table be empty. After the row is deleted, the ``ALTER TABLE`` statement completes successfully. Now there is a chain of references, from ``table1`` to ``table5`` and from ``table5`` to ``table2``." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:473 +msgid "Triggers" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:475 +msgid "The idea of a trigger is: if a change (``INSERT`` or ``UPDATE`` or ``DELETE``) happens, then a further action -- perhaps another ``INSERT`` or ``UPDATE`` or ``DELETE`` -- will happen." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:479 +msgid "Set up the following trigger: when a update to ``table3`` is done, do an update to ``table2``. Specify this as ``FOR EACH ROW``, so that the trigger activates 5 times (since there are 5 rows in ``table3``)." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:483 +msgid "SELECT column4 FROM table2 WHERE column1 = 2;\n" +"CREATE TRIGGER tr AFTER UPDATE ON table3 FOR EACH ROW\n" +"BEGIN UPDATE table2 SET column4 = column4 + 1 WHERE column1 = 2; END;\n" +"UPDATE table3 SET column2 = column2;\n" +"SELECT column4 FROM table2 WHERE column1 = 2;" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:493 +msgid "The first ``SELECT`` shows that the original value of ``column4`` in ``table2`` where ``column1 = 2`` was: 17.34567." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:495 +msgid "The second ``SELECT`` returns:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:497 +msgid "- - [22.34567]" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:504 +msgid "Operators and functions" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:507 +msgid "String operations" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:509 +msgid "You can manipulate string data (usually defined with ``CHAR`` or ``VARCHAR`` data types) in many ways. For example:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:512 +msgid "concatenate strings with the ``||`` operator" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:513 +msgid "extract substrings with the ``SUBSTR`` function" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:515 +msgid "SELECT column2, column2 || column2, SUBSTR(column2, 2, 1) FROM SEQSCAN table2;" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:521 +msgid "- - ['!!!', '!!!!!!', '!']\n" +" - ['!!@', '!!@!!@', '!']\n" +" - ['AB', 'ABAB', 'B']\n" +" - ['CD', 'CDCD', 'D']\n" +" - ['AB', 'ABAB', 'B']" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:530 +msgid "Number operations" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:532 +msgid "You can also manipulate number data (usually defined with ``INTEGER`` or ``DOUBLE`` data types) in many ways. For example:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:535 +msgid "shift left with the ``<<`` operator" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:536 +msgid "get modulo with the ``%`` operator" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:538 +msgid "SELECT column1, column1 << 1, column1 << 2, column1 % 2 FROM SEQSCAN table2;" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:544 +msgid "- - [0, 0, 0, 0]\n" +" - [0, 0, 0, 0]\n" +" - [1, 2, 4, 1]\n" +" - [1, 2, 4, 1]\n" +" - [2, 4, 8, 0]" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:553 +msgid "Ranges and limits" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:555 +msgid "Tarantool can handle:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:557 +msgid "integers anywhere in the 4-byte integer range" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:558 +msgid "approximate-numerics anywhere in the 8-byte IEEE floating point range" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:559 +msgid "any Unicode characters, with UTF-8 encoding and a choice of collations" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:561 +msgid "Insert such values in a new table and see what happens when you select them with arithmetic on a number column and ordering by a string column." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:564 +msgid "CREATE TABLE t6 (column1 INTEGER, column2 VARCHAR(10), column4 DOUBLE,\n" +"PRIMARY KEY (column1));\n" +"INSERT INTO t6 VALUES (-1234567890, 'АБВГД', 123456.123456);\n" +"INSERT INTO t6 VALUES (+1234567890, 'GD', 1e30);\n" +"INSERT INTO t6 VALUES (10, 'FADEW?', 0.000001);\n" +"INSERT INTO t6 VALUES (5, 'ABCDEFG', NULL);\n" +"SELECT column1 + 1, column2, column4 * 2 FROM SEQSCAN t6 ORDER BY column2;" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:576 +msgid "- - [6, 'ABCDEFG', null]\n" +" - [11, 'FADEW?', 2e-06]\n" +" - [1234567891, 'GD', 2e+30]\n" +" - [-1234567889, 'АБВГД', 246912.246912]" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:584 +msgid "Views" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:586 +msgid "A view (or *viewed table*), is virtual, meaning that its rows aren't physically in the database, their values are calculated from other tables." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:589 +msgid "Create a view ``v3`` based on ``table3`` and select from it:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:591 +msgid "CREATE VIEW v3 AS SELECT SUBSTR(column2,1,2), column4 FROM SEQSCAN t6\n" +"WHERE column4 >= 0;\n" +"SELECT * FROM v3;" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:599 +#: ../../doc/how-to/sql/sql_tutorial.rst:622 +msgid "- - ['АБ', 123456.123456]\n" +" - ['FA', 1e-06]\n" +" - ['GD', 1e+30]" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:606 +msgid "Common table expressions" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:608 +msgid "By putting ``WITH`` + ``SELECT`` in front of a ``SELECT``, you can make a temporary view that lasts for the duration of the statement." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:611 +msgid "Create such a view and select from it:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:613 +msgid "WITH cte AS (\n" +" SELECT SUBSTR(column2,1,2), column4 FROM SEQSCAN t6\n" +" WHERE column4 >= 0)\n" +"SELECT * FROM cte;" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:620 +msgid "The result is the same as the ``CREATE VIEW`` result:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:629 +msgid "VALUES" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:631 +msgid "Tarantool can handle statements like ``SELECT 55;`` (select without ``FROM``) like some other popular DBMSs. But it also handles the more standard statement ``VALUES (expression [, expression ...]);``." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:635 +msgid "SELECT 55 * 55, 'The rain in Spain';\n" +"VALUES (55 * 55, 'The rain in Spain');" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:640 +msgid "The result of both these statements is:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:642 +msgid "- - [3025, 'The rain in Spain']" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:647 +msgid "Metadata" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:649 +msgid "To find out the internal structure of the Tarantool database with SQL, select from the Tarantool system tables ``_space``, ``_index``, and ``_trigger``:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:652 +msgid "SELECT * FROM SEQSCAN \"_space\";\n" +"SELECT * FROM SEQSCAN \"_index\";\n" +"SELECT * FROM SEQSCAN \"_trigger\";" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:658 +msgid "Actually, these statements select from NoSQL \"system spaces\"." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:660 +msgid "Select from ``_space`` by a table name:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:662 +msgid "SELECT \"id\", \"name\", \"owner\", \"engine\" FROM \"_space\" WHERE \"name\"='TABLE3';" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:668 +msgid "- - [517, 'TABLE3', 1, 'memtx']" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:675 +msgid "Using SQL from Lua" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:677 +msgid "You can execute SQL statements directly from the Lua code without switching to the SQL input." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:680 +msgid "Change the settings so that the console accepts statements written in Lua instead of statements written in SQL:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:683 +msgid "tarantool> \\set language lua" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:688 +msgid "box.execute()" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:689 +msgid "You can invoke SQL statements using the Lua function ``box.execute(string)``." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:691 +msgid "tarantool> box.execute([[SELECT * FROM SEQSCAN table3;]]);" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:697 +msgid "- - [-1000, '']\n" +" - [0, '!!!']\n" +" - [0, '!!@']\n" +" - [1, 'AB']\n" +" - [1, 'CD']\n" +"..." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:707 +msgid "Create a million-row table" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:709 +msgid "To see how the SQL in Tarantool scales, create a bigger table." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:711 +msgid "The following Lua code generates one million rows with random data and inserts them into a table. Copy this code into the Tarantool console and wait a bit:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:715 +msgid "box.execute(\"CREATE TABLE tester (s1 INT PRIMARY KEY, s2 VARCHAR(10))\");\n" +"\n" +"function string_function()\n" +" local random_number\n" +" local random_string\n" +" random_string = \"\"\n" +" for x = 1,10,1 do\n" +" random_number = math.random(65, 90)\n" +" random_string = random_string .. string.char(random_number)\n" +" end\n" +" return random_string\n" +"end;\n" +"\n" +"function main_function()\n" +" local string_value, t, sql_statement\n" +" for i = 1,1000000,1 do\n" +" string_value = string_function()\n" +" sql_statement = \"INSERT INTO tester VALUES (\" .. i .. \",'\" .. string_value .. \"')\"\n" +" box.execute(sql_statement)\n" +" end\n" +"end;\n" +"start_time = os.clock();\n" +"main_function();\n" +"end_time = os.clock();\n" +"print('insert done in ' .. end_time - start_time .. ' seconds');" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:743 +msgid "The result is: you now have a table with a million rows, with a message saying \"``insert done in 88.570578 seconds``\"." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:748 +msgid "Select from a million-row table" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:750 +msgid "Check how ``SELECT`` works on the million-row table:" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:752 +msgid "the first query goes by an index because ``s1`` is the primary key" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:753 +msgid "the second query does not go by an index" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:755 +msgid "box.execute([[SELECT * FROM tester WHERE s1 = 73446;]]);\n" +"box.execute([[SELECT * FROM SEQSCAN tester WHERE s2 LIKE 'QFML%';]]);" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:762 +msgid "the first statement completes instantaneously" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:763 +msgid "the second statement completed noticeably slower" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:766 +msgid "Cleanup and exit" +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:768 +msgid "To cleanup all the objects created in this tutorial, switch to the SQL input language again. Then run the ``DROP`` statements for all created tables, views, and triggers." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:772 +msgid "These statements must be entered separately." +msgstr "" + +#: ../../doc/how-to/sql/sql_tutorial.rst:774 +msgid "tarantool> \\set language sql\n" +"tarantool> DROP TABLE tester;\n" +"tarantool> DROP TABLE table1;\n" +"tarantool> DROP VIEW v3;\n" +"tarantool> DROP TRIGGER tr;\n" +"tarantool> DROP TABLE table5;\n" +"tarantool> DROP TABLE table4;\n" +"tarantool> DROP TABLE table3;\n" +"tarantool> DROP TABLE table2;\n" +"tarantool> DROP TABLE t6;\n" +"tarantool> \\set language lua\n" +"tarantool> os.exit();" +msgstr "" diff --git a/locale/en/how-to/vshard_quick.pot b/locale/en/how-to/vshard_quick.pot new file mode 100644 index 0000000000..4cbb0bb4d4 --- /dev/null +++ b/locale/en/how-to/vshard_quick.pot @@ -0,0 +1,227 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/how-to/vshard_quick.rst:4 +msgid "Quick start with sharding" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:6 +msgid "For installation instructions, check out the :ref:`vshard installation manual `." +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:8 +msgid "For a pre-configured development cluster, check out the ``example/`` directory in the `vshard repository `__. This example includes 5 Tarantool instances and 2 replica sets:" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:12 +msgid "``router_1`` – a ``router`` instance" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:13 +msgid "``storage_1_a`` – a ``storage`` instance, the **master** of the **first** replica set" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:14 +msgid "``storage_1_b`` – a ``storage`` instance, the **replica** of the **first** replica set" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:15 +msgid "``storage_2_a`` – a ``storage`` instance, the **master** of the **second** replica set" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:16 +msgid "``storage_2_b`` – a ``storage`` instance, the **replica** of the **second** replica set" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:18 +msgid "All instances are managed using the :ref:`tt ` administrative utility." +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:20 +msgid "Change the directory to ``example/`` and use ``make`` to run the development cluster:" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:22 +msgid "$ cd example/\n" +"$ make" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:27 +msgid "Essential ``make`` commands you need to know:" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:29 +msgid "``make start`` – start all Tarantool instances" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:30 +msgid "``make stop`` – stop all Tarantool instances" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:31 +msgid "``make logcat`` – show logs from all instances" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:32 +msgid "``make enter`` – enter the admin console on ``router_1``" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:33 +msgid "``make clean`` – clean up all persistent data" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:34 +msgid "``make test`` – run the test suite (you can also run ``test-run.py`` in the ``test`` directory)" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:35 +msgid "``make`` – execute ``make stop``, ``make clean``, ``make start`` and ``make enter``" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:37 +msgid "For example, to start all instances, use ``make start``:" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:39 +msgid "$ make start\n" +"$ ps x|grep tarantool\n" +"46564 ?? Ss 0:00.34 tarantool storage_1_a.lua \n" +"46566 ?? Ss 0:00.19 tarantool storage_1_b.lua \n" +"46568 ?? Ss 0:00.35 tarantool storage_2_a.lua \n" +"46570 ?? Ss 0:00.20 tarantool storage_2_b.lua \n" +"46572 ?? Ss 0:00.25 tarantool router_1.lua " +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:49 +msgid "To perform commands in the admin console, use the router's :ref:`public API `:" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:52 +msgid "unix/:./data/router_1.control> vshard.router.info()\n" +"---\n" +"- replicasets:\n" +" ac522f65-aa94-4134-9f64-51ee384f1a54:\n" +" replica: &0\n" +" network_timeout: 0.5\n" +" status: available\n" +" uri: storage@127.0.0.1:3303\n" +" uuid: 1e02ae8a-afc0-4e91-ba34-843a356b8ed7\n" +" uuid: ac522f65-aa94-4134-9f64-51ee384f1a54\n" +" master: *0\n" +" cbf06940-0790-498b-948d-042b62cf3d29:\n" +" replica: &1\n" +" network_timeout: 0.5\n" +" status: available\n" +" uri: storage@127.0.0.1:3301\n" +" uuid: 8a274925-a26d-47fc-9e1b-af88ce939412\n" +" uuid: cbf06940-0790-498b-948d-042b62cf3d29\n" +" master: *1\n" +" bucket:\n" +" unreachable: 0\n" +" available_ro: 0\n" +" unknown: 0\n" +" available_rw: 3000\n" +" status: 0\n" +" alerts: []\n" +"..." +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:85 +msgid "Sample configuration" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:87 +msgid "The configuration of a simple sharded cluster can look like this:" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:89 +msgid "local cfg = {\n" +" memtx_memory = 100 * 1024 * 1024,\n" +" bucket_count = 10000,\n" +" rebalancer_disbalance_threshold = 10,\n" +" rebalancer_max_receiving = 100,\n" +" sharding = {\n" +" ['cbf06940-0790-498b-948d-042b62cf3d29'] = {\n" +" replicas = {\n" +" ['8a274925-a26d-47fc-9e1b-af88ce939412'] = {\n" +" uri = 'storage:storage@127.0.0.1:3301',\n" +" name = 'storage_1_a',\n" +" master = true\n" +" },\n" +" ['3de2e3e1-9ebe-4d0d-abb1-26d301b84633'] = {\n" +" uri = 'storage:storage@127.0.0.1:3302',\n" +" name = 'storage_1_b'\n" +" }\n" +" },\n" +" },\n" +" ['ac522f65-aa94-4134-9f64-51ee384f1a54'] = {\n" +" replicas = {\n" +" ['1e02ae8a-afc0-4e91-ba34-843a356b8ed7'] = {\n" +" uri = 'storage:storage@127.0.0.1:3303',\n" +" name = 'storage_2_a',\n" +" master = true\n" +" },\n" +" ['001688c3-66f8-4a31-8e19-036c17d489c2'] = {\n" +" uri = 'storage:storage@127.0.0.1:3304',\n" +" name = 'storage_2_b'\n" +" }\n" +" },\n" +" },\n" +" },\n" +"}" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:126 +msgid "This cluster includes one ``router`` instance and two ``storage`` instances. Each ``storage`` instance includes one master and one replica. The ``sharding`` field defines the logical topology of a sharded Tarantool cluster. All the other fields are passed to ``box.cfg()`` as they are, without modifications. See the :ref:`Configuration reference ` section for details." +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:132 +msgid "On routers, call ``vshard.router.cfg(cfg)``:" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:134 +msgid "cfg.listen = 3300\n" +"\n" +"-- Start the database with sharding\n" +"vshard = require('vshard')\n" +"vshard.router.cfg(cfg)" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:142 +msgid "On storages, call ``vshard.storage.cfg(cfg, instance_uuid)``:" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:144 +msgid "-- Get instance name\n" +"local MY_UUID = \"de0ea826-e71d-4a82-bbf3-b04a6413e417\"\n" +"\n" +"-- Call a configuration provider\n" +"local cfg = require('localcfg')\n" +"\n" +"-- Start the database with sharding\n" +"vshard = require('vshard')\n" +"vshard.storage.cfg(cfg, MY_UUID)" +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:156 +msgid "``vshard.storage.cfg()`` automatically calls ``box.cfg()`` and configures the listen port and replication parameters." +msgstr "" + +#: ../../doc/how-to/vshard_quick.rst:159 +msgid "For a sample configuration, see ``router.lua`` and ``storage.lua`` in the ``example/`` directory of the `vshard repository `__." +msgstr "" diff --git a/locale/en/index.pot b/locale/en/index.pot new file mode 100644 index 0000000000..3685ae8a5e --- /dev/null +++ b/locale/en/index.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/index.rst:50 +msgid "CRUD operations" +msgstr "" + +#: ../../doc/index.rst:10 +msgid "Tarantool -- Documentation" +msgstr "" diff --git a/locale/en/overview.pot b/locale/en/overview.pot new file mode 100644 index 0000000000..729f52b8a9 --- /dev/null +++ b/locale/en/overview.pot @@ -0,0 +1,185 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/overview.rst:2 +msgid "Overview" +msgstr "" + +#: ../../doc/overview.rst:5 +msgid "What is Tarantool?" +msgstr "" + +#: ../../doc/overview.rst:7 +msgid "Tarantool combines an in-memory DBMS and a Lua server in a single platform providing ACID-compliant storage. It comes in two :ref:`editions `: Community and Enterprise. The :ref:`use cases ` for Tarantool vary from ultra-fast cache to product data marts and smart queue services." +msgstr "" + +#: ../../doc/overview.rst:13 +msgid "Here are some of Tarantool's key characteristics:" +msgstr "" + +#: ../../doc/overview.rst:15 +msgid "**Easy handling of OLTP workloads**: processes hundreds of thousands RPS" +msgstr "" + +#: ../../doc/overview.rst:17 +msgid "**Data integrity**: :ref:`write-ahead log (WAL) ` and :ref:`data snapshots `" +msgstr "" + +#: ../../doc/overview.rst:20 +msgid "**Cooperative multitasking**: transactions are performed in :ref:`lightweight coroutines ` with no interthread locking" +msgstr "" + +#: ../../doc/overview.rst:23 +msgid "**Advanced indexing**: :ref:`composite indexes `, :ref:`locale support `, indexing by :ref:`nested fields and arrays `" +msgstr "" + +#: ../../doc/overview.rst:27 +msgid "**Compute close to data**: :ref:`Lua server ` and Just-In-Time compiler on board" +msgstr "" + +#: ../../doc/overview.rst:30 +msgid "**Durable distributed storage**: multiple failover modes and :ref:`RAFT-based synchronous replication ` available" +msgstr "" + +#: ../../doc/overview.rst:34 +msgid "Tarantool allows executing code alongside data, which helps increase the speed of operations. Developers can :ref:`implement any business logic with Lua `, and a single Tarantool instance can also receive :ref:`SQL requests `." +msgstr "" + +#: ../../doc/overview.rst:38 +msgid "Tarantool has a variety of compatible `modules `__ (Lua rocks). You can pick the ones that you need and install them manually." +msgstr "" + +#: ../../doc/overview.rst:41 +msgid "Tarantool runs on Linux (x86_64, aarch64), Mac OS X (x86_64, M1), and FreeBSD (x86_64)." +msgstr "" + +#: ../../doc/overview.rst:43 +msgid "You can use Tarantool with a programming language you're familiar with. For this purpose, a number of :ref:`connectors ` are provided." +msgstr "" + +#: ../../doc/overview.rst:49 +msgid "Editions" +msgstr "" + +#: ../../doc/overview.rst:51 +msgid "Tarantool comes in two editions: the open-source **Community Edition (CE)** and the commercial **Enterprise Edition (EE)**." +msgstr "" + +#: ../../doc/overview.rst:54 +msgid "**Tarantool Community Edition** lets you develop applications and speed up a system in operation. It features :ref:`synchronous replication `, affords easy :ref:`scalability `, and includes tools to develop efficient :ref:`applications `. The `Tarantool community `__ helps with any practical questions regarding the Community Edition." +msgstr "" + +#: ../../doc/overview.rst:60 +msgid "**Tarantool Enterprise Edition** `provides advanced tools `__ for administration, deployment, and security management, along with premium support services. This edition includes all the Community Edition features and is more predictable in terms of solution cost and maintenance. The Enterprise Edition is shipped as an SDK and includes a number of closed-source modules. See the :ref:`Tarantool Enterprise Edition ` documentation." +msgstr "" + +#: ../../doc/overview.rst:70 +msgid "Use cases" +msgstr "" + +#: ../../doc/overview.rst:73 +msgid "Fast first-class storage" +msgstr "" + +#: ../../doc/overview.rst:75 +msgid "Primary storage" +msgstr "" + +#: ../../doc/overview.rst:77 +msgid "No secondary storage required" +msgstr "" + +#: ../../doc/overview.rst:79 +msgid "Tolerance to high write loads" +msgstr "" + +#: ../../doc/overview.rst:80 +msgid "Support of relational approaches" +msgstr "" + +#: ../../doc/overview.rst:81 +msgid "Composite secondary indexes" +msgstr "" + +#: ../../doc/overview.rst:83 +msgid "Data access, data slices" +msgstr "" + +#: ../../doc/overview.rst:85 +msgid "Predictable request latency" +msgstr "" + +#: ../../doc/overview.rst:88 +msgid "Advanced cache" +msgstr "" + +#: ../../doc/overview.rst:90 +msgid "Write-behind caching" +msgstr "" + +#: ../../doc/overview.rst:91 +msgid "Secondary index support" +msgstr "" + +#: ../../doc/overview.rst:92 +msgid "Complex invalidation algorithm support" +msgstr "" + +#: ../../doc/overview.rst:95 +msgid "Smart queue" +msgstr "" + +#: ../../doc/overview.rst:97 +msgid "Support of various identification techniques" +msgstr "" + +#: ../../doc/overview.rst:98 +msgid "Advanced task lifecycle management" +msgstr "" + +#: ../../doc/overview.rst:100 +msgid "Task scheduling" +msgstr "" + +#: ../../doc/overview.rst:101 +msgid "Archiving of completed tasks" +msgstr "" + +#: ../../doc/overview.rst:104 +msgid "Data-centric applications" +msgstr "" + +#: ../../doc/overview.rst:106 +msgid "Arbitrary data flows from many sources" +msgstr "" + +#: ../../doc/overview.rst:107 +msgid "Incoming data processing" +msgstr "" + +#: ../../doc/overview.rst:108 +msgid "Storage" +msgstr "" + +#: ../../doc/overview.rst:109 +msgid "Background cycle processing" +msgstr "" + +#: ../../doc/overview.rst:111 +msgid "Scheduling support" +msgstr "" diff --git a/locale/en/overview_index.pot b/locale/en/overview_index.pot new file mode 100644 index 0000000000..b0b276d98d --- /dev/null +++ b/locale/en/overview_index.pot @@ -0,0 +1,21 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/overview_index.rst:6 +msgid "Overview" +msgstr "" diff --git a/locale/en/pdf_toc.pot b/locale/en/pdf_toc.pot new file mode 100644 index 0000000000..5191a17e2c --- /dev/null +++ b/locale/en/pdf_toc.pot @@ -0,0 +1,21 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/pdf_toc.rst:9 +msgid "CRUD operations" +msgstr "" diff --git a/locale/en/reference/configuration/configuration_reference.pot b/locale/en/reference/configuration/configuration_reference.pot new file mode 100644 index 0000000000..694213295a --- /dev/null +++ b/locale/en/reference/configuration/configuration_reference.pot @@ -0,0 +1,1514 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-11 13:03+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/configuration/configuration_reference.rst:4 +msgid "Configuration reference" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:9 +msgid "This topic describes all :ref:`configuration parameters ` provided by Tarantool." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:11 +msgid "Most of the configuration options described in this reference can be applied to a specific instance, replica set, group, or to all instances globally. To do so, you need to define the required option at the :ref:`specified level `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:18 +msgid "config" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:20 +msgid "The ``config`` section defines various parameters related to centralized configuration." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:24 +msgid "``config`` can be defined in the global :ref:`scope ` only." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:26 +msgid ":ref:`config.reload `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:27 +msgid ":ref:`config.version `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:28 +msgid ":ref:`config.etcd.* `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:34 +#: ../../doc/reference/configuration/configuration_reference.rst:55 +#: ../../doc/reference/configuration/configuration_reference.rst:95 +#: ../../doc/reference/configuration/configuration_reference.rst:111 +#: ../../doc/reference/configuration/configuration_reference.rst:128 +#: ../../doc/reference/configuration/configuration_reference.rst:141 +#: ../../doc/reference/configuration/configuration_reference.rst:155 +#: ../../doc/reference/configuration/configuration_reference.rst:169 +#: ../../doc/reference/configuration/configuration_reference.rst:183 +#: ../../doc/reference/configuration/configuration_reference.rst:197 +#: ../../doc/reference/configuration/configuration_reference.rst:211 +#: ../../doc/reference/configuration/configuration_reference.rst:225 +#: ../../doc/reference/configuration/configuration_reference.rst:238 +msgid "**Since:** :doc:`3.0.0 `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:36 +msgid "Specify how the configuration is reloaded. This option accepts the following values:" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:39 +msgid "``auto``: configuration is reloaded automatically when it is changed." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:40 +msgid "``manual``: configuration should be reloaded manually. In this case, you can reload the configuration in the application code using :ref:`config:reload() `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:42 +msgid "See also: :ref:`Reloading configuration `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:45 +#: ../../doc/reference/configuration/configuration_reference.rst:60 +#: ../../doc/reference/configuration/configuration_reference.rst:120 +#: ../../doc/reference/configuration/configuration_reference.rst:133 +#: ../../doc/reference/configuration/configuration_reference.rst:146 +#: ../../doc/reference/configuration/configuration_reference.rst:160 +#: ../../doc/reference/configuration/configuration_reference.rst:174 +#: ../../doc/reference/configuration/configuration_reference.rst:188 +#: ../../doc/reference/configuration/configuration_reference.rst:243 +#: ../../doc/reference/configuration/configuration_reference.rst:422 +#: ../../doc/reference/configuration/configuration_reference.rst:450 +#: ../../doc/reference/configuration/configuration_reference.rst:467 +#: ../../doc/reference/configuration/configuration_reference.rst:479 +#: ../../doc/reference/configuration/configuration_reference.rst:559 +#: ../../doc/reference/configuration/configuration_reference.rst:599 +#: ../../doc/reference/configuration/configuration_reference.rst:625 +#: ../../doc/reference/configuration/configuration_reference.rst:656 +#: ../../doc/reference/configuration/configuration_reference.rst:941 +#: ../../doc/reference/configuration/configuration_reference.rst:984 +#: ../../doc/reference/configuration/configuration_reference.rst:1040 +#: ../../doc/reference/configuration/configuration_reference.rst:1103 +msgid "Type: string" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:46 +msgid "Possible values: 'auto', 'manual'" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:47 +msgid "Default: 'auto'" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:48 +msgid "Environment variable: TT_CONFIG_RELOAD" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:57 +msgid "A configuration version." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:61 +#: ../../doc/reference/configuration/configuration_reference.rst:103 +#: ../../doc/reference/configuration/configuration_reference.rst:121 +#: ../../doc/reference/configuration/configuration_reference.rst:134 +#: ../../doc/reference/configuration/configuration_reference.rst:147 +#: ../../doc/reference/configuration/configuration_reference.rst:161 +#: ../../doc/reference/configuration/configuration_reference.rst:175 +#: ../../doc/reference/configuration/configuration_reference.rst:189 +#: ../../doc/reference/configuration/configuration_reference.rst:203 +#: ../../doc/reference/configuration/configuration_reference.rst:217 +#: ../../doc/reference/configuration/configuration_reference.rst:231 +#: ../../doc/reference/configuration/configuration_reference.rst:244 +#: ../../doc/reference/configuration/configuration_reference.rst:272 +#: ../../doc/reference/configuration/configuration_reference.rst:281 +msgid "Default: nil" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:62 +msgid "Environment variable: TT_CONFIG_VERSION" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:69 +msgid "config.etcd.*" +msgstr "" + +#: ../../doc/concepts/configuration/configuration_etcd.rst:3 +msgid "Enterprise Edition" +msgstr "" + +#: ../../doc/concepts/configuration/configuration_etcd.rst:6 +msgid "Storing configuration in etcd is supported by the `Enterprise Edition `_ only." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:75 +msgid "This section describes options related to :ref:`storing configuration in etcd `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:77 +msgid ":ref:`config.etcd.endpoints `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:78 +msgid ":ref:`config.etcd.prefix `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:79 +msgid ":ref:`config.etcd.username `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:80 +msgid ":ref:`config.etcd.password `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:81 +msgid ":ref:`config.etcd.ssl.ca_file `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:82 +msgid ":ref:`config.etcd.ssl.ca_path `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:83 +msgid ":ref:`config.etcd.ssl.ssl_key `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:84 +msgid ":ref:`config.etcd.ssl.verify_host `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:85 +msgid ":ref:`config.etcd.ssl.verify_peer `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:86 +msgid ":ref:`config.etcd.http.request.timeout `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:87 +msgid ":ref:`config.etcd.http.request.unix_socket `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:97 +msgid "The list of endpoints used to access an etcd server." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:99 +#: ../../doc/reference/configuration/configuration_reference.rst:117 +msgid "See also: :ref:`Local etcd configuration `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:102 +#: ../../doc/reference/configuration/configuration_reference.rst:1130 +msgid "Type: array" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:104 +msgid "Environment variable: TT_CONFIG_ETCD_ENDPOINTS" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:113 +msgid "A key prefix used to search a configuration on an etcd server. Tarantool searches keys by the following path: ``/config/*``. Note that ```` should start with a slash (``/``)." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:122 +msgid "Environment variable: TT_CONFIG_ETCD_PREFIX" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:130 +msgid "A username used for authentication." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:135 +msgid "Environment variable: TT_CONFIG_ETCD_USERNAME" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:143 +msgid "A password used for authentication." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:148 +msgid "Environment variable: TT_CONFIG_ETCD_PASSWORD" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:157 +msgid "A path to a trusted certificate authorities (CA) file." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:162 +msgid "Environment variable: TT_CONFIG_ETCD_SSL_CA_FILE" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:171 +msgid "A path to a directory holding certificates to verify the peer with." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:176 +msgid "Environment variable: TT_CONFIG_ETCD_SSL_CA_PATH" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:185 +msgid "A path to a private SSL key file." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:190 +msgid "Environment variable: TT_CONFIG_ETCD_SSL_SSL_KEY" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:199 +msgid "Enable verification of the certificate's name (CN) against the specified host." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:202 +#: ../../doc/reference/configuration/configuration_reference.rst:216 +#: ../../doc/reference/configuration/configuration_reference.rst:391 +#: ../../doc/reference/configuration/configuration_reference.rst:506 +#: ../../doc/reference/configuration/configuration_reference.rst:916 +#: ../../doc/reference/configuration/configuration_reference.rst:1148 +msgid "Type: boolean" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:204 +msgid "Environment variable: TT_CONFIG_ETCD_SSL_VERIFY_HOST" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:213 +msgid "Enable verification of the peer's SSL certificate." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:218 +msgid "Environment variable: TT_CONFIG_ETCD_SSL_VERIFY_PEER" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:227 +msgid "A time period required to process an HTTP request to an etcd server: from sending a request to receiving a response." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:230 +#: ../../doc/reference/configuration/configuration_reference.rst:494 +#: ../../doc/reference/configuration/configuration_reference.rst:959 +#: ../../doc/reference/configuration/configuration_reference.rst:1009 +#: ../../doc/reference/configuration/configuration_reference.rst:1166 +#: ../../doc/reference/configuration/configuration_reference.rst:1181 +#: ../../doc/reference/configuration/configuration_reference.rst:1225 +#: ../../doc/reference/configuration/configuration_reference.rst:1258 +msgid "Type: number" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:232 +msgid "Environment variable: TT_CONFIG_ETCD_HTTP_REQUEST_TIMEOUT" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:240 +msgid "A Unix domain socket used to connect to an etcd server." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:245 +msgid "Environment variable: TT_CONFIG_ETCD_HTTP_REQUEST_UNIX_SOCKET" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:253 +msgid "credentials" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:259 +msgid "``credentials`` can be defined in any :ref:`scope `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:262 +msgid ":ref:`credentials.roles.* `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:263 +msgid ":ref:`credentials.users.* `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:264 +msgid ":ref:`.privileges.* `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:271 +#: ../../doc/reference/configuration/configuration_reference.rst:280 +msgid "Type: map" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:273 +msgid "Environment variable: TT_CREDENTIALS_ROLES" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:282 +msgid "Environment variable: TT_CREDENTIALS_USERS" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:289 +msgid "credentials.roles.*" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:300 +#: ../../doc/reference/configuration/configuration_reference.rst:323 +msgid "See :ref:`privileges `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:306 +msgid "credentials.users.*" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:329 +msgid ".privileges.*" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:371 +msgid "database" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:373 +msgid "The ``database`` section defines database-specific configuration parameters, such as an instance's read-write mode or transaction isolation level." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:377 +msgid "``database`` can be defined in any :ref:`scope `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:379 +msgid ":ref:`database.hot_standby `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:380 +msgid ":ref:`database.instance_uuid `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:381 +msgid ":ref:`database.mode `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:382 +msgid ":ref:`database.replicaset_uuid `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:383 +msgid ":ref:`database.txn_isolation `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:384 +msgid ":ref:`database.txn_timeout `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:385 +msgid ":ref:`database.use_mvcc_engine `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:392 +#: ../../doc/reference/configuration/configuration_reference.rst:507 +#: ../../doc/reference/configuration/configuration_reference.rst:1149 +msgid "Default: false" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:393 +msgid "Environment variable: TT_DATABASE_HOT_STANDBY" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:400 +msgid "An :ref:`instance UUID `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:402 +msgid "By default, instance UUIDs are generated automatically. ``database.instance_uuid`` can be used to specify an instance identifier manually." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:405 +msgid "UUIDs should follow these rules:" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:407 +msgid "The values must be true unique identifiers, not shared by other instances or replica sets within the common infrastructure." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:410 +msgid "The values must be used consistently, not changed after the initial setup. The initial values are stored in :ref:`snapshot files ` and are checked whenever the system is restarted." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:416 +msgid "The values must comply with `RFC 4122 `_. The `nil UUID `_ is not allowed." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:419 +msgid "See also: :ref:`database.replicaset_uuid `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:423 +#: ../../doc/reference/configuration/configuration_reference.rst:468 +#: ../../doc/reference/configuration/configuration_reference.rst:560 +#: ../../doc/reference/configuration/configuration_reference.rst:600 +#: ../../doc/reference/configuration/configuration_reference.rst:626 +#: ../../doc/reference/configuration/configuration_reference.rst:657 +#: ../../doc/reference/configuration/configuration_reference.rst:1131 +msgid "Default: :ref:`box.NULL `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:424 +msgid "Environment variable: TT_DATABASE_INSTANCE_UUID" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:431 +msgid "An instance's operating mode. This option is in effect if :ref:`replication.failover ` is set to ``off``." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:434 +msgid "The following modes are available:" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:436 +msgid "``rw``: an instance is in read-write mode." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:437 +msgid "``ro``: an instance is in read-only mode." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:439 +msgid "If not specified explicitly, the default value depends on the number of instances in a replica set. For a single instance, the ``rw`` mode is used, while for multiple instances, the ``ro`` mode is used." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:441 +#: ../../doc/reference/configuration/configuration_reference.rst:586 +#: ../../doc/reference/configuration/configuration_reference.rst:611 +#: ../../doc/reference/configuration/configuration_reference.rst:643 +#: ../../doc/reference/configuration/configuration_reference.rst:808 +#: ../../doc/reference/configuration/configuration_reference.rst:824 +#: ../../doc/reference/configuration/configuration_reference.rst:1089 +#: ../../doc/reference/configuration/configuration_reference.rst:1117 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:443 +msgid "You can set the ``database.mode`` option to ``rw`` on all instances in a replica set to make a :ref:`master-master ` configuration. In this case, ``replication.failover`` should be set to ``off``." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:446 +msgid "credentials:\n" +" users:\n" +" replicator:\n" +" password: 'topsecret'\n" +" roles: [replication]\n" +"\n" +"iproto:\n" +" advertise:\n" +" peer: replicator@\n" +"\n" +"replication:\n" +" failover: off\n" +"\n" +"groups:\n" +" group001:\n" +" replicasets:\n" +" replicaset001:\n" +" instances:\n" +" instance001:\n" +" database:\n" +" mode: rw\n" +" iproto:\n" +" listen: 127.0.0.1:3301\n" +" instance002:\n" +" database:\n" +" mode: rw\n" +" iproto:\n" +" listen: 127.0.0.1:3302\n" +"\n" +"# Load sample data\n" +"app:\n" +" file: 'myapp.lua'" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:451 +msgid "Default: :ref:`box.NULL ` (the actual default value depends on the number of instances in a replica set)" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:452 +msgid "Environment variable: TT_DATABASE_MODE" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:459 +msgid "A :ref:`replica set UUID `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:461 +msgid "By default, replica set UUIDs are generated automatically. ``database.replicaset_uuid`` can be used to specify a replica set identifier manually." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:464 +msgid "See also: :ref:`database.instance_uuid `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:469 +msgid "Environment variable: TT_DATABASE_REPLICASET_UUID" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:476 +msgid "A transaction :ref:`isolation level `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:480 +msgid "Default: ``best-effort``" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:481 +msgid "Possible values: ``best-effort``, ``read-committed``, ``read-confirmed``" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:482 +msgid "Environment variable: TT_DATABASE_TXN_ISOLATION" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:489 +msgid "A timeout (in seconds) after which the transaction is rolled back." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:491 +msgid "See also: :ref:`box.begin() `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:495 +msgid "Default: 3153600000 (~100 years)" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:496 +msgid "Environment variable: TT_DATABASE_TXN_TIMEOUT" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:503 +msgid "Whether the :ref:`transactional manager ` is enabled." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:508 +msgid "Environment variable: TT_DATABASE_USE_MVCC_ENGINE" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:517 +msgid "iproto" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:519 +msgid "The ``iproto`` section is used to configure parameters related to communicating to and between cluster instances." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:523 +msgid "``iproto`` can be defined in any :ref:`scope `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:526 +msgid ":ref:`iproto.advertise.client `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:527 +msgid ":ref:`iproto.advertise.peer `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:528 +msgid ":ref:`iproto.advertise.sharding `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:529 +msgid ":ref:`iproto.listen `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:530 +msgid ":ref:`iproto.net_msg_max `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:531 +msgid ":ref:`iproto.readahead `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:532 +msgid ":ref:`iproto.threads `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:539 +msgid "An URI used to advertise the current instance to clients." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:541 +msgid "The ``iproto.advertise.client`` option accepts an URI in the following formats:" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:543 +#: ../../doc/reference/configuration/configuration_reference.rst:576 +msgid "An address: ``host:port``." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:545 +msgid "A Unix domain socket: ``unix/:``." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:547 +msgid "Note that this option doesn't allow to set a username and password. If a remote client needs this information, it should be delivered outside of the cluster configuration." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:554 +#: ../../doc/reference/configuration/configuration_reference.rst:5 +msgid "The ``host`` value cannot be ``0.0.0.0``/``[::]`` and the ``port`` value cannot be ``0``." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:561 +msgid "Environment variable: TT_IPROTO_ADVERTISE_CLIENT" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:567 +msgid "An URI used to advertise the current instance to other cluster members." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:569 +msgid "The ``iproto.advertise.peer`` option accepts an URI in the following formats:" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:571 +msgid "User :ref:`credentials ` and an address: ``username@host:port`` or ``username:password@host:port``." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:573 +msgid "User credentials: ``username@`` or ``username:password@``. In this case, an advertise address is taken from :ref:`iproto.listen `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:578 +msgid "If ``password`` is missing, it is taken from :ref:`credentials ` for the specified ``username``." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:580 +msgid "You can also use a Unix domain socket (``unix/:``) instead of ``host:port``." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:588 +#: ../../doc/reference/configuration/configuration_reference.rst:613 +#: ../../doc/reference/configuration/configuration_reference.rst:1091 +#: ../../doc/reference/configuration/configuration_reference.rst:1119 +msgid "In the example below, the following configuration options are specified:" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:590 +#: ../../doc/reference/configuration/configuration_reference.rst:1093 +#: ../../doc/reference/configuration/configuration_reference.rst:1121 +msgid "In the :ref:`credentials ` section, the ``replicator`` user with the ``replication`` role is created." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:591 +msgid "``iproto.advertise.peer`` specifies that other instances should connect to an address defined in :ref:`iproto.listen ` using the ``replicator`` user." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:593 +msgid "credentials:\n" +" users:\n" +" replicator:\n" +" password: 'topsecret'\n" +" roles: [replication]\n" +"\n" +"iproto:\n" +" advertise:\n" +" peer: replicator@\n" +"\n" +"replication:\n" +" failover: election\n" +"\n" +"groups:\n" +" group001:\n" +" replicasets:\n" +" replicaset001:\n" +" instances:\n" +" instance001:\n" +" iproto:\n" +" listen: 127.0.0.1:3301\n" +" instance002:\n" +" iproto:\n" +" listen: 127.0.0.1:3302\n" +" instance003:\n" +" iproto:\n" +" listen: 127.0.0.1:3303\n" +"" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:601 +msgid "Environment variable: TT_IPROTO_ADVERTISE_PEER" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:607 +msgid "An advertise URI used by a router and rebalancer." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:609 +msgid "The ``iproto.advertise.sharding`` option accepts an URI in the same formats as :ref:`iproto.advertise.peer `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:615 +msgid "In the :ref:`credentials ` section, the ``replicator`` and ``storage`` users are created." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:616 +msgid "``iproto.advertise.peer`` specifies that other instances should connect to an address defined in :ref:`iproto.listen ` with the ``replicator`` user." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:617 +msgid "``iproto.advertise.sharding`` specifies that a router should connect to storages using an address defined in :ref:`iproto.listen ` with the ``storage`` user." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:619 +msgid "credentials:\n" +" users:\n" +" replicator:\n" +" password: 'topsecret'\n" +" roles: [replication]\n" +" storage:\n" +" password: 'secret'\n" +" roles: [super]\n" +"\n" +"iproto:\n" +" advertise:\n" +" peer: replicator@\n" +" sharding: storage@\n" +"" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:627 +msgid "Environment variable: TT_IPROTO_ADVERTISE_SHARDING" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:634 +msgid "An address used to listen for incoming requests. This address is used for different purposes, for example:" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:637 +msgid "Communicating between replica set peers or cluster members." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:638 +msgid "Remote administration using :ref:`tt connect `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:639 +msgid "Connecting to an instance using :ref:`connectors ` for different languages." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:641 +msgid "To grant the specified privileges for connecting to an instance, use the :ref:`credentials ` configuration section." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:645 +msgid "In the example below, ``iproto.listen`` is set explicitly for each instance in a cluster:" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:647 +msgid "groups:\n" +" group001:\n" +" replicasets:\n" +" replicaset001:\n" +" instances:\n" +" instance001:\n" +" iproto:\n" +" listen: 127.0.0.1:3301\n" +" instance002:\n" +" iproto:\n" +" listen: 127.0.0.1:3302\n" +" instance003:\n" +" iproto:\n" +" listen: 127.0.0.1:3303\n" +"\n" +"" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:653 +msgid "See also: :ref:`Connection settings `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:658 +msgid "Environment variable: TT_IPROTO_LISTEN" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:665 +msgid "To handle messages, Tarantool allocates :ref:`fibers `. To prevent fiber overhead from affecting the whole system, Tarantool restricts how many messages the fibers handle, so that some pending requests are blocked." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:670 +msgid "On powerful systems, increase ``net_msg_max``, and the scheduler starts processing pending requests immediately." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:673 +msgid "On weaker systems, decrease ``net_msg_max``, and the overhead may decrease. Although this may take some time because the scheduler must wait until already-running requests finish." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:677 +msgid "When ``net_msg_max`` is reached, Tarantool suspends processing of incoming packages until it has processed earlier messages. This is not a direct restriction of the number of fibers that handle network messages, rather it is a system-wide restriction of channel bandwidth. This in turn restricts the number of incoming network messages that the :ref:`transaction processor thread ` handles, and therefore indirectly affects the fibers that handle network messages." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:690 +msgid "The number of fibers is smaller than the number of messages because messages can be released as soon as they are delivered, while incoming requests might not be processed until some time after delivery." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:694 +#: ../../doc/reference/configuration/configuration_reference.rst:713 +#: ../../doc/reference/configuration/configuration_reference.rst:731 +#: ../../doc/reference/configuration/configuration_reference.rst:1241 +msgid "Type: integer" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:695 +msgid "Default: 768" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:696 +msgid "Environment variable: TT_IPROTO_NET_MSG_MAX" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:703 +msgid "The size of the read-ahead buffer associated with a client connection. The larger the buffer, the more memory an active connection consumes, and the more requests can be read from the operating system buffer in a single system call." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:708 +msgid "The recommendation is to make sure that the buffer can contain at least a few dozen requests. Therefore, if a typical tuple in a request is large, e.g. a few kilobytes or even megabytes, the read-ahead buffer size should be increased. If batched request processing is not used, it’s prudent to leave this setting at its default." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:714 +msgid "Default: 16320" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:715 +msgid "Environment variable: TT_IPROTO_READAHEAD" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:722 +msgid "The number of :ref:`network threads `. There can be unusual workloads where the network thread is 100% loaded and the transaction processor thread is not, so the network thread is a bottleneck. In that case, set ``iproto_threads`` to 2 or more. The operating system kernel determines which connection goes to which thread." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:732 +#: ../../doc/reference/configuration/configuration_reference.rst:1242 +#: ../../doc/reference/configuration/configuration_reference.rst:1259 +msgid "Default: 1" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:733 +msgid "Environment variable: TT_IPROTO_THREADS" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:742 +msgid "groups" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:744 +msgid "The ``groups`` section provides the ability to define the :ref:`full topology of a Tarantool cluster `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:748 +msgid "``groups`` can be defined in the global :ref:`scope ` only." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:750 +msgid ":ref:`groups.\\ `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:751 +msgid ":ref:`groups.\\.replicasets `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:752 +msgid ":ref:`groups.\\.\\ `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:758 +msgid "A group name." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:765 +msgid "Replica sets that belong to this group. See :ref:`replicasets `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:772 +msgid "Any configuration parameter that can be defined in the group :ref:`scope `. For example, :ref:`iproto ` and :ref:`database ` configuration parameters defined at the group level are applied to all instances in this group." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:780 +msgid "replicasets" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:784 +msgid "``replicasets`` can be defined in the group :ref:`scope ` only." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:786 +msgid ":ref:`replicasets.\\ `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:787 +msgid ":ref:`replicasets.\\.leader `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:788 +msgid ":ref:`replicasets.\\.bootstrap_leader `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:789 +msgid ":ref:`replicasets.\\.instances `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:790 +msgid ":ref:`replicasets.\\.\\ `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:796 +msgid "A replica set name." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:803 +msgid "A replica set leader. This option can be used to set a replica set leader when ``manual`` :ref:`replication.failover ` is used." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:806 +msgid "To perform :ref:`controlled failover `, ``.leader`` can be temporarily removed or set to ``null``." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:810 +msgid "replication:\n" +" failover: manual\n" +"\n" +"groups:\n" +" group001:\n" +" replicasets:\n" +" replicaset001:\n" +" leader: instance001\n" +" instances:\n" +" instance001:\n" +" iproto:\n" +" listen: 127.0.0.1:3301\n" +" instance002:\n" +" iproto:\n" +" listen: 127.0.0.1:3302\n" +" instance003:\n" +" iproto:\n" +" listen: 127.0.0.1:3303\n" +"" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:821 +msgid "A bootstrap leader for a replica set. To specify a bootstrap leader manually, you need to set :ref:`replication.bootstrap_strategy ` to ``config``." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:826 +msgid "groups:\n" +" group001:\n" +" replicasets:\n" +" replicaset001:\n" +" replication:\n" +" bootstrap_strategy: config\n" +" bootstrap_leader: instance001\n" +" instances:\n" +" instance001:\n" +" iproto:\n" +" listen: 127.0.0.1:3301\n" +" instance002:\n" +" iproto:\n" +" listen: 127.0.0.1:3302\n" +" instance003:\n" +" iproto:\n" +" listen: 127.0.0.1:3303" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:837 +msgid "Instances that belong to this replica set. See :ref:`instances `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:844 +msgid "Any configuration parameter that can be defined in the replica set :ref:`scope `. For example, :ref:`iproto ` and :ref:`database ` configuration parameters defined at the replica set level are applied to all instances in this replica set." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:852 +msgid "instances" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:856 +msgid "``instances`` can be defined in the replica set :ref:`scope ` only." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:858 +msgid ":ref:`instances.\\ `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:859 +msgid ":ref:`instances.\\.\\ `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:865 +msgid "An instance name." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:872 +msgid "Any configuration parameter that can be defined in the instance :ref:`scope `. For example, :ref:`iproto ` and :ref:`database ` configuration parameters defined at the instance level are applied to this instance only." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:891 +msgid "replication" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:893 +msgid "The ``replication`` section defines configuration parameters related to :ref:`replication `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:895 +msgid ":ref:`replication.anon `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:896 +msgid ":ref:`replication.bootstrap_strategy `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:897 +msgid ":ref:`replication.connect_timeout `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:898 +msgid ":ref:`replication.election_mode `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:899 +msgid ":ref:`replication.election_timeout `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:900 +msgid ":ref:`replication.election_fencing_mode `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:901 +msgid ":ref:`replication.failover `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:902 +msgid ":ref:`replication.peers `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:903 +msgid ":ref:`replication.skip_conflict `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:904 +msgid ":ref:`replication.sync_lag `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:905 +msgid ":ref:`replication.sync_timeout `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:906 +msgid ":ref:`replication.synchro_quorum `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:907 +msgid ":ref:`replication.synchro_timeout `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:908 +msgid ":ref:`replication.threads `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:909 +msgid ":ref:`replication.timeout `" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:917 +msgid "Default: ``false``" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:918 +msgid "Environment variable: TT_REPLICATION_ANON" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:925 +msgid "Specifies a strategy used to bootstrap a :ref:`replica set `. The following strategies are available:" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:928 +msgid "``auto``: a node doesn't boot if half or more of the other nodes in a replica set are not connected. For example, if a replica set contains 2 or 3 nodes, a node requires 2 connected instances. In the case of 4 or 5 nodes, at least 3 connected instances are required. Moreover, a bootstrap leader fails to boot unless every connected node has chosen it as a bootstrap leader." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:933 +msgid "``config``: use the specified node to bootstrap a replica set. To specify the bootstrap leader, use the :ref:`.bootstrap_leader ` option." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:936 +msgid "``supervised``: a bootstrap leader isn't chosen automatically but should be appointed using :ref:`box.ctl.make_bootstrap_leader() ` on the desired node." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:938 +msgid "``legacy`` (deprecated since :doc:`2.11.0 `): a node requires the :ref:`replication_connect_quorum ` number of other nodes to be connected. This option is added to keep the compatibility with the current versions of Cartridge and might be removed in the future." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:942 +msgid "Default: ``auto``" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:943 +msgid "Environment variable: TT_REPLICATION_BOOTSTRAP_STRATEGY" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:950 +msgid "A timeout (in seconds) a replica waits when trying to connect to a master in a cluster. See :ref:`orphan status ` for details." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:953 +msgid "This parameter is different from :ref:`replication.timeout `, which a master uses to disconnect a replica when the master receives no acknowledgments of heartbeat messages." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:960 +msgid "Default: 30" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:961 +msgid "Environment variable: TT_REPLICATION_CONNECT_TIMEOUT" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:968 +msgid "A role of a replica set node in the :ref:`leader election process `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:970 +msgid "The possible values are:" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:972 +msgid "``off``: a node doesn't participate in the election activities." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:974 +msgid "``voter``: a node can participate in the election process but can't be a leader." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:976 +msgid "``candidate``: a node should be able to become a leader." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:978 +msgid "``manual``: allow to control which instance is the leader explicitly instead of relying on automated leader election. By default, the instance acts like a voter -- it is read-only and may vote for other candidate instances. Once :ref:`box.ctl.promote() ` is called, the instance becomes a candidate and starts a new election round. If the instance wins the elections, it becomes a leader but won't participate in any new elections." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:985 +msgid "Default: :ref:`box.NULL ` (the actual default value depends on :ref:`replication.failover `)" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:986 +msgid "Environment variable: TT_REPLICATION_ELECTION_MODE" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:993 +msgid "Specifies the timeout (in seconds) between election rounds in the :ref:`leader election process ` if the previous round ended up with a split vote." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:997 +msgid "It is quite big, and for most of the cases, it can be lowered to 300-400 ms." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1000 +msgid "To avoid the split vote repeat, the timeout is randomized on each node during every new election, from 100% to 110% of the original timeout value. For example, if the timeout is 300 ms and there are 3 nodes started the election simultaneously in the same term, they can set their election timeouts to 300, 310, and 320 respectively, or to 305, 302, and 324, and so on. In that way, the votes will never be split because the election on different nodes won't be restarted simultaneously." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1010 +#: ../../doc/reference/configuration/configuration_reference.rst:1226 +msgid "Default: 5" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1011 +msgid "Environment variable: TT_REPLICATION_ELECTION_TIMEOUT" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1018 +msgid "Specifies the :ref:`leader fencing mode ` that affects the leader election process. When the parameter is set to ``soft`` or ``strict``, the leader resigns its leadership if it has less than :ref:`replication.synchro_quorum ` of alive connections to the cluster nodes. The resigning leader receives the status of a follower in the current election term and becomes read-only." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1026 +msgid "In ``soft`` mode, a connection is considered dead if there are no responses for :ref:`4 * replication.timeout ` seconds both on the current leader and the followers." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1029 +msgid "In ``strict`` mode, a connection is considered dead if there are no responses for :ref:`2 * replication.timeout ` seconds on the current leader and :ref:`4 * replication.timeout ` seconds on the followers. This improves the chances that there is only one leader at any time." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1035 +msgid "Fencing applies to the instances that have the :ref:`replication.election_mode ` set to ``candidate`` or ``manual``. To turn off leader fencing, set ``election_fencing_mode`` to ``off``." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1041 +msgid "Default: ``soft``" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1042 +msgid "Possible values: ``off``, ``soft``, ``strict``" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1043 +msgid "Environment variable: TT_REPLICATION_ELECTION_FENCING_MODE" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1050 +msgid "A failover mode used to take over a master role when the current master instance fails. The following modes are available:" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1053 +msgid "``off``" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1055 +msgid "Leadership in a replica set is controlled using the :ref:`database.mode ` option. In this case, you can set the ``database.mode`` option to ``rw`` on all instances in a replica set to make a :ref:`master-master ` configuration." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1058 +msgid "The default ``database.mode`` is determined as follows: ``rw`` if there is one instance in a replica set; ``ro`` if there are several instances." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1060 +msgid "``manual``" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1062 +msgid "Leadership in a replica set is controlled using the :ref:`.leader ` option. In this case, a :ref:`master-master ` configuration is forbidden." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1065 +msgid "In the ``manual`` mode, the :ref:`database.mode ` option cannot be set explicitly. The leader is configured in the read-write mode, all the other instances are read-only." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1068 +msgid "``election``" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1070 +msgid ":ref:`Automated leader election ` is used to control leadership in a replica set." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1072 +msgid "In the ``election`` mode, :ref:`database.mode ` and :ref:`.leader ` shouldn't be set explicitly." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1074 +msgid "``supervised`` (`Enterprise Edition `_ only)" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1076 +msgid "Leadership in a replica set is controlled using an external failover agent." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1078 +msgid "In the ``supervised`` mode, :ref:`database.mode ` and :ref:`.leader ` shouldn't be set explicitly." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1083 +msgid "See also: :ref:`Replication tutorials `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1087 +msgid "``replication.failover`` can be defined in the global, group, and replica set :ref:`scope `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1094 +msgid ":ref:`iproto.advertise.peer ` specifies that other instances should connect to an address defined in :ref:`iproto.listen ` using the ``replicator`` user." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1095 +msgid "``replication.failover`` specifies that a master instance should be set manually." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1096 +msgid ":ref:`.leader ` sets ``instance001`` as a replica set leader." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1098 +msgid "credentials:\n" +" users:\n" +" replicator:\n" +" password: 'topsecret'\n" +" roles: [replication]\n" +"\n" +"iproto:\n" +" advertise:\n" +" peer: replicator@\n" +"\n" +"replication:\n" +" failover: manual\n" +"\n" +"groups:\n" +" group001:\n" +" replicasets:\n" +" replicaset001:\n" +" leader: instance001\n" +" instances:\n" +" instance001:\n" +" iproto:\n" +" listen: 127.0.0.1:3301\n" +" instance002:\n" +" iproto:\n" +" listen: 127.0.0.1:3302\n" +" instance003:\n" +" iproto:\n" +" listen: 127.0.0.1:3303\n" +"\n" +"" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1104 +msgid "Default: ``off``" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1105 +msgid "Environment variable: TT_REPLICATION_FAILOVER" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1112 +msgid "URIs of instances that constitute a replica set. These URIs are used by an instance to connect to another instance as a replica." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1115 +msgid "Alternatively, you can use :ref:`iproto.advertise.peer ` to specify a URI used to advertise the current instance to other cluster members." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1122 +msgid "``replication.peers`` specifies URIs of replica set instances." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1124 +msgid "credentials:\n" +" users:\n" +" replicator:\n" +" password: 'topsecret'\n" +" roles: [replication]\n" +"\n" +"replication:\n" +" peers:\n" +" - replicator:topsecret@127.0.0.1:3301\n" +" - replicator:topsecret@127.0.0.1:3302\n" +" - replicator:topsecret@127.0.0.1:3303\n" +"" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1132 +msgid "Environment variable: TT_REPLICATION_PEERS" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1139 +msgid "By default, if a replica adds a unique key that another replica has added, replication :ref:`stops ` with the ``ER_TUPLE_FOUND`` :ref:`error `. If ``replication.skip_conflict`` is set to ``true``, such errors are ignored." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1146 +msgid "Instead of saving the broken transaction to the write-ahead log, it is written as ``NOP`` (No operation)." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1150 +msgid "Environment variable: TT_REPLICATION_SKIP_CONFLICT" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1157 +msgid "The maximum delay (in seconds) between the time when data is written to the master and the time when it is written to a replica. If ``replication.sync_lag`` is set to ``nil`` or 365 * 100 * 86400 (``TIMEOUT_INFINITY``), a replica is always considered to be \"synced\"." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1163 +msgid "This parameter is ignored during bootstrap. See :ref:`orphan status ` for details." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1167 +msgid "Default: 10" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1168 +msgid "Environment variable: TT_REPLICATION_SYNC_LAG" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1175 +msgid "The timeout (in seconds) that a node waits when trying to sync with other nodes in a replica set after connecting or during a :ref:`configuration update `. This could fail indefinitely if :ref:`replication.sync_lag ` is smaller than network latency, or if the replica cannot keep pace with master updates. If ``replication.sync_timeout`` expires, the replica enters :ref:`orphan status `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1182 +msgid "Default: 0" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1183 +msgid "Environment variable: TT_REPLICATION_SYNC_TIMEOUT" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1190 +msgid "A number of replicas that should confirm the receipt of a :ref:`synchronous ` transaction before it can finish its commit." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1192 +msgid "This option supports dynamic evaluation of the quorum number. For example, the default value is ``N / 2 + 1`` where ``N`` is the current number of replicas registered in a cluster. Once any replicas are added or removed, the expression is re-evaluated automatically." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1196 +msgid "Note that the default value (``at least 50% of the cluster size + 1``) guarantees data reliability. Using a value less than the canonical one might lead to unexpected results, including a :ref:`split-brain `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1200 +msgid "``replication.synchro_quorum`` is not used on replicas. If the master fails, the pending synchronous transactions will be kept waiting on the replicas until a new master is elected." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1205 +msgid "``replication.synchro_quorum`` does not account for anonymous replicas." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1207 +msgid "Type: string, number" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1208 +msgid "Default: ``N / 2 + 1``" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1209 +msgid "Environment variable: TT_REPLICATION_SYNCHRO_QUORUM" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1216 +msgid "For :ref:`synchronous replication ` only. Specify how many seconds to wait for a synchronous transaction quorum replication until it is declared failed and is rolled back." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1220 +msgid "It is not used on replicas, so if the master fails, the pending synchronous transactions will be kept waiting on the replicas until a new master is elected." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1227 +msgid "Environment variable: TT_REPLICATION_SYNCHRO_TIMEOUT" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1234 +msgid "The number of threads spawned to decode the incoming replication data." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1236 +msgid "In most cases, one thread is enough for all incoming data. Possible values range from 1 to 1000. If there are multiple replication threads, connections to serve are distributed evenly between the threads." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1243 +msgid "Environment variable: TT_REPLICATION_THREADS" +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1250 +msgid "A time interval (in seconds) used by a master to send heartbeat requests to a replica when there are no updates to send to this replica. For each request, a replica should return a heartbeat acknowledgment." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1253 +msgid "If a master or replica gets no heartbeat message for ``4 * replication.timeout`` seconds, a connection is dropped and a replica tries to reconnect to the master." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1255 +msgid "See also: :ref:`Monitoring a replica set `." +msgstr "" + +#: ../../doc/reference/configuration/configuration_reference.rst:1260 +msgid "Environment variable: TT_REPLICATION_TIMEOUT" +msgstr "" diff --git a/locale/en/reference/configuration/index.pot b/locale/en/reference/configuration/index.pot new file mode 100644 index 0000000000..46fd22fd2e --- /dev/null +++ b/locale/en/reference/configuration/index.pot @@ -0,0 +1,2617 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/configuration/index.rst:5 +msgid "Configuration reference (box.cfg)" +msgstr "" + +#: ../../doc/concepts/configuration/configuration_code.rst:5 +msgid "Starting with the 3.0 version, the recommended way of configuring Tarantool is using a :ref:`configuration file `. Configuring Tarantool in code is considered a legacy approach." +msgstr "" + +#: ../../doc/reference/configuration/index.rst:12 +msgid "This topic describes all configuration parameters that can be specified :ref:`in code ` using the ``box.cfg`` API." +msgstr "" + +#: ../../doc/reference/configuration/index.rst:20 +msgid "Basic parameters" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:1 +msgid ":ref:`background `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:2 +msgid ":ref:`custom_proc_title `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:3 +msgid ":ref:`listen `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:4 +msgid ":ref:`memtx_dir `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:5 +msgid ":ref:`pid_file `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:6 +msgid ":ref:`read_only `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:7 +msgid ":ref:`sql_cache_size `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:8 +msgid ":ref:`vinyl_dir `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:9 +msgid ":ref:`vinyl_timeout `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:10 +msgid ":ref:`username `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:11 +msgid ":ref:`wal_dir `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:12 +msgid ":ref:`work_dir `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:13 +msgid ":ref:`worker_pool_threads `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:14 +msgid ":ref:`strip_core `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:15 +msgid ":ref:`memtx_use_mvcc_engine `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:21 +msgid "Since version 1.6.2. Run the server as a background task. The :ref:`log ` and :ref:`pid_file ` parameters must be non-null for this to work." +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:26 +#: ../../doc/reference/configuration/cfg_basic.rst:136 +#: ../../doc/reference/configuration/cfg_basic.rst:285 +#: ../../doc/reference/configuration/cfg_basic.rst:297 +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:24 +#: ../../doc/reference/configuration/cfg_hot_standby.rst:48 +#: ../../doc/reference/configuration/cfg_replication.rst:203 +#: ../../doc/reference/configuration/cfg_replication.rst:296 +#: ../../doc/reference/configuration/cfg_logging.rst:151 +#: ../../doc/reference/configuration/cfg_feedback.rst:23 +#: ../../doc/reference/configuration/cfg_deprecated.rst:26 +#: ../../doc/reference/configuration/cfg_deprecated.rst:56 +#: ../../doc/reference/configuration/cfg_deprecated.rst:67 +#: ../../doc/reference/configuration/cfg_deprecated.rst:163 +msgid "Type: boolean" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:27 +#: ../../doc/reference/configuration/cfg_basic.rst:137 +#: ../../doc/reference/configuration/cfg_basic.rst:298 +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:25 +#: ../../doc/reference/configuration/cfg_hot_standby.rst:49 +#: ../../doc/reference/configuration/cfg_replication.rst:204 +#: ../../doc/reference/configuration/cfg_replication.rst:297 +#: ../../doc/reference/configuration/cfg_deprecated.rst:27 +msgid "Default: false" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:28 +msgid "Environment variable: TT_BACKGROUND" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:29 +#: ../../doc/reference/configuration/cfg_basic.rst:107 +#: ../../doc/reference/configuration/cfg_basic.rst:120 +#: ../../doc/reference/configuration/cfg_basic.rst:185 +#: ../../doc/reference/configuration/cfg_basic.rst:215 +#: ../../doc/reference/configuration/cfg_basic.rst:231 +#: ../../doc/reference/configuration/cfg_basic.rst:258 +#: ../../doc/reference/configuration/cfg_basic.rst:288 +#: ../../doc/reference/configuration/cfg_basic.rst:300 +#: ../../doc/reference/configuration/cfg_storage.rst:64 +#: ../../doc/reference/configuration/cfg_storage.rst:100 +#: ../../doc/reference/configuration/cfg_storage.rst:121 +#: ../../doc/reference/configuration/cfg_storage.rst:137 +#: ../../doc/reference/configuration/cfg_storage.rst:164 +#: ../../doc/reference/configuration/cfg_storage.rst:189 +#: ../../doc/reference/configuration/cfg_storage.rst:215 +#: ../../doc/reference/configuration/cfg_storage.rst:230 +#: ../../doc/reference/configuration/cfg_storage.rst:244 +#: ../../doc/reference/configuration/cfg_storage.rst:257 +#: ../../doc/reference/configuration/cfg_storage.rst:270 +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:27 +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:41 +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:79 +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:93 +#: ../../doc/reference/configuration/cfg_hot_standby.rst:51 +#: ../../doc/reference/configuration/cfg_replication.rst:422 +#: ../../doc/reference/configuration/cfg_replication.rst:446 +#: ../../doc/reference/configuration/cfg_networking.rst:94 +#: ../../doc/reference/configuration/cfg_logging.rst:126 +#: ../../doc/reference/configuration/cfg_logging.rst:154 +#: ../../doc/reference/configuration/cfg_deprecated.rst:28 +#: ../../doc/reference/configuration/cfg_deprecated.rst:58 +#: ../../doc/reference/configuration/cfg_deprecated.rst:96 +msgid "Dynamic: no" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:35 +msgid "Since version 1.6.7. Add the given string to the server's process title (what’s shown in the COMMAND column for ``ps -ef`` and ``top -c`` commands)." +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:40 +msgid "For example, ordinarily :samp:`ps -ef` shows the Tarantool server process thus:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:43 +msgid "$ ps -ef | grep tarantool\n" +"1000 14939 14188 1 10:53 pts/2 00:00:13 tarantool " +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:48 +msgid "But if the configuration parameters include ``custom_proc_title='sessions'`` then the output looks like:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:51 +msgid "$ ps -ef | grep tarantool\n" +"1000 14939 14188 1 10:53 pts/2 00:00:16 tarantool : sessions" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:56 +#: ../../doc/reference/configuration/cfg_basic.rst:104 +#: ../../doc/reference/configuration/cfg_basic.rst:117 +#: ../../doc/reference/configuration/cfg_basic.rst:182 +#: ../../doc/reference/configuration/cfg_basic.rst:212 +#: ../../doc/reference/configuration/cfg_basic.rst:228 +#: ../../doc/reference/configuration/cfg_basic.rst:255 +#: ../../doc/reference/configuration/cfg_storage.rst:81 +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:76 +#: ../../doc/reference/configuration/cfg_replication.rst:57 +#: ../../doc/reference/configuration/cfg_replication.rst:227 +#: ../../doc/reference/configuration/cfg_replication.rst:419 +#: ../../doc/reference/configuration/cfg_replication.rst:443 +#: ../../doc/reference/configuration/cfg_replication.rst:576 +#: ../../doc/reference/configuration/cfg_replication.rst:641 +#: ../../doc/reference/configuration/cfg_logging.rst:123 +#: ../../doc/reference/configuration/cfg_logging.rst:207 +#: ../../doc/reference/configuration/cfg_feedback.rst:35 +msgid "Type: string" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:57 +#: ../../doc/reference/configuration/cfg_basic.rst:91 +#: ../../doc/reference/configuration/cfg_basic.rst:118 +#: ../../doc/reference/configuration/cfg_basic.rst:213 +#: ../../doc/reference/configuration/cfg_basic.rst:256 +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:59 +#: ../../doc/reference/configuration/cfg_replication.rst:58 +#: ../../doc/reference/configuration/cfg_replication.rst:273 +#: ../../doc/reference/configuration/cfg_replication.rst:420 +#: ../../doc/reference/configuration/cfg_replication.rst:444 +#: ../../doc/reference/configuration/cfg_networking.rst:17 +#: ../../doc/reference/configuration/cfg_logging.rst:124 +msgid "Default: null" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:58 +msgid "Environment variable: TT_CUSTOM_PROC_TITLE" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:59 +#: ../../doc/reference/configuration/cfg_basic.rst:93 +#: ../../doc/reference/configuration/cfg_basic.rst:139 +#: ../../doc/reference/configuration/cfg_basic.rst:171 +#: ../../doc/reference/configuration/cfg_basic.rst:204 +#: ../../doc/reference/configuration/cfg_basic.rst:274 +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:73 +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:103 +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:136 +#: ../../doc/reference/configuration/cfg_deprecated.rst:69 +#: ../../doc/reference/configuration/cfg_deprecated.rst:166 +msgid "Dynamic: yes" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:65 +msgid "Since version 1.6.4." +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:67 +msgid "The read/write data port number or :ref:`URI ` (Universal Resource Identifier) string. Has no default value, so **must be specified** if connections occur from the remote clients that don't use the :ref:`\"admin port\" `. Connections made with :samp:`listen = {URI}` are called \"binary port\" or \"binary protocol\" connections." +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:74 +msgid "A typical value is 3301." +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:76 +msgid "box.cfg { listen = 3301 }\n" +"\n" +"box.cfg { listen = \"127.0.0.1:3301\" }" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:84 +msgid "A replica also binds to this port, and accepts connections, but these connections can only serve reads until the replica becomes a master." +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:87 +msgid "Starting from version 2.10.0, you can specify :ref:`several URIs `, and the port number is always stored as an integer value." +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:90 +msgid "Type: integer or string" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:92 +msgid "Environment variable: TT_LISTEN" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:99 +msgid "Since version 1.7.4. A directory where memtx stores snapshot (.snap) files. Can be relative to :ref:`work_dir `. If not specified, defaults to ``work_dir``. See also :ref:`wal_dir `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:105 +#: ../../doc/reference/configuration/cfg_basic.rst:183 +#: ../../doc/reference/configuration/cfg_basic.rst:229 +msgid "Default: \".\"" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:106 +msgid "Environment variable: TT_MEMTX_DIR" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:113 +msgid "Since version 1.4.9. Store the process id in this file. Can be relative to :ref:`work_dir `. A typical value is “:file:`tarantool.pid`”." +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:119 +msgid "Environment variable: TT_PID_FILE" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:126 +msgid "Since version 1.7.1. Say ``box.cfg{read_only=true...}`` to put the server instance in read-only mode. After this, any requests that try to change persistent data will fail with error :errcode:`ER_READONLY`. Read-only mode should be used for master-replica :ref:`replication `. Read-only mode does not affect data-change requests for spaces defined as :doc:`temporary `. Although read-only mode prevents the server from writing to the :ref:`WAL `, it does not prevent writing diagnostics with the :ref:`log module `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:138 +msgid "Environment variable: TT_READ_ONLY" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:141 +msgid "Setting ``read_only == true`` affects spaces differently depending on the :ref:`options ` that were used during :doc:`box.schema.space.create `, as summarized by this chart:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:149 +msgid "Option" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:149 +msgid "Can be created?" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:149 +msgid "Can be written to?" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:149 +msgid "Is replicated?" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:149 +msgid "Is persistent?" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:151 +msgid "(default)" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:151 +#: ../../doc/reference/configuration/cfg_basic.rst:151 +#: ../../doc/reference/configuration/cfg_basic.rst:153 +#: ../../doc/reference/configuration/cfg_basic.rst:153 +#: ../../doc/reference/configuration/cfg_basic.rst:153 +#: ../../doc/reference/configuration/cfg_basic.rst:155 +#: ../../doc/reference/configuration/cfg_basic.rst:155 +msgid "no" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:151 +#: ../../doc/reference/configuration/cfg_basic.rst:151 +#: ../../doc/reference/configuration/cfg_basic.rst:153 +#: ../../doc/reference/configuration/cfg_basic.rst:155 +#: ../../doc/reference/configuration/cfg_basic.rst:155 +msgid "yes" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:153 +msgid "temporary" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:155 +msgid "is_local" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:162 +msgid "Since version 2.3.1. The maximum number of bytes in the cache for :ref:`SQL prepared statements `. (The number of bytes that are actually used can be seen with :ref:`box.info.sql().cache.size `.)" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:168 +#: ../../doc/reference/configuration/cfg_storage.rst:118 +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:111 +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:136 +#: ../../doc/reference/configuration/cfg_replication.rst:488 +#: ../../doc/reference/configuration/cfg_replication.rst:506 +#: ../../doc/reference/configuration/cfg_replication.rst:526 +#: ../../doc/reference/configuration/cfg_replication.rst:607 +msgid "Type: number" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:169 +msgid "Default: 5242880" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:170 +msgid "Environment variable: TT_SQL_CACHE_SIZE" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:177 +msgid "Since version 1.7.1. A directory where vinyl files or subdirectories will be stored. Can be relative to :ref:`work_dir `. If not specified, defaults to ``work_dir``." +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:184 +msgid "Environment variable: TT_VINYL_DIR" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:191 +msgid "Since version 1.7.5. The vinyl storage engine has a scheduler which does compaction. When vinyl is low on available memory, the compaction scheduler may be unable to keep up with incoming update requests. In that situation, queries may time out after ``vinyl_timeout`` seconds. This should rarely occur, since normally vinyl would throttle inserts when it is running low on compaction bandwidth. Compaction can also be ordered manually with :doc:`/reference/reference_lua/box_index/compact`." +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:201 +#: ../../doc/reference/configuration/cfg_storage.rst:32 +#: ../../doc/reference/configuration/cfg_storage.rst:97 +#: ../../doc/reference/configuration/cfg_storage.rst:134 +#: ../../doc/reference/configuration/cfg_storage.rst:241 +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:58 +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:90 +#: ../../doc/reference/configuration/cfg_replication.rst:247 +#: ../../doc/reference/configuration/cfg_replication.rst:327 +#: ../../doc/reference/configuration/cfg_replication.rst:345 +#: ../../doc/reference/configuration/cfg_networking.rst:16 +#: ../../doc/reference/configuration/cfg_logging.rst:165 +#: ../../doc/reference/configuration/cfg_feedback.rst:46 +#: ../../doc/reference/configuration/cfg_deprecated.rst:94 +msgid "Type: float" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:202 +msgid "Default: 60" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:203 +msgid "Environment variable: TT_VINYL_TIMEOUT" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:210 +msgid "Since version 1.4.9. UNIX user name to switch to after start." +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:214 +msgid "Environment variable: TT_USERNAME" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:221 +msgid "Since version 1.6.2. A directory where write-ahead log (.xlog) files are stored. Can be relative to :ref:`work_dir `. Sometimes ``wal_dir`` and :ref:`memtx_dir ` are specified with different values, so that write-ahead log files and snapshot files can be stored on different disks. If not specified, defaults to ``work_dir``." +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:230 +msgid "Environment variable: TT_WAL_DIR" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:237 +msgid "Since version 1.4.9. A directory where database working files will be stored. The server instance switches to ``work_dir`` with :manpage:`chdir(2)` after start. Can be relative to the current directory. If not specified, defaults to the current directory. Other directory parameters may be relative to ``work_dir``, for example:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:244 +msgid "box.cfg{\n" +" work_dir = '/home/user/A',\n" +" wal_dir = 'B',\n" +" memtx_dir = 'C'\n" +"}" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:252 +msgid "will put xlog files in ``/home/user/A/B``, snapshot files in ``/home/user/A/C``, and all other files or subdirectories in ``/home/user/A``." +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:257 +msgid "Environment variable: TT_WORK_DIR" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:265 +msgid "Since version 1.7.5. The maximum number of threads to use during execution of certain internal processes (currently :ref:`socket.getaddrinfo() ` and :ref:`coio_call() `)." +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:271 +#: ../../doc/reference/configuration/cfg_storage.rst:47 +#: ../../doc/reference/configuration/cfg_storage.rst:61 +#: ../../doc/reference/configuration/cfg_storage.rst:147 +#: ../../doc/reference/configuration/cfg_storage.rst:161 +#: ../../doc/reference/configuration/cfg_storage.rst:172 +#: ../../doc/reference/configuration/cfg_storage.rst:186 +#: ../../doc/reference/configuration/cfg_storage.rst:212 +#: ../../doc/reference/configuration/cfg_storage.rst:227 +#: ../../doc/reference/configuration/cfg_storage.rst:254 +#: ../../doc/reference/configuration/cfg_storage.rst:267 +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:70 +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:100 +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:133 +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:38 +#: ../../doc/reference/configuration/cfg_replication.rst:272 +#: ../../doc/reference/configuration/cfg_replication.rst:369 +#: ../../doc/reference/configuration/cfg_networking.rst:53 +#: ../../doc/reference/configuration/cfg_networking.rst:72 +#: ../../doc/reference/configuration/cfg_networking.rst:91 +#: ../../doc/reference/configuration/cfg_logging.rst:34 +msgid "Type: integer" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:272 +#: ../../doc/reference/configuration/cfg_storage.rst:268 +msgid "Default: 4" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:273 +msgid "Environment variable: TT_WORKER_POOL_THREADS" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:280 +msgid "Since version 2.2.2. Whether coredump files should include memory allocated for tuples. (This can be large if Tarantool runs under heavy load.) Setting to ``true`` means \"do not include\". In an older version of Tarantool the default value of this parameter was ``false``." +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:286 +#: ../../doc/reference/configuration/cfg_feedback.rst:24 +#: ../../doc/reference/configuration/cfg_deprecated.rst:57 +#: ../../doc/reference/configuration/cfg_deprecated.rst:68 +#: ../../doc/reference/configuration/cfg_deprecated.rst:164 +msgid "Default: true" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:287 +msgid "Environment variable: TT_STRIP_CORE" +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:294 +msgid "Since version :doc:`2.6.1 `. Enables :ref:`transactional manager ` if set to ``true``." +msgstr "" + +#: ../../doc/reference/configuration/cfg_basic.rst:299 +msgid "Environment variable: TT_MEMTX_USE_MVCC_ENGINE" +msgstr "" + +#: ../../doc/reference/configuration/index.rst:25 +msgid "Configuring the storage" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:1 +msgid ":ref:`memtx_memory `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:2 +msgid ":ref:`memtx_max_tuple_size `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:3 +msgid ":ref:`memtx_min_tuple_size `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:4 +msgid ":ref:`memtx_allocator `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:5 +msgid ":ref:`slab_alloc_factor `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:6 +msgid ":ref:`slab_alloc_granularity `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:7 +msgid ":ref:`vinyl_bloom_fpr `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:8 +msgid ":ref:`vinyl_cache `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:9 +msgid ":ref:`vinyl_max_tuple_size `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:10 +msgid ":ref:`vinyl_memory `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:11 +msgid ":ref:`vinyl_page_size `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:12 +msgid ":ref:`vinyl_range_size `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:13 +msgid ":ref:`vinyl_run_count_per_level `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:14 +msgid ":ref:`vinyl_run_size_ratio `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:15 +msgid ":ref:`vinyl_read_threads `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:16 +msgid ":ref:`vinyl_write_threads `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:22 +msgid "Since version 1.7.4. How much memory Tarantool allocates to actually store tuples. When the limit is reached, :ref:`INSERT ` or :ref:`UPDATE ` requests begin failing with error :errcode:`ER_MEMORY_ISSUE`. The server does not go beyond the ``memtx_memory`` limit to allocate tuples, but there is additional memory used to store indexes and connection information. Depending on actual configuration and workload, Tarantool can consume up to 20% more than the ``memtx_memory`` limit." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:33 +msgid "Default: 256 * 1024 * 1024 = 268435456 bytes" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:34 +msgid "Minimum: 33554432 bytes (32 MB)" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:35 +msgid "Environment variable: TT_MEMTX_MEMORY" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:36 +#: ../../doc/reference/configuration/cfg_storage.rst:175 +msgid "Dynamic: **yes** but it cannot be decreased" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:42 +msgid "Since version 1.7.4. Size of the largest allocation unit, for the memtx storage engine. It can be increased if it is necessary to store large tuples. See also: :ref:`vinyl_max_tuple_size `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:48 +#: ../../doc/reference/configuration/cfg_storage.rst:162 +msgid "Default: 1024 * 1024 = 1048576 bytes" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:49 +msgid "Environment variable: TT_MEMTX_MAX_TUPLE_SIZE" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:50 +#: ../../doc/reference/configuration/cfg_storage.rst:150 +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:61 +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:114 +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:139 +#: ../../doc/reference/configuration/cfg_replication.rst:60 +#: ../../doc/reference/configuration/cfg_replication.rst:206 +#: ../../doc/reference/configuration/cfg_replication.rst:230 +#: ../../doc/reference/configuration/cfg_replication.rst:250 +#: ../../doc/reference/configuration/cfg_replication.rst:275 +#: ../../doc/reference/configuration/cfg_replication.rst:299 +#: ../../doc/reference/configuration/cfg_replication.rst:330 +#: ../../doc/reference/configuration/cfg_replication.rst:348 +#: ../../doc/reference/configuration/cfg_replication.rst:372 +#: ../../doc/reference/configuration/cfg_replication.rst:491 +#: ../../doc/reference/configuration/cfg_replication.rst:509 +#: ../../doc/reference/configuration/cfg_replication.rst:579 +#: ../../doc/reference/configuration/cfg_replication.rst:610 +#: ../../doc/reference/configuration/cfg_replication.rst:644 +#: ../../doc/reference/configuration/cfg_networking.rst:19 +#: ../../doc/reference/configuration/cfg_networking.rst:56 +#: ../../doc/reference/configuration/cfg_networking.rst:75 +#: ../../doc/reference/configuration/cfg_logging.rst:37 +#: ../../doc/reference/configuration/cfg_logging.rst:168 +#: ../../doc/reference/configuration/cfg_logging.rst:210 +#: ../../doc/reference/configuration/cfg_logging.rst:234 +#: ../../doc/reference/configuration/cfg_feedback.rst:26 +#: ../../doc/reference/configuration/cfg_feedback.rst:38 +#: ../../doc/reference/configuration/cfg_feedback.rst:49 +msgid "Dynamic: **yes**" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:56 +msgid "Since version 1.7.4. Size of the smallest allocation unit. It can be decreased if most of the tuples are very small. The value must be between 8 and 1048280 inclusive." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:62 +msgid "Default: 16 bytes" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:63 +msgid "Environment variable: TT_MEMTX_MIN_TUPLE_SIZE" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:70 +msgid "Since version :doc:`2.10.0 `. Specifies the allocator used for memtx tuples. The possible values are ``system`` and ``small``:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:74 +msgid "``system`` is based on the ``malloc`` function. This allocator allocates memory as needed, checking that the quota is not exceeded." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:77 +msgid "``small`` is a special `slab allocator `_. Note that this allocator is prone to unresolvable fragmentation on specific workloads, so you can switch to ``system`` in such cases." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:82 +msgid "Default: 'small'" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:83 +msgid "Environment variable: TT_MEMTX_ALLOCATOR" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:84 +msgid "Dynamic: No" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:90 +msgid "The multiplier for computing the sizes of memory chunks that tuples are stored in. A lower value may result in less wasted memory depending on the total amount of memory available and the distribution of item sizes. Allowed values range from 1 to 2." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:95 +msgid "See also: :ref:`slab_alloc_granularity `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:98 +msgid "Default: 1.05" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:99 +msgid "Environment variable: TT_SLAB_ALLOC_FACTOR" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:106 +msgid "Since version :doc:`2.8.1 `. Specifies the granularity (in bytes) of memory allocation in the :ref:`small allocator `. The value of ``slab_alloc_granularity`` should be a power of two and should be greater than or equal to 4. Below are few recommendations on how to adjust the ``slab_alloc_granularity`` value:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:111 +msgid "To store small tuples of approximately the same size, set ``slab_alloc_granularity`` to 4 bytes to save memory." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:113 +msgid "To store tuples of different sizes, you can increase the ``slab_alloc_granularity`` value. This results in allocating tuples from the same ``mempool``." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:116 +msgid "See also: :ref:`slab_alloc_factor `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:119 +msgid "Default: 8 bytes" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:120 +msgid "Environment variable: TT_SLAB_ALLOC_GRANULARITY" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:127 +msgid "Since version 1.7.4. Bloom filter false positive rate -- the suitable probability of the `bloom filter `_ to give a wrong result. The ``vinyl_bloom_fpr`` setting is a default value for one of the options in the :ref:`Options for space_object:create_index() ` chart." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:135 +msgid "Default: 0.05" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:136 +msgid "Environment variable: TT_VINYL_BLOOM_FPR" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:143 +msgid "Since version 1.7.4. The cache size for the vinyl storage engine. The cache can be resized dynamically." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:148 +#: ../../doc/reference/configuration/cfg_storage.rst:173 +msgid "Default: 128 * 1024 * 1024 = 134217728 bytes" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:149 +msgid "Environment variable: TT_VINYL_CACHE" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:156 +msgid "Since version 1.7.5. Size of the largest allocation unit, for the vinyl storage engine. It can be increased if it is necessary to store large tuples. See also: :ref:`memtx_max_tuple_size `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:163 +msgid "Environment variable: TT_VINYL_MAX_TUPLE_SIZE" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:170 +msgid "Since version 1.7.4. The maximum number of in-memory bytes that vinyl uses." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:174 +msgid "Environment variable: TT_VINYL_MEMORY" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:181 +msgid "Since version 1.7.4. Page size. Page is a read/write unit for vinyl disk operations. The ``vinyl_page_size`` setting is a default value for one of the options in the :ref:`Options for space_object:create_index() ` chart." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:187 +msgid "Default: 8 * 1024 = 8192 bytes" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:188 +msgid "Environment variable: TT_VINYL_PAGE_SIZE" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:195 +msgid "Since version 1.7.4. The default maximum range size for a vinyl index, in bytes. The maximum range size affects the decision whether to :ref:`split ` a range." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:200 +msgid "If ``vinyl_range_size`` is not nil and not 0, then it is used as the default value for the ``range_size`` option in the :ref:`Options for space_object:create_index() ` chart." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:205 +msgid "If ``vinyl_range_size`` is nil or 0, and ``range_size`` is not specified when the index is created, then Tarantool sets a value later depending on performance considerations. To see the actual value, use :doc:`index_object:stat().range_size `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:210 +msgid "In Tarantool versions prior to 1.10.2, ``vinyl_range_size`` default value was 1073741824." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:213 +#: ../../doc/reference/configuration/cfg_logging.rst:152 +msgid "Default: nil" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:214 +msgid "Environment variable: TT_VINYL_RANGE_SIZE" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:221 +msgid "Since version 1.7.4. The maximal number of runs per level in vinyl LSM tree. If this number is exceeded, a new level is created. The ``vinyl_run_count_per_level`` setting is a default value for one of the options in the :ref:`Options for space_object:create_index() ` chart." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:228 +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:101 +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:91 +msgid "Default: 2" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:229 +msgid "Environment variable: TT_VINYL_RUN_COUNT_PER_LEVEL" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:236 +msgid "Since version 1.7.4. Ratio between the sizes of different levels in the LSM tree. The ``vinyl_run_size_ratio`` setting is a default value for one of the options in the :ref:`Options for space_object:create_index() ` chart." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:242 +msgid "Default: 3.5" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:243 +msgid "Environment variable: TT_VINYL_RUN_SIZE_RATIO" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:250 +msgid "Since version 1.7.5. The maximum number of read threads that vinyl can use for some concurrent operations, such as I/O and compression." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:255 +#: ../../doc/reference/configuration/cfg_replication.rst:370 +#: ../../doc/reference/configuration/cfg_replication.rst:527 +#: ../../doc/reference/configuration/cfg_networking.rst:92 +msgid "Default: 1" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:256 +msgid "Environment variable: TT_VINYL_READ_THREADS" +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:263 +msgid "Since version 1.7.5. The maximum number of write threads that vinyl can use for some concurrent operations, such as I/O and compression." +msgstr "" + +#: ../../doc/reference/configuration/cfg_storage.rst:269 +msgid "Environment variable: TT_VINYL_WRITE_THREADS" +msgstr "" + +#: ../../doc/reference/configuration/index.rst:32 +msgid "Checkpoint daemon" +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:1 +msgid ":ref:`checkpoint_count `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:2 +msgid ":ref:`checkpoint_interval `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:3 +msgid ":ref:`checkpoint_wal_threshold `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:5 +msgid "The checkpoint daemon is a fiber which is constantly running. At intervals, it may make new :ref:`snapshot (.snap) files ` and then may delete old snapshot files." +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:9 +msgid "The :ref:`checkpoint_interval ` and :ref:`checkpoint_count ` configuration settings determine how long the intervals are, and how many snapshots should exist before deletions occur." +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:16 +msgid "**Tarantool garbage collector**" +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:18 +msgid "The checkpoint daemon may activate the Tarantool garbage collector which deletes old files. This garbage collector is distinct from the `Lua garbage collector `_ which is for Lua objects, and distinct from a Tarantool garbage collector which specializes in :ref:`handling shard buckets `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:25 +msgid "If the checkpoint daemon deletes an old snapshot file, then the Tarantool garbage collector will also delete any :ref:`write-ahead log (.xlog) ` files which are older than the snapshot file and which contain information that is present in the snapshot file. It will also delete obsolete vinyl ``.run`` files." +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:31 +msgid "The checkpoint daemon and the Tarantool garbage collector will not delete a file if:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:33 +msgid "a **backup** is ongoing and the file has not been backed up (see :ref:`\"Hot backup\" `), or" +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:36 +msgid "**replication** is ongoing and the file has not been relayed to a replica (see :ref:`\"Replication architecture\" `)," +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:39 +msgid "a replica is connecting, or" +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:41 +msgid "a replica has fallen behind. The progress of each replica is tracked; if a replica's position is far from being up to date, then the server stops to give it a chance to catch up. If an administrator concludes that a replica is permanently down, then the correct procedure is to restart the server, or (preferably) :ref:`remove the replica from the cluster `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:53 +msgid "Since version 1.7.4. The interval between actions by the checkpoint daemon, in seconds. If ``checkpoint_interval`` is set to a value greater than zero, and there is activity which causes change to a database, then the checkpoint daemon will call :doc:`box.snapshot() ` every ``checkpoint_interval`` seconds, creating a new snapshot file each time. If ``checkpoint_interval`` is set to zero, then the checkpoint daemon is disabled." +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:61 +msgid "For example:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:63 +msgid "box.cfg{checkpoint_interval=60}" +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:67 +msgid "will cause the checkpoint daemon to create a new database snapshot once per minute, if there is activity." +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:71 +msgid "Default: 3600 (one hour)" +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:72 +msgid "Environment variable: TT_CHECKPOINT_INTERVAL" +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:79 +msgid "Since version 1.7.4. The maximum number of snapshots that may exist on the :ref:`memtx_dir ` directory before the checkpoint daemon will delete old snapshots. If ``checkpoint_count`` equals zero, then the checkpoint daemon does not delete old snapshots. For example:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:85 +msgid "box.cfg{\n" +" checkpoint_interval = 3600,\n" +" checkpoint_count = 10\n" +"}" +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:92 +msgid "will cause the checkpoint daemon to create a new snapshot each hour until it has created ten snapshots. After that, it will delete the oldest snapshot (and any associated write-ahead-log files) after creating a new one." +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:96 +msgid "Remember that, as noted earlier, snapshots will not be deleted if replication is ongoing and the file has not been relayed to a replica. Therefore ``checkpoint_count`` has no effect unless all replicas are alive." +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:102 +msgid "Environment variable: TT_CHECKPOINT_COUNT" +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:109 +msgid "Since version 2.1.2. The threshold for the total size in bytes of all WAL files created since the last checkpoint. Once the configured threshold is exceeded, the WAL thread notifies the checkpoint daemon that it must make a new checkpoint and delete old WAL files." +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:114 +msgid "This parameter enables administrators to handle a problem that could occur with calculating how much disk space to allocate for a partition containing WAL files." +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:118 +msgid "For example, suppose :ref:`checkpoint_interval ` = 2 and :ref:`checkpoint_count ` = 5 and the average amount that Tarantool writes between each checkpoint interval = 1 GB. Then one could calculate that the necessary amount is (2*5*1) 10GB. But this calculation would be wrong if, instead of writing 1 GB during one checkpoint interval, Tarantool encounters an unusual spike and tries to write 11 GB, causing an operating-system ENOSPC (\"no space\") error. By setting ``checkpoint_wal_threshold`` to a lower value, say 9 GB, an administrator could prevent the error." +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:134 +msgid "Default: 10^18 (a large number so in effect there is no limit by default)" +msgstr "" + +#: ../../doc/reference/configuration/cfg_snapshot_daemon.rst:135 +msgid "Environment variable: TT_CHECKPOINT_WAL_THRESHOLD" +msgstr "" + +#: ../../doc/reference/configuration/index.rst:37 +msgid "Binary logging and snapshots" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:1 +msgid ":ref:`force_recovery `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:2 +msgid ":ref:`wal_max_size `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:3 +msgid ":ref:`snap_io_rate_limit `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:4 +msgid ":ref:`wal_mode `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:5 +msgid ":ref:`wal_dir_rescan_delay `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:6 +msgid ":ref:`wal_queue_max_size `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:7 +msgid ":ref:`wal_cleanup_delay `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:13 +msgid "Since version 1.7.4. If ``force_recovery`` equals true, Tarantool tries to continue if there is an error while reading a :ref:`snapshot file` (at server instance start) or a :ref:`write-ahead log file` (at server instance start or when applying an update at a replica): skips invalid records, reads as much data as possible and lets the process finish with a warning. Users can prevent the error from recurring by writing to the database and executing :doc:`box.snapshot() `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:22 +msgid "Otherwise, Tarantool aborts recovery if there is an error while reading." +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:26 +msgid "Environment variable: TT_FORCE_RECOVERY" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:33 +msgid "Since version 1.7.4. The maximum number of bytes in a single write-ahead log file. When a request would cause an .xlog file to become larger than ``wal_max_size``, Tarantool creates another WAL file." +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:39 +msgid "Default: 268435456 (256 * 1024 * 1024) bytes" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:40 +msgid "Environment variable: TT_WAL_MAX_SIZE" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:47 +msgid "Since version 1.4.9. Reduce the throttling effect of :doc:`box.snapshot() ` on INSERT/UPDATE/DELETE performance by setting a limit on how many megabytes per second it can write to disk. The same can be achieved by splitting :ref:`wal_dir ` and :ref:`memtx_dir ` locations and moving snapshots to a separate disk. The limit also affects what :ref:`box.stat.vinyl().regulator ` may show for the write rate of dumps to .run and .index files." +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:60 +msgid "Environment variable: TT_SNAP_IO_RATE_LIMIT" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:67 +msgid "Since version 1.6.2. Specify fiber-WAL-disk synchronization mode as:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:69 +msgid "``none``: write-ahead log is not maintained. A node with ``wal_mode = none`` can't be replication master;" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:71 +msgid "``write``: :ref:`fibers ` wait for their data to be written to the write-ahead log (no :manpage:`fsync(2)`);" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:73 +msgid "``fsync``: fibers wait for their data, :manpage:`fsync(2)` follows each :manpage:`write(2)`;" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:77 +msgid "Default: \"write\"" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:78 +msgid "Environment variable: TT_WAL_MODE" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:85 +msgid "Since version 1.6.2. Number of seconds between periodic scans of the write-ahead-log file directory, when checking for changes to write-ahead-log files for the sake of :ref:`replication ` or :ref:`hot standby `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:92 +msgid "Environment variable: TT_WAL_DIR_RESCAN_DELAY" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:99 +msgid "Since version :doc:`2.8.1 `. The size of the queue (in bytes) used by a :ref:`replica ` to submit new transactions to a :ref:`write-ahead log` (WAL). This option helps limit the rate at which a replica submits transactions to the WAL. Limiting the queue size might be useful when a replica is trying to sync with a master and reads new transactions faster than writing them to the WAL." +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:108 +msgid "You might consider increasing the ``wal_queue_max_size`` value in case of large tuples (approximately one megabyte or larger)." +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:112 +msgid "Default: 16777216 bytes" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:113 +msgid "Environment variable: TT_WAL_QUEUE_MAX_SIZE" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:120 +msgid "Since version :doc:`2.6.3 `. The delay (in seconds) used to prevent the :ref:`Tarantool garbage collector ` from immediately removing :ref:`write-ahead log` files after a node restart. This delay eliminates possible erroneous situations when the master deletes WALs needed by :ref:`replicas ` after restart. As a consequence, replicas sync with the master faster after its restart and don't need to download all the data again." +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:128 +msgid "Once all the nodes in the replica set are up and running, automatic cleanup is started again even if ``wal_cleanup_delay`` has not expired." +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:133 +msgid "The ``wal_cleanup_delay`` option has no effect on nodes running as :ref:`anonymous replicas`." +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:137 +msgid "Default: 14400 seconds" +msgstr "" + +#: ../../doc/reference/configuration/cfg_binary_logging_snapshots.rst:138 +msgid "Environment variable: TT_WAL_CLEANUP_DELAY" +msgstr "" + +#: ../../doc/reference/configuration/index.rst:44 +msgid "Hot standby" +msgstr "" + +#: ../../doc/reference/configuration/cfg_hot_standby.rst:3 +msgid "Since version 1.7.4. Whether to start the server in **hot standby** mode." +msgstr "" + +#: ../../doc/reference/configuration/cfg_hot_standby.rst:5 +msgid "Hot standby is a feature which provides a simple form of failover without :ref:`replication `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_hot_standby.rst:8 +msgid "The expectation is that there will be two instances of the server using the same configuration. The first one to start will be the \"primary\" instance. The second one to start will be the \"standby\" instance." +msgstr "" + +#: ../../doc/reference/configuration/cfg_hot_standby.rst:12 +msgid "To initiate the standby instance, start a second instance of the Tarantool server on the same computer with the same :doc:`box.cfg ` configuration settings -- including the same directories and same non-null URIs -- and with the additional configuration setting ``hot_standby = true``. Expect to see a notification ending with the words ``I> Entering hot standby mode``. This is fine. It means that the standby instance is ready to take over if the primary instance goes down." +msgstr "" + +#: ../../doc/reference/configuration/cfg_hot_standby.rst:22 +msgid "The standby instance will initialize and will try to take a lock on :ref:`wal_dir `, but will fail because the primary instance has made a lock on ``wal_dir``. So the standby instance goes into a loop, reading the write ahead log which the primary instance is writing (so the two instances are always in sync), and trying to take the lock. If the primary instance goes down for any reason, the lock will be released. In this case, the standby instance will succeed in taking the lock, will connect on the :ref:`listen ` address and will become the primary instance. Expect to see a notification ending with the words ``I> ready to accept requests``." +msgstr "" + +#: ../../doc/reference/configuration/cfg_hot_standby.rst:35 +msgid "Thus there is no noticeable downtime if the primary instance goes down." +msgstr "" + +#: ../../doc/reference/configuration/cfg_hot_standby.rst:37 +msgid "Hot standby feature has no effect:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_hot_standby.rst:39 +msgid "if :ref:`wal_dir_rescan_delay = a large number ` (on Mac OS and FreeBSD); on these platforms, it is designed so that the loop repeats every ``wal_dir_rescan_delay`` seconds." +msgstr "" + +#: ../../doc/reference/configuration/cfg_hot_standby.rst:43 +msgid "if :ref:`wal_mode = 'none' `; it is designed to work with ``wal_mode = 'write'`` or ``wal_mode = 'fsync'``." +msgstr "" + +#: ../../doc/reference/configuration/cfg_hot_standby.rst:45 +msgid "for spaces created with :doc:`engine = 'vinyl' `; it is designed to work for spaces created with ``engine = 'memtx'``." +msgstr "" + +#: ../../doc/reference/configuration/cfg_hot_standby.rst:50 +msgid "Environment variable: TT_HOT_STANDBY" +msgstr "" + +#: ../../doc/reference/configuration/index.rst:49 +msgid "Replication" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:1 +msgid ":ref:`replication `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:2 +msgid ":ref:`replication_anon `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:3 +msgid ":ref:`bootstrap_strategy `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:4 +msgid ":ref:`replication_connect_timeout `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:5 +msgid ":ref:`replication_connect_quorum `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:6 +msgid ":ref:`replication_skip_conflict `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:7 +msgid ":ref:`replication_sync_lag `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:8 +msgid ":ref:`replication_sync_timeout `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:9 +msgid ":ref:`replication_timeout `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:10 +msgid ":ref:`replicaset_uuid `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:11 +msgid ":ref:`instance_uuid `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:12 +msgid ":ref:`replication_synchro_quorum `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:13 +msgid ":ref:`replication_synchro_timeout `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:14 +msgid ":ref:`replication_threads `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:15 +msgid ":ref:`election_mode `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:16 +msgid ":ref:`election_timeout `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:17 +msgid ":ref:`election_fencing_mode `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:23 +msgid "Since version 1.7.4. If ``replication`` is not an empty string, the instance is considered to be a Tarantool :ref:`replica `. The replica will try to connect to the master specified in ``replication`` with a :ref:`URI ` (Universal Resource Identifier), for example:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:29 +msgid ":samp:`{konstantin}:{secret_password}@{tarantool.org}:{3301}`" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:31 +msgid "If there is more than one replication source in a replica set, specify an array of URIs, for example (replace 'uri' and 'uri2' in this example with valid URIs):" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:35 +msgid ":extsamp:`box.cfg{ replication = { {*{'uri1'}*}, {*{'uri2'}*} } }`" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:39 +msgid "Starting from version 2.10.0, there is a number of other ways for specifying several URIs. See :ref:`syntax examples `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:41 +msgid "If one of the URIs is \"self\" -- that is, if one of the URIs is for the instance where ``box.cfg{}`` is being executed -- then it is ignored. Thus, it is possible to use the same ``replication`` specification on multiple server instances, as shown in :ref:`these examples `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:47 +msgid "The default user name is 'guest'." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:49 +msgid "A read-only replica does not accept data-change requests on the :ref:`listen ` port." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:52 +msgid "The ``replication`` parameter is dynamic, that is, to enter master mode, simply set ``replication`` to an empty string and issue:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:55 +msgid ":extsamp:`box.cfg{ replication = {*{new-value}*} }`" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:59 +msgid "Environment variable: TT_REPLICATION" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:66 +msgid "Since version 2.3.1. A Tarantool replica can be anonymous. This type of replica is read-only (but you still can write to temporary and replica-local spaces), and it isn't present in the ``_cluster`` table." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:71 +msgid "Since an anonymous replica isn't registered in the ``_cluster`` table, there is no limitation for anonymous replicas count in a replica set: you can have as many of them as you want." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:75 +msgid "In order to make a replica anonymous, pass the option ``replication_anon=true`` to ``box.cfg`` and set ``read_only`` to ``true``." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:79 +msgid "Let's go through anonymous replica bootstrap. Suppose we have got a master configured with" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:82 +msgid "box.cfg{listen=3301}" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:86 +msgid "and created a local space called \"loc\":" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:88 +msgid "box.schema.space.create('loc', {is_local=true})\n" +"box.space.loc:create_index(\"pk\")" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:93 +msgid "Now, to configure an anonymous replica, we need to issue ``box.cfg``, as usual." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:96 +msgid "box.cfg{replication_anon=true, read_only=true, replication=3301}" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:100 +msgid "As mentioned above, ``replication_anon`` may be set to ``true`` only together with ``read_only``. The instance will fetch the master's snapshot and start following its changes. It will receive no id, so its id value will remain zero." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:105 +msgid "tarantool> box.info.id\n" +"---\n" +"- 0\n" +"...\n" +"tarantool> box.info.replication\n" +"---\n" +"- 1:\n" +" id: 1\n" +" uuid: 3c84f8d9-e34d-4651-969c-3d0ed214c60f\n" +" lsn: 4\n" +" upstream:\n" +" status: follow\n" +" idle: 0.6912029999985\n" +" peer:\n" +" lag: 0.00014615058898926\n" +"..." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:124 +msgid "Now we can use the replica. For example, we can do inserts into the local space:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:127 +msgid "tarantool> for i = 1,10 do\n" +" > box.space.loc:insert{i}\n" +" > end\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:135 +msgid "Note that while the instance is anonymous, it will increase the 0-th component of its ``vclock``:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:138 +msgid "tarantool> box.info.vclock\n" +"---\n" +"- {0: 10, 1: 4}\n" +"..." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:145 +msgid "Let's now promote the anonymous replica to a regular one:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:147 +msgid "tarantool> box.cfg{replication_anon=false}\n" +"2019-12-13 20:34:37.423 [71329] main I> assigned id 2 to replica 6a9c2ed2-b9e1-4c57-a0e8-51a46def7661\n" +"2019-12-13 20:34:37.424 [71329] main/102/interactive I> set 'replication_anon' configuration option to false\n" +"---\n" +"...\n" +"\n" +"tarantool> 2019-12-13 20:34:37.424 [71329] main/117/applier/ I> subscribed\n" +"2019-12-13 20:34:37.424 [71329] main/117/applier/ I> remote vclock {1: 5} local vclock {0: 10, 1: 5}\n" +"2019-12-13 20:34:37.425 [71329] main/118/applierw/ C> leaving orphan mode" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:159 +msgid "The replica has just received an id equal to 2. We can make it read-write now." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:161 +msgid "tarantool> box.cfg{read_only=false}\n" +"2019-12-13 20:35:46.392 [71329] main/102/interactive I> set 'read_only' configuration option to false\n" +"---\n" +"...\n" +"\n" +"tarantool> box.schema.space.create('test')\n" +"---\n" +"- engine: memtx\n" +"before_replace: 'function: 0x01109f9dc8'\n" +"on_replace: 'function: 0x01109f9d90'\n" +"ck_constraint: []\n" +"field_count: 0\n" +"temporary: false\n" +"index: []\n" +"is_local: false\n" +"enabled: false\n" +"name: test\n" +"id: 513\n" +"- created\n" +"...\n" +"\n" +"tarantool> box.info.vclock\n" +"---\n" +"- {0: 10, 1: 5, 2: 2}\n" +"..." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:189 +msgid "Now the replica tracks its changes in the 2nd ``vclock`` component, as expected. It can also become a replication master from now on." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:193 +msgid "Notes:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:195 +msgid "You cannot replicate from an anonymous instance." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:196 +msgid "To promote an anonymous instance to a regular one, first start it as anonymous, and only then issue ``box.cfg{replication_anon=false}``" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:199 +msgid "In order for the deanonymization to succeed, the instance must replicate from some read-write instance, otherwise it cannot be added to the ``_cluster`` table." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:205 +msgid "Environment variable: TT_REPLICATION_ANON" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:213 +msgid "Since :doc:`2.11.0 `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:215 +msgid "Specifies a strategy used to bootstrap a :ref:`replica set `. The following strategies are available:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:218 +msgid "``auto``: a node doesn't boot if a half or more of other nodes in a replica set are not connected. For example, if the :ref:`replication ` parameter contains 2 or 3 nodes, a node requires 2 connected instances. In the case of 4 or 5 nodes, at least 3 connected instances are required. Moreover, a bootstrap leader fails to boot unless every connected node has chosen it as a bootstrap leader." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:224 +msgid "``legacy`` (deprecated since :doc:`2.11.0 `): a node requires the :ref:`replication_connect_quorum ` number of other nodes to be connected. This option is added to keep the compatibility with the current versions of Cartridge and might be removed in the future." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:228 +msgid "Default: auto" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:229 +msgid "Environment variable: TT_BOOTSTRAP_STRATEGY" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:237 +msgid "Since version 1.9.0. The number of seconds that a replica will wait when trying to connect to a master in a cluster. See :ref:`orphan status ` for details." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:242 +msgid "This parameter is different from :ref:`replication_timeout `, which a master uses to disconnect a replica when the master receives no acknowledgments of heartbeat messages." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:248 +msgid "Default: 30" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:249 +msgid "Environment variable: TT_REPLICATION_CONNECT_TIMEOUT" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:256 +msgid "Deprecated since :doc:`2.11.0 `. This option is in effect if :ref:`bootstrap_strategy ` is set to ``legacy``." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:259 +msgid "Specifies the number of nodes to be up and running to start a replica set. This parameter has effect during :ref:`bootstrap ` or :ref:`configuration update `. Setting ``replication_connect_quorum`` to ``0`` makes Tarantool require no immediate reconnect only in case of recovery. See :ref:`Orphan status ` for details." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:266 +#: ../../doc/reference/configuration/cfg_replication.rst:290 +#: ../../doc/reference/configuration/cfg_replication.rst:413 +#: ../../doc/reference/configuration/cfg_replication.rst:437 +msgid "Example:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:268 +msgid "box.cfg { replication_connect_quorum = 2 }" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:274 +msgid "Environment variable: TT_REPLICATION_CONNECT_QUORUM" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:281 +msgid "Since version 1.10.1. By default, if a replica adds a unique key that another replica has added, replication :ref:`stops ` with error = ER_TUPLE_FOUND." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:286 +msgid "However, by specifying ``replication_skip_conflict = true``, users can state that such errors may be ignored. So instead of saving the broken transaction to the xlog, it will be written there as ``NOP`` (No operation)." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:292 +msgid "box.cfg{replication_skip_conflict=true}" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:298 +msgid "Environment variable: TT_REPLICATION_SKIP_CONFLICT" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:304 +msgid "``replication_skip_conflict = true`` is recommended to be used only for manual replication recovery." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:311 +msgid "Since version 1.9.0. The maximum :ref:`lag ` allowed for a replica. When a replica :ref:`syncs ` (gets updates from a master), it may not catch up completely. The number of seconds that the replica is behind the master is called the \"lag\". Syncing is considered to be complete when the replica's lag is less than or equal to ``replication_sync_lag``." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:319 +msgid "If a user sets ``replication_sync_lag`` to nil or to 365 * 100 * 86400 (TIMEOUT_INFINITY), then lag does not matter -- the replica is always considered to be \"synced\". Also, the lag is ignored (assumed to be infinite) in case the master is running Tarantool older than 1.7.7, which does not send :ref:`heartbeat messages `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:324 +msgid "This parameter is ignored during bootstrap. See :ref:`orphan status ` for details." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:328 +msgid "Default: 10" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:329 +msgid "Environment variable: TT_REPLICATION_SYNC_LAG" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:336 +msgid "Since version 1.10.2. The number of seconds that a node waits when trying to sync with other nodes in a replica set (see :ref:`bootstrap_strategy `), after connecting or during :ref:`configuration update `. This could fail indefinitely if ``replication_sync_lag`` is smaller than network latency, or if the replica cannot keep pace with master updates. If ``replication_sync_timeout`` expires, the replica enters :ref:`orphan status `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:346 +msgid "Default: 300" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:347 +msgid "Environment variable: TT_REPLICATION_SYNC_TIMEOUT" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:352 +msgid "The default ``replication_sync_timeout`` value is going to be changed in future versions from ``300`` to ``0``. You can learn the reasoning behind this decision from the :ref:`Default value for replication_sync_timeout ` topic, which also describes how to try the new behavior in the current version." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:359 +msgid "Since version 1.7.5. If the master has no updates to send to the replicas, it sends heartbeat messages every ``replication_timeout`` seconds, and each replica sends an ACK packet back." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:363 +msgid "Both master and replicas are programmed to drop the connection if they get no response in four ``replication_timeout`` periods. If the connection is dropped, a replica tries to reconnect to the master." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:367 +msgid "See more in :ref:`Monitoring a replica set `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:371 +msgid "Environment variable: TT_REPLICATION_TIMEOUT" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:378 +msgid "Since version 1.9.0. As described in section :ref:`\"Replication architecture\" `, each replica set is identified by a `universally unique identifier `_ called **replica set UUID**, and each instance is identified by an **instance UUID**." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:385 +msgid "Ordinarily it is sufficient to let the system generate and format the UUID strings which will be permanently stored." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:388 +msgid "However, some administrators may prefer to store Tarantool configuration information in a central repository, for example `Apache ZooKeeper `_. Such administrators can assign their own UUID values for either -- or both -- instances (:ref:`instance_uuid `) and replica set (``replicaset_uuid``), when starting up for the first time." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:395 +msgid "General rules:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:397 +msgid "The values must be true unique identifiers, not shared by other instances or replica sets within the common infrastructure." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:400 +msgid "The values must be used consistently, not changed after initial setup (the initial values are stored in :ref:`snapshot files ` and are checked whenever the system is restarted)." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:404 +msgid "The values must comply with `RFC 4122 `_. The `nil UUID `_ is not allowed." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:408 +msgid "The UUID format includes sixteen octets represented as 32 hexadecimal (base 16) digits, displayed in five groups separated by hyphens, in the form ``8-4-4-4-12`` for a total of 36 characters (32 alphanumeric characters and four hyphens)." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:415 +msgid "box.cfg{replicaset_uuid='7b853d13-508b-4b8e-82e6-806f088ea6e9'}" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:421 +msgid "Environment variable: TT_REPLICASET_UUID" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:428 +msgid "Since version 1.9.0. For replication administration purposes, it is possible to set the `universally unique identifiers `_ of the instance (``instance_uuid``) and the replica set (``replicaset_uuid``), instead of having the system generate the values." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:434 +msgid "See the description of :ref:`replicaset_uuid ` parameter for details." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:439 +msgid "box.cfg{instance_uuid='037fec43-18a9-4e12-a684-a42b716fcd02'}" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:445 +msgid "Environment variable: TT_INSTANCE_UUID" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:452 +msgid "Since version :doc:`2.5.1 `. For :ref:`synchronous replication ` only. This option tells how many replicas should confirm the receipt of a synchronous transaction before it can finish its commit." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:457 +msgid "Since version :doc:`2.5.3 `, the option supports dynamic evaluation of the quorum number. That is, the number of quorum can be specified not as a constant number, but as a function instead. In this case, the option returns the formula evaluated. The result is treated as an integer number. Once any replicas are added or removed, the expression is re-evaluated automatically." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:464 +msgid "For example," +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:466 +msgid "box.cfg{replication_synchro_quorum = \"N / 2 + 1\"}" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:470 +msgid "Where `N` is a current number of registered replicas in a cluster." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:472 +msgid "Keep in mind that the example above represents a canonical quorum definition. The formula ``at least 50% of the cluster size + 1`` guarantees data reliability. Using a value less than the canonical one might lead to unexpected results, including a :ref:`split-brain `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:477 +msgid "Since version :doc:`2.10.0 `, this option does not account for anonymous replicas." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:480 +msgid "The default value for this parameter is ``N / 2 + 1``." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:482 +#: ../../doc/reference/configuration/cfg_replication.rst:502 +msgid "It is not used on replicas, so if the master dies, the pending synchronous transactions will be kept waiting on the replicas until a new master is elected." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:485 +msgid "If the value for this option is set to ``1``, the synchronous transactions work like asynchronous when not configured. `1` means that successful WAL write to the master is enough to commit." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:489 +msgid "Default: N / 2 + 1 (before version :doc:`2.10.0 `, the default value was 1)" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:490 +msgid "Environment variable: TT_REPLICATION_SYNCHRO_QUORUM" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:497 +msgid "Since version :doc:`2.5.1 `. For :ref:`synchronous replication ` only. Tells how many seconds to wait for a synchronous transaction quorum replication until it is declared failed and is rolled back." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:507 +#: ../../doc/reference/configuration/cfg_replication.rst:608 +#: ../../doc/reference/configuration/cfg_logging.rst:35 +msgid "Default: 5" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:508 +msgid "Environment variable: TT_REPLICATION_SYNCHRO_TIMEOUT" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:515 +msgid "Since version :doc:`2.10.0 `. The number of threads spawned to decode the incoming replication data." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:518 +msgid "The default value is `1`. It means that a single separate thread handles all the incoming replication streams. In most cases, one thread is enough for all incoming data. Therefore, it is likely that the user will not need to set this configuration option." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:523 +msgid "Possible values range from 1 to 1000. If there are multiple replication threads, connections to serve are distributed evenly between the threads." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:528 +msgid "Possible values: from 1 to 1000" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:529 +msgid "Environment variable: TT_REPLICATION_THREADS" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:530 +msgid "Dynamic: **no**" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:536 +msgid "Since version :doc:`2.6.1 `. Specifies the role of a replica set node in the :ref:`leader election process `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:540 +msgid "Possible values:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:542 +msgid "off" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:543 +msgid "voter" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:544 +msgid "candidate" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:545 +msgid "manual." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:547 +msgid "Participation of a replica set node in the automated leader election can be turned on and off by this option." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:550 +msgid "The default value is ``off``. All nodes that have values other than ``off`` run the Raft state machine internally talking to other nodes according to the Raft leader election protocol. When the option is ``off``, the node accepts Raft messages from other nodes, but it doesn't participate in the election activities, and this doesn't affect the node's state. So, for example, if a node is not a leader but it has ``election_mode = 'off'``, it is writable anyway." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:558 +msgid "You can control which nodes can become a leader. If you want a node to participate in the election process but don't want that it becomes a leaders, set the ``election_mode`` option to ``voter``. In this case, the election works as usual, this particular node will vote for other nodes, but won't become a leader." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:564 +msgid "If the node should be able to become a leader, use ``election_mode = 'candidate'``." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:566 +msgid "Since version :doc:`2.8.2 `, the manual election mode is introduced. It may be used when a user wants to control which instance is the leader explicitly instead of relying on the Raft election algorithm." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:570 +msgid "When an instance is configured with the ``election_mode='manual'``, it behaves as follows:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:572 +msgid "By default, the instance acts like a voter -- it is read-only and may vote for other instances that are candidates." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:573 +msgid "Once :ref:`box.ctl.promote() ` is called, the instance becomes a candidate and starts a new election round. If the instance wins the elections, it becomes a leader, but won't participate in any new elections." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:577 +msgid "Default: 'off'" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:578 +msgid "Environment variable: TT_ELECTION_MODE" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:585 +msgid "Since version :doc:`2.6.1 `. Specifies the timeout between election rounds in the :ref:`leader election process ` if the previous round ended up with a split-vote." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:590 +msgid "In the :ref:`leader election process `, there can be an election timeout for the case of a split-vote. The timeout can be configured using this option; the default value is 5 seconds." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:595 +msgid "It is quite big, and for most of the cases it can be freely lowered to 300-400 ms. It can be a floating point value (300 ms would be ``box.cfg{election_timeout = 0.3}``)." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:599 +msgid "To avoid the split vote repeat, the timeout is randomized on each node during every new election, from 100% to 110% of the original timeout value. For example, if the timeout is 300 ms and there are 3 nodes started the election simultaneously in the same term, they can set their election timeouts to 300, 310, and 320 respectively, or to 305, 302, and 324, and so on. In that way, the votes will never be split because the election on different nodes won't be restarted simultaneously." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:609 +msgid "Environment variable: TT_ELECTION_TIMEOUT" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:616 +msgid "Since version :doc:`2.11.0 `. In earlier Tarantool versions, use :ref:`election_fencing_enabled ` instead." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:619 +msgid "Specifies the :ref:`leader fencing mode ` that affects the leader election process. When the parameter is set to ``soft`` or ``strict``, the leader resigns its leadership if it has less than :ref:`replication_synchro_quorum ` of alive connections to the cluster nodes. The resigning leader receives the status of a :ref:`follower ` in the current election term and becomes read-only." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:628 +msgid "In ``soft`` mode, a connection is considered dead if there are no responses for :ref:`4*replication_timeout ` seconds both on the current leader and the followers." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:631 +msgid "In ``strict`` mode, a connection is considered dead if there are no responses for :ref:`2*replication_timeout ` seconds on the current leader and :ref:`4*replication_timeout ` seconds on the followers. This improves chances that there is only one leader at any time." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:637 +msgid "Fencing applies to the instances that have the :ref:`election_mode ` set to ``candidate`` or ``manual``. To turn off :ref:`leader fencing `, set ``election_fencing_mode`` to ``off``." +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:642 +msgid "Default: 'soft'" +msgstr "" + +#: ../../doc/reference/configuration/cfg_replication.rst:643 +msgid "Environment variable: TT_ELECTION_FENCING_MODE" +msgstr "" + +#: ../../doc/reference/configuration/index.rst:54 +msgid "Networking" +msgstr "" + +#: ../../doc/reference/configuration/cfg_networking.rst:1 +msgid ":ref:`io_collect_interval `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_networking.rst:2 +msgid ":ref:`net_msg_max `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_networking.rst:3 +msgid ":ref:`readahead `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_networking.rst:4 +msgid ":ref:`iproto_threads `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_networking.rst:10 +msgid "Since version 1.4.9. The instance will sleep for io_collect_interval seconds between iterations of the event loop. Can be used to reduce CPU load in deployments in which the number of client connections is large, but requests are not so frequent (for example, each connection issues just a handful of requests per second)." +msgstr "" + +#: ../../doc/reference/configuration/cfg_networking.rst:18 +msgid "Environment variable: TT_IO_COLLECT_INTERVAL" +msgstr "" + +#: ../../doc/reference/configuration/cfg_networking.rst:25 +msgid "Since version 1.10.1. To handle messages, Tarantool allocates fibers. To prevent fiber overhead from affecting the whole system, Tarantool restricts how many messages the fibers handle, so that some pending requests are blocked." +msgstr "" + +#: ../../doc/reference/configuration/cfg_networking.rst:30 +msgid "On powerful systems, increase ``net_msg_max`` and the scheduler will immediately start processing pending requests." +msgstr "" + +#: ../../doc/reference/configuration/cfg_networking.rst:33 +msgid "On weaker systems, decrease ``net_msg_max`` and the overhead may decrease although this may take some time because the scheduler must wait until already-running requests finish." +msgstr "" + +#: ../../doc/reference/configuration/cfg_networking.rst:37 +msgid "When ``net_msg_max`` is reached, Tarantool suspends processing of incoming packages until it has processed earlier messages. This is not a direct restriction of the number of fibers that handle network messages, rather it is a system-wide restriction of channel bandwidth. This in turn causes restriction of the number of incoming network messages that the :ref:`transaction processor thread ` handles, and therefore indirectly affects the fibers that handle network messages. (The number of fibers is smaller than the number of messages because messages can be released as soon as they are delivered, while incoming requests might not be processed until some time after delivery.)" +msgstr "" + +#: ../../doc/reference/configuration/cfg_networking.rst:51 +msgid "On typical systems, the default value (768) is correct." +msgstr "" + +#: ../../doc/reference/configuration/cfg_networking.rst:54 +msgid "Default: 768" +msgstr "" + +#: ../../doc/reference/configuration/cfg_networking.rst:55 +msgid "Environment variable: TT_NET_MSG_MAX" +msgstr "" + +#: ../../doc/reference/configuration/cfg_networking.rst:62 +msgid "Since version 1.6.2. The size of the read-ahead buffer associated with a client connection. The larger the buffer, the more memory an active connection consumes and the more requests can be read from the operating system buffer in a single system call. The rule of thumb is to make sure the buffer can contain at least a few dozen requests. Therefore, if a typical tuple in a request is large, e.g. a few kilobytes or even megabytes, the read-ahead buffer size should be increased. If batched request processing is not used, it’s prudent to leave this setting at its default." +msgstr "" + +#: ../../doc/reference/configuration/cfg_networking.rst:73 +msgid "Default: 16320" +msgstr "" + +#: ../../doc/reference/configuration/cfg_networking.rst:74 +msgid "Environment variable: TT_READAHEAD" +msgstr "" + +#: ../../doc/reference/configuration/cfg_networking.rst:81 +msgid "Since version :doc:`2.8.1 `. The number of :ref:`network threads `. There can be unusual workloads where the network thread is 100% loaded and the transaction processor thread is not, so the network thread is a bottleneck. In that case set ``iproto_threads`` to 2 or more. The operating system kernel will determine which connection goes to which thread." +msgstr "" + +#: ../../doc/reference/configuration/cfg_networking.rst:89 +msgid "On typical systems, the default value (1) is correct." +msgstr "" + +#: ../../doc/reference/configuration/cfg_networking.rst:93 +msgid "Environment variable: TT_IPROTO_THREADS" +msgstr "" + +#: ../../doc/reference/configuration/index.rst:59 +msgid "Logging" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:3 +msgid "This section provides information on how to configure options related to logging. You can also use the :ref:`log module ` to configure logging in your application." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:7 +msgid ":ref:`log_level `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:8 +msgid ":ref:`log `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:9 +msgid ":ref:`log_nonblock `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:10 +msgid ":ref:`too_long_threshold `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:11 +msgid ":ref:`log_format `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:12 +msgid ":ref:`log_modules `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:18 +msgid "Since version 1.6.2. Specifies the level of detail the :ref:`log ` has. There are seven levels:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:21 +msgid "1 – ``SYSERROR``" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:22 +msgid "2 – ``ERROR``" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:23 +msgid "3 – ``CRITICAL``" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:24 +msgid "4 – ``WARNING``" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:25 +msgid "5 – ``INFO``" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:26 +msgid "6 – ``VERBOSE``" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:27 +msgid "7 – ``DEBUG``" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:29 +msgid "By setting ``log_level``, you can enable logging of all events with severities above or equal to the given level. Tarantool prints logs to the standard error stream by default. This can be changed with the :ref:`log ` configuration parameter." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:36 +msgid "Environment variable: TT_LOG_LEVEL" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:40 +msgid "Prior to Tarantool 1.7.5 there were only six levels and ``DEBUG`` was level 6. Starting with Tarantool 1.7.5, ``VERBOSE`` is level 6 and ``DEBUG`` is level 7. ``VERBOSE`` is a new level for monitoring repetitive events which would cause too much log writing if ``INFO`` were used instead." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:49 +msgid "Since version 1.7.4. By default, Tarantool sends the log to the standard error stream (``stderr``). If ``log`` is specified, Tarantool can send the log to a:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:53 +msgid "file" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:55 +msgid "pipe" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:57 +msgid "system logger" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:59 +msgid "Example 1: sending the log to the ``tarantool.log`` file." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:61 +msgid "box.cfg{log = 'tarantool.log'}\n" +"-- or\n" +"box.cfg{log = 'file:tarantool.log'}" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:67 +msgid "This opens the file ``tarantool.log`` for output on the server's default directory. If the ``log`` string has no prefix or has the prefix \"file:\", then the string is interpreted as a file path." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:71 +msgid "Example 2: sending the log to a pipe." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:73 +msgid "box.cfg{log = '| cronolog tarantool.log'}\n" +"-- or\n" +"box.cfg{log = 'pipe: cronolog tarantool.log'}" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:79 +msgid "This starts the program `cronolog `_ when the server starts, and sends all log messages to the standard input (``stdin``) of ``cronolog``. If the ``log`` string begins with '|' or has the prefix \"pipe:\", then the string is interpreted as a Unix `pipeline `_." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:85 +msgid "Example 3: sending the log to syslog." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:87 +msgid "box.cfg{log = 'syslog:identity=tarantool'}\n" +"-- or\n" +"box.cfg{log = 'syslog:facility=user'}\n" +"-- or\n" +"box.cfg{log = 'syslog:identity=tarantool,facility=user'}\n" +"-- or\n" +"box.cfg{log = 'syslog:server=unix:/dev/log'}" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:97 +msgid "If the ``log`` string begins with \"syslog:\", then it is interpreted as a message for the `syslogd `_ program, which normally is running in the background on any Unix-like platform. The setting can be ``syslog:``, ``syslog:facility=...``, ``syslog:identity=...``, ``syslog:server=...``, or a combination." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:104 +msgid "The ``syslog:identity`` setting is an arbitrary string, which is placed at the beginning of all messages. The default value is \"tarantool\"." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:107 +msgid "The ``syslog:facility`` setting is currently ignored but will be used in the future. The value must be one of the `syslog `_ keywords, which tell syslogd where the message should go. The possible values are: auth, authpriv, cron, daemon, ftp, kern, lpr, mail, news, security, syslog, user, uucp, local0, local1, local2, local3, local4, local5, local6, local7. The default value is: local7." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:114 +msgid "The ``syslog:server`` setting is the locator for the syslog server. It can be a Unix socket path beginning with \"unix:\", or an ipv4 port number. The default socket value is: ``dev/log`` (on Linux) or ``/var/run/syslog`` (on macOS). The default port value is: 514, the UDP port." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:119 +msgid "When logging to a file, Tarantool reopens the log on `SIGHUP `_. When log is a program, its PID is saved in the :ref:`log.pid ` variable. You need to send it a signal to rotate logs." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:125 +msgid "Environment variable: TT_LOG" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:132 +msgid "Since version 1.7.4. If ``log_nonblock`` equals **true**, Tarantool does not block during logging when the system is not ready for writing, and drops the message instead. If :ref:`log_level ` is high, and many messages go to the log, setting ``log_nonblock`` to **true** may improve logging performance at the cost of some log messages getting lost." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:139 +msgid "This parameter has effect only if :ref:`log ` is configured to send logs to a pipe or system logger. The default ``log_nonblock`` value is **nil**, which means that blocking behavior corresponds to the logger type:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:144 +msgid "**false** for ``stderr`` and file loggers." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:146 +msgid "**true** for a pipe and system logger." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:148 +msgid "This is a behavior change: in earlier versions of the Tarantool server, the default value was **true**." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:153 +msgid "Environment variable: TT_LOG_NONBLOCK" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:160 +msgid "Since version 1.6.2. If processing a request takes longer than the given value (in seconds), warn about it in the log. Has effect only if :ref:`log_level ` is greater than or equal to 4 (WARNING)." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:166 +msgid "Default: 0.5" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:167 +msgid "Environment variable: TT_TOO_LONG_THRESHOLD" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:174 +msgid "Since version 1.7.6. Log entries have two possible formats:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:176 +msgid "'plain' (the default), or" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:177 +msgid "'json' (with more detail and with JSON labels)." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:179 +msgid "Here is what a log entry looks like if ``box.cfg{log_format='plain'}``:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:181 +msgid "2017-10-16 11:36:01.508 [18081] main/101/interactive I> set 'log_format' configuration option to \"plain\"" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:185 +msgid "Here is what a log entry looks like if ``box.cfg{log_format='json'}``:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:187 +msgid "{\"time\": \"2017-10-16T11:36:17.996-0600\",\n" +"\"level\": \"INFO\",\n" +"\"message\": \"set 'log_format' configuration option to \\\"json\\\"\",\n" +"\"pid\": 18081,|\n" +"\"cord_name\": \"main\",\n" +"\"fiber_id\": 101,\n" +"\"fiber_name\": \"interactive\",\n" +"\"file\": \"builtin\\/box\\/load_cfg.lua\",\n" +"\"line\": 317}" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:199 +msgid "The ``log_format='plain'`` entry has a time value, process ID, cord name, :ref:`fiber_id `, :ref:`fiber_name `, :ref:`log level `, and message." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:204 +msgid "The ``log_format='json'`` entry has the same fields along with their labels, and in addition has the file name and line number of the Tarantool source." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:208 +msgid "Default: 'plain'" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:209 +msgid "Environment variable: TT_LOG_FORMAT" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:217 +msgid "Since version :doc:`2.11.0 `. Configure the specified log levels (:ref:`log_level `) for different modules." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:220 +msgid "You can specify a logging level for the following module types:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:222 +msgid "Modules (files) that use the default logger. Example: :ref:`Set log levels for files that use the default logger `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:225 +msgid "Modules that use custom loggers created using the :ref:`log.new() ` function. Example: :ref:`Set log levels for modules that use custom loggers `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:228 +msgid "The ``tarantool`` module that enables you to configure the logging level for Tarantool core messages. Specifically, it configures the logging level for messages logged from non-Lua code, including C modules. Example: :ref:`Set a log level for C modules `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:231 +msgid "Type: table" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:232 +msgid "Default: blank" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:233 +msgid "Environment variable: TT_LOG_MODULES" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:240 +msgid "**Example 1: Set log levels for files that use the default logger**" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:242 +msgid "Suppose you have two identical modules placed by the following paths: ``test/logging/module1.lua`` and ``test/logging/module2.lua``. These modules use the default logger and look as follows:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:245 +msgid "return {\n" +" say_hello = function()\n" +" local log = require('log')\n" +" log.info('Info message from module1')\n" +" end\n" +"}\n" +"" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:249 +msgid "To load these modules in your application, you need to add the corresponding ``require`` directives:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:251 +msgid "module1 = require('test.logging.module1')\n" +"module2 = require('test.logging.module2')\n" +"" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:256 +msgid "To configure logging levels, you need to provide module names corresponding to paths to these modules. In the example below, the ``box_cfg`` variable contains logging settings that can be passed to the ``box.cfg()`` function:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:259 +msgid "box_cfg = { log_modules = {\n" +" ['test.logging.module1'] = 'verbose',\n" +" ['test.logging.module2'] = 'error' }\n" +"}\n" +"" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:264 +msgid "Given that ``module1`` has the ``verbose`` logging level and ``module2`` has the ``error`` level, calling ``module1.say_hello()`` shows a message but ``module2.say_hello()`` is swallowed:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:266 +msgid "-- Prints 'info' messages --\n" +"module1.say_hello()\n" +"--[[\n" +"[92617] main/103/interactive/test.logging.module1 I> Info message from module1\n" +"---\n" +"...\n" +"--]]\n" +"\n" +"-- Swallows 'info' messages --\n" +"module2.say_hello()\n" +"--[[\n" +"---\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:273 +msgid "**Example 2: Set log levels for modules that use custom loggers**" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:275 +msgid "In the example below, the ``box_cfg`` variable contains logging settings that can be passed to the ``box.cfg()`` function. This example shows how to set the ``verbose`` level for ``module1`` and the ``error`` level for ``module2``:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:278 +msgid "box_cfg = { log_level = 'warn',\n" +" log_modules = {\n" +" module1 = 'verbose',\n" +" module2 = 'error' }\n" +"}\n" +"" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:283 +msgid "To create custom loggers, call the :ref:`log.new() ` function:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:285 +msgid "-- Creates new loggers --\n" +"module1_log = require('log').new('module1')\n" +"module2_log = require('log').new('module2')\n" +"" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:290 +msgid "Given that ``module1`` has the ``verbose`` logging level and ``module2`` has the ``error`` level, calling ``module1_log.info()`` shows a message but ``module2_log.info()`` is swallowed:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:292 +msgid "-- Prints 'info' messages --\n" +"module1_log.info('Info message from module1')\n" +"--[[\n" +"[16300] main/103/interactive/module1 I> Info message from module1\n" +"---\n" +"...\n" +"--]]\n" +"\n" +"-- Swallows 'debug' messages --\n" +"module1_log.debug('Debug message from module1')\n" +"--[[\n" +"---\n" +"...\n" +"--]]\n" +"\n" +"-- Swallows 'info' messages --\n" +"module2_log.info('Info message from module2')\n" +"--[[\n" +"---\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:299 +msgid "**Example 3: Set a log level for C modules**" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:301 +msgid "In the example below, the ``box_cfg`` variable contains logging settings that can be passed to the ``box.cfg()`` function. This example shows how to set the ``info`` level for the ``tarantool`` module:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:304 +msgid "box_cfg = { log_level = 'warn',\n" +" log_modules = { tarantool = 'info' } }\n" +"" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:309 +msgid "The specified level affects messages logged from C modules:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:311 +msgid "ffi = require('ffi')\n" +"\n" +"-- Prints 'info' messages --\n" +"ffi.C._say(ffi.C.S_INFO, nil, 0, nil, 'Info message from C module')\n" +"--[[\n" +"[6024] main/103/interactive I> Info message from C module\n" +"---\n" +"...\n" +"--]]\n" +"\n" +"-- Swallows 'debug' messages --\n" +"ffi.C._say(ffi.C.S_DEBUG, nil, 0, nil, 'Debug message from C module')\n" +"--[[\n" +"---\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:316 +msgid "The example above uses the `LuaJIT ffi library `_ to call C functions provided by the ``say`` module." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:323 +msgid "Logging example" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:325 +msgid "This example illustrates how \"rotation\" works, that is, what happens when the server instance is writing to a log and signals are used when archiving it." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:328 +msgid "Start with two terminal shells: Terminal #1 and Terminal #2." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:330 +msgid "In Terminal #1, start an interactive Tarantool session. Then, use the ``log`` property to send logs to `Log_file` and call ``log.info`` to put a message in the log file." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:334 +msgid "box.cfg{log='Log_file'}\n" +"log = require('log')\n" +"log.info('Log Line #1')" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:340 +msgid "In Terminal #2, use the ``mv`` command to rename the log file to `Log_file.bak`." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:2112 +msgid "mv Log_file Log_file.bak" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:347 +msgid "As a result, the next log message will go to `Log_file.bak`." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:349 +msgid "Go back to Terminal #1 and put a message \"Log Line #2\" in the log file." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:351 +msgid "log.info('Log Line #2')" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:355 +msgid "In Terminal #2, use ``ps`` to find the process ID of the Tarantool instance." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:2127 +msgid "ps -A | grep tarantool" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:362 +msgid "In Terminal #2, execute ``kill -HUP`` to send a SIGHUP signal to the Tarantool instance. Tarantool will open `Log_file` again, and the next log message will go to `Log_file`." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:2135 +msgid "kill -HUP *process_id*" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:370 +msgid "The same effect could be accomplished by calling :ref:`log.rotate `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:372 +msgid "In Terminal #1, put a message \"Log Line #3\" in the log file." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:374 +msgid "log.info('Log Line #3')" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:378 +msgid "In Terminal #2, use ``less`` to examine files. `Log_file.bak` will have the following lines ..." +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:2151 +msgid "2015-11-30 15:13:06.373 [27469] main/101/interactive I> Log Line #1`\n" +"2015-11-30 15:14:25.973 [27469] main/101/interactive I> Log Line #2`" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:387 +msgid "... and `Log_file` will look like this:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_logging.rst:2159 +msgid "log file has been reopened\n" +"2015-11-30 15:15:32.629 [27469] main/101/interactive I> Log Line #3" +msgstr "" + +#: ../../doc/reference/configuration/index.rst:64 +msgid "Feedback" +msgstr "" + +#: ../../doc/reference/configuration/cfg_feedback.rst:3 +msgid ":ref:`feedback_enabled `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_feedback.rst:4 +msgid ":ref:`feedback_host `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_feedback.rst:5 +msgid ":ref:`feedback_interval `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_feedback.rst:7 +msgid "By default, a Tarantool daemon sends a small packet once per hour, to ``https://feedback.tarantool.io``. The packet contains three values from :ref:`box.info `: ``box.info.version``, ``box.info.uuid``, and ``box.info.cluster_uuid``. By changing the feedback configuration parameters, users can adjust or turn off this feature." +msgstr "" + +#: ../../doc/reference/configuration/cfg_feedback.rst:18 +msgid "Since version 1.10.1. Whether to send feedback." +msgstr "" + +#: ../../doc/reference/configuration/cfg_feedback.rst:20 +msgid "If this is set to ``true``, feedback will be sent as described above. If this is set to ``false``, no feedback will be sent." +msgstr "" + +#: ../../doc/reference/configuration/cfg_feedback.rst:25 +msgid "Environment variable: TT_FEEDBACK_ENABLED" +msgstr "" + +#: ../../doc/reference/configuration/cfg_feedback.rst:32 +msgid "Since version 1.10.1. The address to which the packet is sent. Usually the recipient is Tarantool, but it can be any URL." +msgstr "" + +#: ../../doc/reference/configuration/cfg_feedback.rst:36 +msgid "Default: ``https://feedback.tarantool.io``" +msgstr "" + +#: ../../doc/reference/configuration/cfg_feedback.rst:37 +msgid "Environment variable: TT_FEEDBACK_HOST" +msgstr "" + +#: ../../doc/reference/configuration/cfg_feedback.rst:44 +msgid "Since version 1.10.1. The number of seconds between sendings, usually 3600 (1 hour)." +msgstr "" + +#: ../../doc/reference/configuration/cfg_feedback.rst:47 +msgid "Default: 3600" +msgstr "" + +#: ../../doc/reference/configuration/cfg_feedback.rst:48 +msgid "Environment variable: TT_FEEDBACK_INTERVAL" +msgstr "" + +#: ../../doc/reference/configuration/index.rst:69 +msgid "Deprecated parameters" +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:3 +msgid "These parameters are deprecated since Tarantool version 1.7.4:" +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:5 +msgid ":ref:`coredump `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:6 +msgid ":ref:`logger `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:7 +msgid ":ref:`logger_nonblock `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:8 +msgid ":ref:`panic_on_snap_error `," +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:9 +msgid ":ref:`panic_on_wal_error `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:10 +msgid ":ref:`replication_source `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:11 +msgid ":ref:`slab_alloc_arena `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:12 +msgid ":ref:`slab_alloc_maximal `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:13 +msgid ":ref:`slab_alloc_minimal `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:14 +msgid ":ref:`snap_dir `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:15 +msgid ":ref:`snapshot_count `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:16 +msgid ":ref:`snapshot_period `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:17 +msgid ":ref:`rows_per_wal `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:18 +msgid ":ref:`election_fencing_enabled `" +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:24 +msgid "**Deprecated**, do not use." +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:34 +msgid "**Deprecated** in favor of :ref:`log `. The parameter was only renamed, while the type, values and semantics remained intact." +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:42 +msgid "**Deprecated** in favor of :ref:`log_nonblock `. The parameter was only renamed, while the type, values and semantics remained intact." +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:50 +#: ../../doc/reference/configuration/cfg_deprecated.rst:64 +msgid "**Deprecated** in favor of :ref:`force_recovery `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:53 +msgid "If there is an error while reading a snapshot file (at server instance start), abort." +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:75 +msgid "**Deprecated** in favor of :ref:`replication `. The parameter was only renamed, while the type, values and semantics remained intact." +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:84 +msgid "**Deprecated** in favor of :ref:`memtx_memory `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:87 +msgid "How much memory Tarantool allocates to actually store tuples, **in gigabytes**. When the limit is reached, INSERT or UPDATE requests begin failing with error :errcode:`ER_MEMORY_ISSUE`. While the server does not go beyond the defined limit to allocate tuples, there is additional memory used to store indexes and connection information. Depending on actual configuration and workload, Tarantool can consume up to 20% more than the limit set here." +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:95 +msgid "Default: 1.0" +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:102 +msgid "**Deprecated** in favor of :ref:`memtx_max_tuple_size `. The parameter was only renamed, while the type, values and semantics remained intact." +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:111 +msgid "**Deprecated** in favor of :ref:`memtx_min_tuple_size `. The parameter was only renamed, while the type, values and semantics remained intact." +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:120 +msgid "**Deprecated** in favor of :ref:`memtx_dir `. The parameter was only renamed, while the type, values and semantics remained intact." +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:128 +msgid "**Deprecated** in favor of :ref:`checkpoint_interval `. The parameter was only renamed, while the type, values and semantics remained intact." +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:137 +msgid "**Deprecated** in favor of :ref:`checkpoint_count `. The parameter was only renamed, while the type, values and semantics remained intact." +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:146 +msgid "**Deprecated** in favor of :ref:`wal_max_size `. The parameter does not allow to properly limit size of WAL logs." +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:154 +msgid "**Deprecated** in Tarantool v2.11 in favor of :ref:`election_fencing_mode `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:157 +msgid "The parameter does not allow using the ``strict`` fencing mode. Setting to ``true`` is equivalent to setting the ``soft`` :ref:`election_fencing_mode `. Setting to ``false`` is equivalent to setting the ``off`` :ref:`election_fencing_mode `." +msgstr "" + +#: ../../doc/reference/configuration/cfg_deprecated.rst:165 +msgid "Environment variable: TT_ELECTION_FENCING_ENABLED" +msgstr "" diff --git a/locale/en/reference/index.pot b/locale/en/reference/index.pot new file mode 100644 index 0000000000..0e601ea6bd --- /dev/null +++ b/locale/en/reference/index.pot @@ -0,0 +1,21 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/index.rst:8 +msgid "Reference" +msgstr "" diff --git a/locale/en/reference/lua_tips.pot b/locale/en/reference/lua_tips.pot new file mode 100644 index 0000000000..4616ebd04d --- /dev/null +++ b/locale/en/reference/lua_tips.pot @@ -0,0 +1,136 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/lua_tips.rst:5 +msgid "Tips on Lua syntax" +msgstr "" + +#: ../../doc/reference/lua_tips.rst:7 +msgid "The Lua syntax for :ref:`data-manipulation functions ` can vary. Here are examples of the variations with ``select()`` requests. The same rules exist for the other data-manipulation functions." +msgstr "" + +#: ../../doc/reference/lua_tips.rst:11 +msgid "Every one of the examples does the same thing: select a tuple set from a space named 'tester' where the primary-key field value equals 1. For these examples, we assume that the numeric id of 'tester' is 512, which happens to be the case in our sandbox example only." +msgstr "" + +#: ../../doc/reference/lua_tips.rst:20 +msgid "Object reference variations" +msgstr "" + +#: ../../doc/reference/lua_tips.rst:22 +msgid "First, there are three **object reference variations**:" +msgstr "" + +#: ../../doc/reference/lua_tips.rst:24 +msgid "-- #1 module . submodule . name\n" +"tarantool> box.space.tester:select{1}\n" +"-- #2 replace name with a literal in square brackets\n" +"tarantool> box.space['tester']:select{1}\n" +"-- #3 use a variable for the entire object reference\n" +"tarantool> s = box.space.tester\n" +"tarantool> s:select{1}" +msgstr "" + +#: ../../doc/reference/lua_tips.rst:34 +msgid "Examples in this manual usually have the \":samp:`box.space.{tester}:`\" form (#1). However, this is a matter of user preference and all the variations exist in the wild." +msgstr "" + +#: ../../doc/reference/lua_tips.rst:38 +msgid "Also, descriptions in this manual use the syntax \"``space_object:``\" for references to objects which are spaces, and \"``index_object:``\" for references to objects which are indexes (for example :samp:`box.space.{tester}.index.{primary}:`)." +msgstr "" + +#: ../../doc/reference/lua_tips.rst:47 +msgid "Parameter variations" +msgstr "" + +#: ../../doc/reference/lua_tips.rst:49 +msgid "Then, there are seven **parameter variations**:" +msgstr "" + +#: ../../doc/reference/lua_tips.rst:51 +msgid "-- #1\n" +"tarantool> box.space.tester:select{1}\n" +"-- #2\n" +"tarantool> box.space.tester:select({1})\n" +"-- #3\n" +"tarantool> box.space.tester:select(1)\n" +"-- #4\n" +"tarantool> box.space.tester.select(box.space.tester,1)\n" +"-- #5\n" +"tarantool> box.space.tester:select({1},{iterator='EQ'})\n" +"-- #6\n" +"tarantool> variable = 1\n" +"tarantool> box.space.tester:select{variable}\n" +"-- #7\n" +"tarantool> variable = {1}\n" +"tarantool> box.space.tester:select(variable)" +msgstr "" + +#: ../../doc/reference/lua_tips.rst:70 +msgid "Lua allows to omit parentheses ``()`` when invoking a function if its only argument is a Lua table, and we use it sometimes in our examples. This is why ``select{1}`` is equivalent to ``select({1})``. Literal values such as ``1`` (a scalar value) or ``{1}`` (a Lua table value) may be replaced by variable names, as in examples #6 and #7." +msgstr "" + +#: ../../doc/reference/lua_tips.rst:76 +msgid "Although there are special cases where braces can be omitted, they are preferable because they signal \"Lua table\". Examples and descriptions in this manual have the ``{1}`` form. However, this too is a matter of user preference and all the variations exist in the wild." +msgstr "" + +#: ../../doc/reference/lua_tips.rst:85 +msgid "Rules for object names" +msgstr "" + +#: ../../doc/reference/lua_tips.rst:87 +msgid "Database objects have loose **rules for names**: the maximum length is 65000 bytes (not characters), and almost any legal Unicode character is allowed, including spaces, ideograms and punctuation." +msgstr "" + +#: ../../doc/reference/lua_tips.rst:92 +msgid "In those cases, to prevent confusion with Lua operators and separators, object references should have the literal-in-square-brackets form (#2), or the variable form (#3). For example:" +msgstr "" + +#: ../../doc/reference/lua_tips.rst:96 +msgid "tarantool> box.space['1*A']:select{1}\n" +"tarantool> s = box.space['1*A !@$%^&*()_+12345678901234567890']\n" +"tarantool> s:select{1}" +msgstr "" + +#: ../../doc/reference/lua_tips.rst:102 +msgid "Disallowed:" +msgstr "" + +#: ../../doc/reference/lua_tips.rst:104 +msgid "characters which are unassigned code points," +msgstr "" + +#: ../../doc/reference/lua_tips.rst:105 +msgid "line and paragraph separators," +msgstr "" + +#: ../../doc/reference/lua_tips.rst:106 +msgid "control characters," +msgstr "" + +#: ../../doc/reference/lua_tips.rst:107 +msgid "the replacement character (U+FFFD)." +msgstr "" + +#: ../../doc/reference/lua_tips.rst:109 +msgid "Not recommended: characters which cannot be displayed." +msgstr "" + +#: ../../doc/reference/lua_tips.rst:111 +msgid "Names are \"case sensitive\", so 'A' and 'a' are not the same." +msgstr "" diff --git a/locale/en/reference/reference_lua/box.pot b/locale/en/reference/reference_lua/box.pot new file mode 100644 index 0000000000..19e9a460db --- /dev/null +++ b/locale/en/reference/reference_lua/box.pot @@ -0,0 +1,37 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box.rst:5 +msgid "Module box" +msgstr "" + +#: ../../doc/reference/reference_lua/box.rst:7 +msgid "As well as executing Lua chunks or defining your own functions, you can exploit Tarantool's storage functionality with the ``box`` module and its submodules." +msgstr "" + +#: ../../doc/reference/reference_lua/box.rst:10 +msgid "Every submodule contains one or more Lua functions. A few submodules contain members as well as functions. The functions allow data definition (create alter drop), data manipulation (insert delete update upsert select replace), and introspection (inspecting contents of spaces, accessing server configuration)." +msgstr "" + +#: ../../doc/reference/reference_lua/box.rst:15 +msgid "To catch errors that functions in ``box`` submodules may throw, use :ref:`pcall `." +msgstr "" + +#: ../../doc/reference/reference_lua/box.rst:17 +msgid "The contents of the ``box`` module can be inspected at runtime with ``box``, with no arguments. The ``box`` module contains:" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_backup.pot b/locale/en/reference/reference_lua/box_backup.pot new file mode 100644 index 0000000000..85ebdfa346 --- /dev/null +++ b/locale/en/reference/reference_lua/box_backup.pot @@ -0,0 +1,53 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_backup.rst:3 +msgid "Submodule box.backup" +msgstr "" + +#: ../../doc/reference/reference_lua/box_backup.rst:5 +msgid "The box.backup submodule contains two functions that are helpful for :ref:`backup ` in certain situations." +msgstr "" + +#: ../../doc/reference/reference_lua/box_backup.rst:8 +msgid "Below is a list of all ``box.backup`` functions." +msgstr "" + +#: ../../doc/reference/reference_lua/box_backup.rst:19 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_backup.rst:20 +msgid "Use" +msgstr "" + +#: ../../doc/reference/reference_lua/box_backup.rst:22 +msgid ":doc:`./box_backup/start`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_backup.rst:23 +msgid "Ask server to suspend activities before the removal of outdated backups" +msgstr "" + +#: ../../doc/reference/reference_lua/box_backup.rst:25 +msgid ":doc:`./box_backup/stop`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_backup.rst:26 +msgid "Inform server that normal operations may resume" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_backup/start.pot b/locale/en/reference/reference_lua/box_backup/start.pot new file mode 100644 index 0000000000..e278b73073 --- /dev/null +++ b/locale/en/reference/reference_lua/box_backup/start.pot @@ -0,0 +1,55 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_backup/start.rst:5 +msgid "box.backup.start()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_backup/start.rst:9 +msgid "Informs the server that activities related to the removal of outdated backups must be suspended." +msgstr "" + +#: ../../doc/reference/reference_lua/box_backup/start.rst:12 +msgid "To guarantee an opportunity to copy these files, Tarantool will not delete them. But there will be no read-only mode and checkpoints will continue by schedule as usual." +msgstr "" + +#: ../../doc/reference/reference_lua/box_backup/start.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_backup/start.rst:16 +msgid "optional argument starting with Tarantool 1.10.1 that indicates the checkpoint to use relative to the latest checkpoint. For example ``n = 0`` means “backup will be based on the latest checkpoint”, ``n = 1`` means \"backup will be based on the first checkpoint before the latest checkpoint (counting backwards)\", and so on. The default value for n is zero." +msgstr "" + +#: ../../doc/reference/reference_lua/box_backup/start.rst:23 +msgid "**Return:** a table with the names of snapshot and vinyl files that should be copied" +msgstr "" + +#: ../../doc/reference/reference_lua/box_backup/start.rst:26 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_backup/start.rst:28 +msgid "tarantool> box.backup.start()\n" +"---\n" +"- - ./00000000000000000015.snap\n" +" - ./00000000000000000000.vylog\n" +" - ./513/0/00000000000000000002.index\n" +" - ./513/0/00000000000000000002.run\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_backup/stop.pot b/locale/en/reference/reference_lua/box_backup/stop.pot new file mode 100644 index 0000000000..6d89d41619 --- /dev/null +++ b/locale/en/reference/reference_lua/box_backup/stop.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_backup/stop.rst:5 +msgid "box.backup.stop()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_backup/stop.rst:9 +msgid "Informs the server that normal operations may resume." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_cfg.pot b/locale/en/reference/reference_lua/box_cfg.pot new file mode 100644 index 0000000000..f30b3742a4 --- /dev/null +++ b/locale/en/reference/reference_lua/box_cfg.pot @@ -0,0 +1,130 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_cfg.rst:5 +msgid "Submodule box.cfg" +msgstr "" + +#: ../../doc/reference/reference_lua/box_cfg.rst:9 +msgid "The ``box.cfg`` submodule is used for specifying :ref:`server configuration parameters `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_cfg.rst:12 +msgid "To view the current configuration, say ``box.cfg`` without braces:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_cfg.rst:14 +msgid "tarantool> box.cfg\n" +"---\n" +"- checkpoint_count: 2\n" +" too_long_threshold: 0.5\n" +" slab_alloc_factor: 1.05\n" +" memtx_max_tuple_size: 1048576\n" +" background: false\n" +" <...>\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_cfg.rst:26 +msgid "To set particular parameters, use the following syntax: ``box.cfg{key = value [, key = value ...]}`` (further referred to as ``box.cfg{...}`` for short). For example:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_cfg.rst:29 +msgid "tarantool> box.cfg{listen = 3301}" +msgstr "" + +#: ../../doc/reference/reference_lua/box_cfg.rst:33 +msgid "Parameters that are not specified in the ``box.cfg{...}`` call explicitly will be set to the :ref:`default values`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_cfg.rst:36 +msgid "If you say ``box.cfg{}`` with no parameters, Tarantool applies the following default settings to all the parameters:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_cfg.rst:41 +msgid "tarantool> box.cfg{}\n" +"tarantool> box.cfg -- sorted in the alphabetic order\n" +"---\n" +"- background = false\n" +" checkpoint_count = 2\n" +" checkpoint_interval = 3600\n" +" checkpoint_wal_threshold = 1000000000000000000\n" +" coredump = false\n" +" custom_proc_title = nil\n" +" feedback_enabled = true\n" +" feedback_host = 'https://feedback.tarantool.io'\n" +" feedback_interval = 3600\n" +" force_recovery = false\n" +" hot_standby = false\n" +" instance_uuid = nil -- generated automatically\n" +" io_collect_interval = nil\n" +" iproto_threads = 1\n" +" listen = nil\n" +" log = nil\n" +" log_format = plain\n" +" log_level = 5\n" +" log_nonblock = true\n" +" memtx_dir = '.'\n" +" memtx_max_tuple_size = 1024 * 1024\n" +" memtx_memory = 256 * 1024 *1024\n" +" memtx_min_tuple_size = 16\n" +" net_msg_max = 768\n" +" pid_file = nil\n" +" readahead = 16320\n" +" read_only = false\n" +" replicaset_uuid = nil -- generated automatically\n" +" replication = nil\n" +" replication_anon = false\n" +" replication_connect_timeout = 30\n" +" replication_skip_conflict = false\n" +" replication_sync_lag = 10\n" +" replication_sync_timeout = 300\n" +" replication_timeout = 1\n" +" slab_alloc_factor = 1.05\n" +" snap_io_rate_limit = nil\n" +" sql_cache_size = 5242880\n" +" strip_core = true\n" +" too_long_threshold = 0.5\n" +" username = nil\n" +" vinyl_bloom_fpr = 0.05\n" +" vinyl_cache = 128 * 1024 * 1024\n" +" vinyl_dir = '.'\n" +" vinyl_max_tuple_size = 1024 * 1024* 1024 * 1024\n" +" vinyl_memory = 128 * 1024 * 1024\n" +" vinyl_page_size = 8 * 1024\n" +" vinyl_range_size = nil\n" +" vinyl_read_threads = 1\n" +" vinyl_run_count_per_level = 2\n" +" vinyl_run_size_ratio = 3.5\n" +" vinyl_timeout = 60\n" +" vinyl_write_threads = 4\n" +" wal_dir = '.'\n" +" wal_dir_rescan_delay = 2\n" +" wal_max_size = 256 * 1024 * 1024\n" +" wal_mode = 'write'\n" +" worker_pool_threads = 4\n" +" work_dir = nil" +msgstr "" + +#: ../../doc/reference/reference_lua/box_cfg.rst:106 +msgid "The first call to ``box.cfg{...}`` (with or without parameters) initiates Tarantool's database module :ref:`box `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_cfg.rst:109 +msgid "``box.cfg{...}`` is also the command that reloads :ref:`persistent data files ` into RAM upon restart once we have data." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_ctl.pot b/locale/en/reference/reference_lua/box_ctl.pot new file mode 100644 index 0000000000..d9fed7d81d --- /dev/null +++ b/locale/en/reference/reference_lua/box_ctl.pot @@ -0,0 +1,129 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-11 13:03+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_ctl.rst:5 +msgid "Submodule box.ctl" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:7 +msgid "The ``wait_ro`` (wait until read-only) and ``wait_rw`` (wait until read-write) functions are useful during server initialization. To see whether a function is already in read-only or read-write mode, check :ref:`box.info.ro `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:11 +msgid "A particular use is for :doc:`box.once() `. For example, when a replica is initializing, it may call a ``box.once()`` function while the server is still in read-only mode, and fail to make changes that are necessary only once before the replica is fully initialized. This could cause conflicts between a master and a replica if the master is in read-write mode and the replica is in read-only mode. Waiting until \"read only mode = false\" solves this problem." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:21 +msgid "Below is a list of all ``box.ctl`` functions." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:32 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:33 +msgid "Use" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:35 +msgid ":doc:`./box_ctl/wait_ro`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:36 +msgid "Wait until ``box.info.ro`` is true" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:38 +msgid ":doc:`./box_ctl/wait_rw`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:39 +msgid "Wait until ``box.info.ro`` is false" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:41 +msgid ":doc:`./box_ctl/on_schema_init`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:42 +msgid "Create a \"schema_init trigger\"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:44 +msgid ":doc:`./box_ctl/on_shutdown`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:45 +msgid "Create a \"shutdown trigger\"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:47 +msgid ":doc:`./box_ctl/on_recovery_state`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:48 +msgid "Create a trigger executed on different stages of a node recovery or initial configuration" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:50 +msgid ":doc:`./box_ctl/on_election`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:51 +msgid "Create a :ref:`trigger ` executed every time the current state of a replica set node in regard to :ref:`leader election ` changes" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:53 +msgid ":doc:`./box_ctl/set_on_shutdown_timeout`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:54 +msgid "Set a timeout in seconds for the ``on_shutdown`` trigger" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:56 +msgid ":doc:`./box_ctl/is_recovery_finished`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:57 +msgid "Check if recovery has finished" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:59 +msgid ":doc:`./box_ctl/promote`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:60 +msgid "Wait, then choose replication leader" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:62 +msgid ":doc:`./box_ctl/demote`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:63 +msgid "Revoke the leader role from the instance" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:65 +msgid ":doc:`./box_ctl/make_bootstrap_leader`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl.rst:66 +msgid "Make the instance a bootstrap leader of a replica set" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_ctl/demote.pot b/locale/en/reference/reference_lua/box_ctl/demote.pot new file mode 100644 index 0000000000..155482cff8 --- /dev/null +++ b/locale/en/reference/reference_lua/box_ctl/demote.pot @@ -0,0 +1,57 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_ctl/demote.rst:4 +msgid "box.ctl.demote()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/demote.rst:8 +msgid "Since version :doc:`2.10.0 `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/demote.rst:10 +msgid "Revoke the leader role from the instance." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/demote.rst:12 +msgid "On :ref:`synchronous transaction queue owner `, the function works in the following way:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/demote.rst:14 +msgid "If :ref:`box.cfg.election_mode ` is ``off``, the function writes a ``DEMOTE`` request to WAL. The ``DEMOTE`` request clears the ownership of the synchronous transaction queue, while the ``PROMOTE`` request assigns it to a new instance." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/demote.rst:19 +msgid "If :ref:`box.cfg.election_mode ` is enabled in any mode, then the function makes the instance start a new term and give up the leader role." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/demote.rst:22 +msgid "On instances that are not queue owners, the function does nothing and returns immediately." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/demote.rst:24 +msgid "Parameters: none" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/demote.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/demote.rst:26 +msgid "nil" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_ctl/is_recovery_finished.pot b/locale/en/reference/reference_lua/box_ctl/is_recovery_finished.pot new file mode 100644 index 0000000000..9f52e4d68a --- /dev/null +++ b/locale/en/reference/reference_lua/box_ctl/is_recovery_finished.pot @@ -0,0 +1,45 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_ctl/is_recovery_finished.rst:5 +msgid "box.ctl.is_recovery_finished()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/is_recovery_finished.rst:11 +msgid "Since version :doc:`2.5.3 `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/is_recovery_finished.rst:13 +msgid "Check whether the :ref:`recovery process ` has finished. Until it has finished, space changes such as ``insert`` or ``update`` are not possible." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/is_recovery_finished.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/is_recovery_finished.rst:16 +msgid "``true`` if recovery has finished, otherwise ``false``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/is_recovery_finished.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/is_recovery_finished.rst:17 +msgid "boolean" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_ctl/make_bootstrap_leader.pot b/locale/en/reference/reference_lua/box_ctl/make_bootstrap_leader.pot new file mode 100644 index 0000000000..2aeddea890 --- /dev/null +++ b/locale/en/reference/reference_lua/box_ctl/make_bootstrap_leader.pot @@ -0,0 +1,37 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-11 13:03+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_ctl/make_bootstrap_leader.rst:4 +msgid "box.ctl.make_bootstrap_leader()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/make_bootstrap_leader.rst:8 +msgid "**Since:** :doc:`3.0.0 `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/make_bootstrap_leader.rst:10 +msgid "Make the instance a bootstrap leader of a replica set." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/make_bootstrap_leader.rst:12 +msgid "To be able to make the instance a bootstrap leader manually, the :ref:`replication.bootstrap_strategy ` configuration option should be set to ``supervised``. In this case, the instances do not choose a bootstrap leader automatically but wait for it to be appointed manually. Configuration fails if no bootstrap leader is appointed during a :ref:`replication.connect_timeout `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/make_bootstrap_leader.rst:18 +msgid "When a new instance joins a replica set configured with the ``supervised`` bootstrap strategy, this instance doesn't choose the bootstrap leader automatically but joins to the instance on which ``box.ctl.make_bootstrap_leader()`` was executed last time." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_ctl/on_election.pot b/locale/en/reference/reference_lua/box_ctl/on_election.pot new file mode 100644 index 0000000000..e9ba17bac3 --- /dev/null +++ b/locale/en/reference/reference_lua/box_ctl/on_election.pot @@ -0,0 +1,49 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_ctl/on_election.rst:5 +msgid "box.ctl.on_election()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_election.rst:11 +msgid "**Since:** :doc:`2.10.0 `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_election.rst:13 +msgid "Create a :ref:`trigger ` executed every time the current state of a replica set node in regard to :ref:`leader election ` changes. The current state is available in the :ref:`box.info.election ` table." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_election.rst:17 +msgid "The trigger doesn't accept any parameters. You can see the changes in ``box.info.election`` and :ref:`box.info.synchro `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_election.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_election.rst:21 +msgid "a trigger function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_election.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_election.rst:23 +msgid "``nil`` or a function pointer" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_ctl/on_recovery_state.pot b/locale/en/reference/reference_lua/box_ctl/on_recovery_state.pot new file mode 100644 index 0000000000..6c7747a1fd --- /dev/null +++ b/locale/en/reference/reference_lua/box_ctl/on_recovery_state.pot @@ -0,0 +1,90 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_ctl/on_recovery_state.rst:5 +msgid "box.ctl.on_recovery_state()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_recovery_state.rst:11 +msgid "**Since:** :doc:`2.11.0 `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_recovery_state.rst:13 +msgid "Create a :ref:`trigger ` executed on different stages of a node :ref:`recovery ` or initial configuration. Note that you need to set the ``box.ctl.on_recovery_state`` trigger before the initial :ref:`box.cfg ` call." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_recovery_state.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_recovery_state.rst:16 +msgid "a trigger function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_recovery_state.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_recovery_state.rst:18 +msgid "``nil`` or a function pointer" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_recovery_state.rst:20 +msgid "A registered trigger function is run on each of the supported recovery state and receives the state name as a parameter:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_recovery_state.rst:23 +msgid "``snapshot_recovered``: the node has recovered the snapshot files." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_recovery_state.rst:24 +msgid "``wal_recovered``: the node has recovered the WAL files." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_recovery_state.rst:25 +msgid "``indexes_built``: the node has built secondary indexes for memtx spaces. This stage might come before any actual data is recovered. This means that the indexes are available right after the first tuple is recovered." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_recovery_state.rst:28 +msgid "``synced``: the node has synced with enough remote peers. This means that the node changes the state from :ref:`orphan ` to ``running``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_recovery_state.rst:31 +msgid "All these states are passed during the initial ``box.cfg`` call when recovering from the snapshot and WAL files. Note that the ``synced`` state might be reached after the initial ``box.cfg`` call finishes. For example, if :ref:`replication_sync_timeout ` is set to 0, the node finishes ``box.cfg`` without reaching ``synced`` and stays ``orphan``. Once the node is synced with enough remote peers, the ``synced`` state is reached." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_recovery_state.rst:40 +msgid "When bootstrapping a fresh cluster with no data, all the instances in this cluster execute triggers on the same stages for consistency. For example, ``snapshot_recovered`` and ``wal_recovered`` run when the node finishes a cluster's bootstrap or finishes joining to an existing cluster." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_recovery_state.rst:46 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_recovery_state.rst:48 +msgid "The example below shows how to :ref:`log ` a specified message when each state is reached." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_recovery_state.rst:50 +msgid "local log = require('log')\n" +"local log_recovery_state = function(state)\n" +" log.info(state .. ' state reached')\n" +"end\n" +"box.ctl.on_recovery_state(log_recovery_state)\n" +"" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_ctl/on_schema_init.pot b/locale/en/reference/reference_lua/box_ctl/on_schema_init.pot new file mode 100644 index 0000000000..5fb8990003 --- /dev/null +++ b/locale/en/reference/reference_lua/box_ctl/on_schema_init.pot @@ -0,0 +1,79 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_ctl/on_schema_init.rst:5 +msgid "box.ctl.on_schema_init()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_schema_init.rst:11 +msgid "Create a \"schema_init :ref:`trigger `\". The ``trigger-function`` will be executed when :ref:`box.cfg{} ` happens for the first time. That is, the ``schema_init`` trigger is called before the server's configuration and recovery begins, and therefore ``box.ctl.on_schema_init`` must be called before ``box.cfg`` is called." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_schema_init.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_schema_init.rst:18 +msgid "function which will become the trigger function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_schema_init.rst:20 +msgid "existing trigger function which will be replaced by trigger-function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_schema_init.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_schema_init.rst:23 +msgid "nil or function pointer" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_schema_init.rst:25 +msgid "If the parameters are (nil, old-trigger-function), then the old trigger is deleted." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_schema_init.rst:28 +msgid "A common use is: make a ``schema_init`` trigger function which creates a ``before_replace`` trigger function on a system space. Thus, since system spaces are created when the server starts, the ``before_replace`` triggers will be activated for each tuple in each system space. For example, such a trigger could change the storage engine of a given space, or make a given space :ref:`replica-local ` while a replica is being bootstrapped. Making such a change after ``box.cfg`` is not reliable because other connections might use the database before the change is made." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_schema_init.rst:38 +msgid "Details about trigger characteristics are in the :ref:`triggers ` section." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_schema_init.rst:40 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_schema_init.rst:42 +msgid "Suppose that, before the server is fully up and ready for connections, you want to make sure that the engine of space ``space_name`` is vinyl. So you want to make a trigger that will be activated when a tuple is inserted in the ``_space`` system space. In this case you could end up with a master that has space-name with ``engine='memtx'`` and a replica that has space_name with ``engine='vinyl'``, with the same contents." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_schema_init.rst:51 +msgid "function function_for_before_replace(old, new)\n" +" if old == nil and new ~= nil and new[3] == 'space_name' and new[4] ~= 'vinyl' then\n" +" return new:update{{'=', 4, 'vinyl'}}\n" +" end\n" +"end\n" +"\n" +"box.ctl.on_schema_init(function()\n" +" box.space._space:before_replace(function_for_before_replace)\n" +"end)\n" +"\n" +"box.cfg{replication='master_uri', ...}" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_ctl/on_shutdown.pot b/locale/en/reference/reference_lua/box_ctl/on_shutdown.pot new file mode 100644 index 0000000000..27c9626e71 --- /dev/null +++ b/locale/en/reference/reference_lua/box_ctl/on_shutdown.pot @@ -0,0 +1,53 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_ctl/on_shutdown.rst:5 +msgid "box.ctl.on_shutdown()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_shutdown.rst:11 +msgid "Create a \"shutdown :ref:`trigger `\". The ``trigger-function`` will be executed whenever :ref:`os.exit() ` happens, or when the server is shut down after receiving a SIGTERM or SIGINT or SIGHUP signal (but not after SIGSEGV or SIGABORT or any signal that causes immediate program termination)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_shutdown.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_shutdown.rst:18 +msgid "function which will become the trigger function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_shutdown.rst:20 +msgid "existing trigger function which will be replaced by trigger-function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_shutdown.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_shutdown.rst:23 +msgid "nil or function pointer" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_shutdown.rst:25 +msgid "If the parameters are (nil, old-trigger-function), then the old trigger is deleted." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/on_shutdown.rst:28 +msgid "If you want to set a timeout for this trigger, use the :ref:`set_on_shutdown_timeout ` function." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_ctl/promote.pot b/locale/en/reference/reference_lua/box_ctl/promote.pot new file mode 100644 index 0000000000..7057283197 --- /dev/null +++ b/locale/en/reference/reference_lua/box_ctl/promote.pot @@ -0,0 +1,49 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-07 07:21+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_ctl/promote.rst:4 +msgid "box.ctl.promote()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/promote.rst:8 +msgid "Since version :doc:`2.6.2 `. Renamed in release :doc:`2.6.3 `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/promote.rst:11 +msgid "Wait, then choose new replication leader." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/promote.rst:13 +msgid "For :ref:`synchronous transactions ` it is possible that a new leader will be chosen but the transactions of the old leader have not been completed. Therefore to finalize the transaction, the function ``box.ctl.promote()`` should be called, as mentioned in the notes for :ref:`leader election `. The old name for this function is ``box.ctl.clear_synchro_queue()``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/promote.rst:21 +msgid "The :ref:`election state ` should change to ``leader``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/promote.rst:23 +msgid "Parameters: none" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/promote.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/promote.rst:25 +msgid "nil or function pointer" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_ctl/set_on_shutdown_timeout.pot b/locale/en/reference/reference_lua/box_ctl/set_on_shutdown_timeout.pot new file mode 100644 index 0000000000..b7afef1af4 --- /dev/null +++ b/locale/en/reference/reference_lua/box_ctl/set_on_shutdown_timeout.pot @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_ctl/set_on_shutdown_timeout.rst:5 +msgid "box.ctl.set_on_shutdown_timeout()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/set_on_shutdown_timeout.rst:11 +msgid "Set a timeout for the :ref:`on_shutdown ` trigger. If the timeout has expired, the server stops immediately regardless of whether any ``on_shutdown`` triggers are left unexecuted." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/set_on_shutdown_timeout.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/set_on_shutdown_timeout.rst:15 +msgid "time to wait for the trigger to be completed. The default value is 3 seconds." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/set_on_shutdown_timeout.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/set_on_shutdown_timeout.rst:17 +msgid "nil" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_ctl/wait_ro.pot b/locale/en/reference/reference_lua/box_ctl/wait_ro.pot new file mode 100644 index 0000000000..72f1b93d2e --- /dev/null +++ b/locale/en/reference/reference_lua/box_ctl/wait_ro.pot @@ -0,0 +1,57 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_ctl/wait_ro.rst:5 +msgid "box.ctl.wait_ro()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/wait_ro.rst:11 +msgid "Wait until ``box.info.ro`` is true." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/wait_ro.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/wait_ro.rst:13 +msgid "maximum number of seconds to wait" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/wait_ro.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/wait_ro.rst:14 +msgid "nil, or error may be thrown due to timeout or fiber cancellation" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/wait_ro.rst:16 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/wait_ro.rst:18 +msgid "tarantool> box.info().ro\n" +"---\n" +"- false\n" +"...\n" +"\n" +"tarantool> n = box.ctl.wait_ro(0.1)\n" +"---\n" +"- error: timed out\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_ctl/wait_rw.pot b/locale/en/reference/reference_lua/box_ctl/wait_rw.pot new file mode 100644 index 0000000000..876b4e2e27 --- /dev/null +++ b/locale/en/reference/reference_lua/box_ctl/wait_rw.pot @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_ctl/wait_rw.rst:5 +msgid "box.ctl.wait_rw()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/wait_rw.rst:11 +msgid "Wait until ``box.info.ro`` is false." +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/wait_rw.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/wait_rw.rst:13 +msgid "maximum number of seconds to wait" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/wait_rw.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/wait_rw.rst:14 +msgid "nil, or error may be thrown due to timeout or fiber cancellation" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/wait_rw.rst:17 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_ctl/wait_rw.rst:19 +msgid "tarantool> box.ctl.wait_rw(0.1)\n" +"---\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_error.pot b/locale/en/reference/reference_lua/box_error.pot new file mode 100644 index 0000000000..ea35180d04 --- /dev/null +++ b/locale/en/reference/reference_lua/box_error.pot @@ -0,0 +1,466 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_error.rst:4 +msgid "Submodule box.error" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:6 +msgid "The ``box.error`` submodule can be used to work with errors in your application. For example, you can get the information about the last error raised by Tarantool or raise custom errors manually." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:10 +msgid "The difference between raising an error using ``box.error`` and a Lua's built-in `error `_ function is that when the error reaches the client, its error code is preserved. In contrast, a Lua error would always be presented to the client as :errcode:`ER_PROC_LUA`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:18 +msgid "To learn how to handle errors in your application, see the :ref:`Handling errors ` section." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:24 +msgid "Creating an error" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:26 +msgid "You can create an error object using the :ref:`box.error.new() ` function. The created object can be passed to :ref:`box.error() ` to raise the error. You can also raise the error using :ref:`error_object:raise() `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:30 +msgid "The example below shows how to create and raise the error with the specified code and reason." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:32 +msgid "local custom_error = box.error.new({ code = 500,\n" +" reason = 'Internal server error' })\n" +"\n" +"box.error(custom_error)\n" +"--[[\n" +"---\n" +"- error: Internal server error\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:38 +msgid "``box.error.new()`` provides different overloads for creating an error object with different parameters. These overloads are similar to the ``box.error()`` overloads described in the :ref:`next section `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:45 +msgid "Raising an error" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:47 +msgid "To raise an error, call the :ref:`box.error() ` function. This function can accept the specified error parameters or an error object :ref:`created using box.error.new() `. In both cases, you can use ``box.error()`` to raise the following error types:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:51 +msgid "A custom error with the specified reason, code, and type." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:52 +msgid "A predefined Tarantool error." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:58 +msgid "Custom error" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:60 +msgid "The following ``box.error()`` overloads are available for raising a custom error:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:62 +msgid ":ref:`box.error({ reason = string[, code = number, type = string] }) ` accepts a Lua table containing the error reason, code, and type." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:63 +msgid ":ref:`box.error(type, reason[, args]) ` accepts the error type, its reason, and optional arguments passed to a reason's string." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:67 +msgid "The same overloads are available for :ref:`box.error.new() `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:73 +msgid "box.error({ reason = string[, ...] })" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:75 +msgid "In the example below, ``box.error()`` accepts a Lua table with the specified error code and reason:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:77 +msgid "box.error { code = 500,\n" +" reason = 'Custom server error' }\n" +"--[[\n" +"---\n" +"- error: Custom server error\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:83 +msgid "The next example shows how to specify a custom error type:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:85 +msgid "box.error { code = 500,\n" +" reason = 'Internal server error',\n" +" type = 'CustomInternalError' }\n" +"--[[\n" +"---\n" +"- error: Internal server error\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:91 +msgid "When a custom type is specified, it is returned in the :ref:`error_object.type ` attribute. When it is not specified, ``error_object.type`` returns one of the built-in errors, such as ``ClientError`` or ``OutOfMemory``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:98 +msgid "box.error(type, reason[, ...])" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:100 +msgid "This example shows how to raise an error with the type and reason specified in the ``box.error()`` arguments:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:102 +msgid "box.error('CustomConnectionError', 'cannot connect to the given port')\n" +"--[[\n" +"---\n" +"- error: cannot connect to the given port\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:108 +msgid "You can also use a format string to compose an error reason:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:110 +msgid "box.error('CustomConnectionError', '%s cannot connect to the port %u', 'client', 8080)\n" +"--[[\n" +"---\n" +"- error: client cannot connect to the port 8080\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:121 +msgid "Tarantool error" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:123 +msgid "The :ref:`box.error(code[, ...]) ` overload raises a predefined :ref:`Tarantool error ` specified by its identifier. The error code defines the error message format and the number of required arguments. In the example below, no arguments are passed for the ``box.error.READONLY`` error code:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:128 +msgid "box.error(box.error.READONLY)\n" +"--[[\n" +"---\n" +"- error: Can't modify data on a read-only instance\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:134 +msgid "For the ``box.error.NO_SUCH_USER`` error code, you need to pass one argument:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:136 +msgid "box.error(box.error.NO_SUCH_USER, 'John')\n" +"--[[\n" +"---\n" +"- error: User 'John' is not found\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:142 +msgid "``box.error.CREATE_SPACE`` requires two arguments:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:144 +msgid "box.error(box.error.CREATE_SPACE, 'my_space', 'the space already exists')\n" +"--[[\n" +"---\n" +"- error: 'Failed to create space ''my_space'': the space already exists'\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:154 +msgid "Getting the last error" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:156 +msgid "To get the last raised error, call :ref:`box.error.last() `:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:158 +msgid "box.error.last()\n" +"--[[\n" +"---\n" +"- error: Internal server error\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:167 +msgid "Obtaining error details" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:169 +msgid "To get error details, call the :ref:`error_object.unpack() `. Error details may include an error code, type, message, and trace." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:172 +msgid "box.error.last():unpack()\n" +"--[[\n" +"---\n" +"- code: 500\n" +" base_type: CustomError\n" +" type: CustomInternalError\n" +" custom_type: CustomInternalError\n" +" message: Internal server error\n" +" trace:\n" +" - file: '[string \"custom_error = box.error.new({ code = 500,...\"]'\n" +" line: 1\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:181 +msgid "Setting the last error" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:183 +msgid "You can set the last error explicitly by calling :ref:`box.error.set() `:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:185 +msgid "-- Create two errors --\n" +"local error1 = box.error.new({ code = 500, reason = 'Custom error 1' })\n" +"local error2 = box.error.new({ code = 505, reason = 'Custom error 2' })\n" +"\n" +"-- Raise the first error --\n" +"box.error(error1)\n" +"--[[\n" +"---\n" +"- error: Custom error 1\n" +"...\n" +"--]]\n" +"\n" +"-- Get the last error --\n" +"box.error.last()\n" +"--[[\n" +"---\n" +"- Custom error 1\n" +"...\n" +"--]]\n" +"\n" +"-- Set the second error as the last error --\n" +"box.error.set(error2)\n" +"--[[\n" +"---\n" +"...\n" +"--]]\n" +"\n" +"-- Get the last error --\n" +"box.error.last()\n" +"--[[\n" +"---\n" +"- Custom error 2\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:194 +msgid "Error lists" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:196 +msgid ":ref:`error_object ` provides the API for organizing errors into lists. To set and get the previous error, use the :ref:`error_object:set_prev() ` method and :ref:`error_object.prev ` attribute." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:199 +msgid "local base_server_error = box.error.new({ code = 500,\n" +" reason = 'Base server error',\n" +" type = 'BaseServerError' })\n" +"local storage_server_error = box.error.new({ code = 507,\n" +" reason = 'Not enough storage',\n" +" type = 'StorageServerError' })\n" +"\n" +"base_server_error:set_prev(storage_server_error)\n" +"--[[\n" +"---\n" +"...\n" +"--]]\n" +"\n" +"box.error(base_server_error)\n" +"--[[\n" +"---\n" +"- error: Base server error\n" +"...\n" +"--]]\n" +"\n" +"box.error.last().prev:unpack()\n" +"--[[\n" +"---\n" +"- code: 507\n" +" base_type: CustomError\n" +" type: StorageServerError\n" +" custom_type: StorageServerError\n" +" message: Not enough storage\n" +" trace:\n" +" - file: '[string \"storage_server_error = box.error.new({ code =...\"]'\n" +" line: 1\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:205 +msgid "Cycles are not allowed for error lists:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:207 +msgid "storage_server_error:set_prev(base_server_error)\n" +"--[[\n" +"---\n" +"- error: 'builtin/error.lua:120: Cycles are not allowed'\n" +"...\n" +"--]]" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:216 +msgid "Setting the previous error does not erase its own previous members:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:218 +msgid "-- e1 -> e2 -> e3 -> e4\n" +"e1:set_prev(e2)\n" +"e2:set_prev(e3)\n" +"e3:set_prev(e4)\n" +"e2:set_prev(e5)\n" +"-- Now there are two lists: e1 -> e2 -> e5 and e3 -> e4" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:227 +msgid "IPROTO also supports stacked diagnostics. See details in :ref:`MessagePack extensions -- The ERROR type `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:233 +msgid "Clearing errors" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:235 +msgid "To clear the errors, call :ref:`box.error.clear() `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:237 +msgid "box.error.clear()\n" +"--[[\n" +"---\n" +"...\n" +"--]]\n" +"box.error.last()\n" +"--[[\n" +"---\n" +"- null\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:248 +msgid "API Reference" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:250 +msgid "Below is a list of ``box.error`` functions and related objects." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:261 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:262 +msgid "Use" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:264 +msgid ":doc:`./box_error/error`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:265 +msgid "Raise the last error or the error defined by the specified parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:267 +msgid ":doc:`./box_error/last`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:268 +msgid "Get the last raised error" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:270 +msgid ":doc:`./box_error/clear`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:271 +msgid "Clear the errors" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:273 +msgid ":doc:`./box_error/new`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:274 +msgid "Create the error but do not raise it" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:276 +msgid ":doc:`./box_error/set`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:277 +msgid "Set the specified error as the last system error explicitly" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:279 +msgid ":doc:`./box_error/error_object`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error.rst:280 +msgid "An object that defines an error" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_error/clear.pot b/locale/en/reference/reference_lua/box_error/clear.pot new file mode 100644 index 0000000000..b5ba9e2521 --- /dev/null +++ b/locale/en/reference/reference_lua/box_error/clear.pot @@ -0,0 +1,44 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_error/clear.rst:5 +msgid "box.error.clear()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/clear.rst:9 +msgid "Clear the errors." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/clear.rst:11 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/clear.rst:13 +msgid "box.error.clear()\n" +"--[[\n" +"---\n" +"...\n" +"--]]\n" +"box.error.last()\n" +"--[[\n" +"---\n" +"- null\n" +"...\n" +"--]]\n" +"" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_error/error.pot b/locale/en/reference/reference_lua/box_error/error.pot new file mode 100644 index 0000000000..9b01209274 --- /dev/null +++ b/locale/en/reference/reference_lua/box_error/error.pot @@ -0,0 +1,200 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_error/error.rst:4 +msgid "box.error()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:10 +msgid "Raise the last error." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:12 +msgid "**See also:** :ref:`box.error.last() `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:18 +msgid "Raise the error defined by :ref:`error_object `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:0 +#: ../../doc/reference/reference_lua/box_error/error.rst:0 +#: ../../doc/reference/reference_lua/box_error/error.rst:0 +#: ../../doc/reference/reference_lua/box_error/error.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:20 +msgid "an error object" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:22 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:24 +msgid "local custom_error = box.error.new({ code = 500,\n" +" reason = 'Internal server error' })\n" +"\n" +"box.error(custom_error)\n" +"--[[\n" +"---\n" +"- error: Internal server error\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:34 +msgid "Raise the error defined by the specified parameters." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:36 +#: ../../doc/reference/reference_lua/box_error/error.rst:63 +msgid "an error description" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:37 +msgid "(optional) a numeric code for this error" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:38 +msgid "(optional) an error type" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:40 +msgid "**Example 1**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:42 +msgid "box.error { code = 500,\n" +" reason = 'Custom server error' }\n" +"--[[\n" +"---\n" +"- error: Custom server error\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:48 +msgid "**Example 2: custom type**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:50 +msgid "box.error { code = 500,\n" +" reason = 'Internal server error',\n" +" type = 'CustomInternalError' }\n" +"--[[\n" +"---\n" +"- error: Internal server error\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:60 +msgid "Raise the error defined by the specified type and description." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:62 +msgid "an error type" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:64 +#: ../../doc/reference/reference_lua/box_error/error.rst:91 +msgid "description arguments" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:66 +msgid "**Example 1: without arguments**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:68 +msgid "box.error('CustomConnectionError', 'cannot connect to the given port')\n" +"--[[\n" +"---\n" +"- error: cannot connect to the given port\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:74 +msgid "**Example 2: with arguments**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:76 +msgid "box.error('CustomConnectionError', '%s cannot connect to the port %u', 'client', 8080)\n" +"--[[\n" +"---\n" +"- error: client cannot connect to the port 8080\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:86 +msgid "Raise a predefined :ref:`Tarantool error ` specified by its identifier. You can see all Tarantool errors in the `errcode.h `_ file." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:90 +msgid "a pre-defined error identifier; Lua constants that correspond to those Tarantool errors are defined as members of ``box.error``, for example, ``box.error.NO_SUCH_USER == 45``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:93 +msgid "**Example 1: no arguments**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:95 +msgid "box.error(box.error.READONLY)\n" +"--[[\n" +"---\n" +"- error: Can't modify data on a read-only instance\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:101 +msgid "**Example 2: one argument**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:103 +msgid "box.error(box.error.NO_SUCH_USER, 'John')\n" +"--[[\n" +"---\n" +"- error: User 'John' is not found\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:109 +msgid "**Example 3: two arguments**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error.rst:111 +msgid "box.error(box.error.CREATE_SPACE, 'my_space', 'the space already exists')\n" +"--[[\n" +"---\n" +"- error: 'Failed to create space ''my_space'': the space already exists'\n" +"...\n" +"--]]\n" +"" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_error/error_object.pot b/locale/en/reference/reference_lua/box_error/error_object.pot new file mode 100644 index 0000000000..07f883cbe5 --- /dev/null +++ b/locale/en/reference/reference_lua/box_error/error_object.pot @@ -0,0 +1,214 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:5 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:61 +msgid "error_object" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:9 +msgid "An object that defines an error. ``error_object`` is returned by the following methods:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:12 +msgid ":ref:`box.error.new() `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:13 +msgid ":ref:`box.error.last() `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:19 +msgid "Get error details that may include an error code, type, message, and trace." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:21 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:23 +msgid "box.error.last():unpack()\n" +"--[[\n" +"---\n" +"- code: 500\n" +" base_type: CustomError\n" +" type: CustomInternalError\n" +" custom_type: CustomInternalError\n" +" message: Internal server error\n" +" trace:\n" +" - file: '[string \"custom_error = box.error.new({ code = 500,...\"]'\n" +" line: 1\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:31 +msgid "Depending on the error type, error details may include other attributes, such as :ref:`errno ` or :ref:`reason `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:37 +msgid "Raise the current error." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:39 +msgid "**See also:** :ref:`Raising an error `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:45 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:57 +msgid "**Since:** :doc:`2.4.1 `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:47 +msgid "Set the previous error for the current one." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:49 +msgid "an error object" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:51 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:63 +msgid "**See also:** :ref:`Error lists `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:59 +msgid "Get the previous error for the current one." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:0 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:0 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:0 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:0 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:0 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:0 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:0 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:0 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:0 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:69 +msgid "The error code. This attribute may return a :ref:`custom error ` code or a :ref:`Tarantool error ` code." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:72 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:107 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:153 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:173 +msgid "number" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:78 +msgid "The error type." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:80 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:90 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:131 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:142 +msgid "string" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:82 +msgid "**See also:** :ref:`Custom error `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:88 +msgid "The error message." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:96 +msgid "The error trace." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:98 +msgid "table" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:104 +msgid "If the error is a system error (for example, a socket or file IO failure), returns a C standard error number." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:113 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:137 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:148 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:159 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:168 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:179 +#: ../../doc/reference/reference_lua/box_error/error_object.rst:188 +msgid "**Since:** :doc:`2.10.0 `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:115 +msgid "Returns the :ref:`box.info.ro_reason ` value at the moment of throwing the ``box.error.READONLY`` error." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:117 +msgid "The following values may be returned:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:119 +msgid "``election`` if the instance has :ref:`box.cfg.election_mode ` set to a value other than ``off`` and this instance is not a leader. In this case, ``error_object`` may include the following attributes: ``state``, ``leader_id``, ``leader_uuid``, and ``term``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:121 +msgid "``synchro`` if the synchronous queue has an owner that is not the given instance. This error usually happens if :ref:`synchronous replication ` is used and another instance is called :ref:`box.ctl.promote() `. In this case, ``error_object`` may include the ``queue_owner_id``, ``queue_owner_uuid``, and ``term`` attributes." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:124 +msgid "``config`` if the :ref:`box.cfg.read_only ` is set to ``true``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:125 +msgid "``orphan`` if the instance is in the :ref:`orphan ` state." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:129 +msgid "If multiple reasons are true at the same time, then only one is returned in the following order of preference: ``election``, ``synchro``, ``config``, ``orphan``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:139 +msgid "For the ``box.error.READONLY`` error, returns the current state of a replica set node in regards to leader election (see :ref:`box.info.election.state `). This attribute presents if the :ref:`error reason ` is ``election``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:150 +msgid "For the ``box.error.READONLY`` error, returns a numeric identifier (:ref:`box.info.id `) of the replica set leader. This attribute may present if the :ref:`error reason ` is ``election``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:161 +msgid "For the ``box.error.READONLY`` error, returns a globally unique identifier (:ref:`box.info.uuid `) of the replica set leader. This attribute may present if the :ref:`error reason ` is ``election``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:170 +msgid "For the ``box.error.READONLY`` error, returns a numeric identifier (:ref:`box.info.id `) of the synchronous queue owner. This attribute may present if the :ref:`error reason ` is ``synchro``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:181 +msgid "For the ``box.error.READONLY`` error, returns a globally unique identifier (:ref:`box.info.uuid `) of the synchronous queue owner. This attribute may present if the :ref:`error reason ` is ``synchro``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/error_object.rst:190 +msgid "For the ``box.error.READONLY`` error, returns the current election term (see :ref:`box.info.election.term `). This attribute may present if the :ref:`error reason ` is ``election`` or ``synchro``." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_error/last.pot b/locale/en/reference/reference_lua/box_error/last.pot new file mode 100644 index 0000000000..bf4d59732e --- /dev/null +++ b/locale/en/reference/reference_lua/box_error/last.pot @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_error/last.rst:5 +msgid "box.error.last()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/last.rst:9 +msgid "Get the last raised error." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/last.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/last.rst:11 +msgid "an :ref:`error_object ` representing the last error" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/last.rst:13 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/last.rst:15 +msgid "box.error.last()\n" +"--[[\n" +"---\n" +"- error: Internal server error\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/last.rst:21 +msgid "**See also:** :ref:`error_object:unpack() `" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_error/new.pot b/locale/en/reference/reference_lua/box_error/new.pot new file mode 100644 index 0000000000..0530fb0afd --- /dev/null +++ b/locale/en/reference/reference_lua/box_error/new.pot @@ -0,0 +1,148 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_error/new.rst:5 +msgid "box.error.new()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:11 +msgid "Create an error object with the specified parameters." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:0 +#: ../../doc/reference/reference_lua/box_error/new.rst:0 +#: ../../doc/reference/reference_lua/box_error/new.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:13 +#: ../../doc/reference/reference_lua/box_error/new.rst:40 +msgid "an error description" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:14 +msgid "(optional) a numeric code for this error" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:15 +msgid "(optional) an error type" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:17 +msgid "**Example 1**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:19 +msgid "local custom_error = box.error.new({ code = 500,\n" +" reason = 'Internal server error' })\n" +"\n" +"box.error(custom_error)\n" +"--[[\n" +"---\n" +"- error: Internal server error\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:25 +msgid "**Example 2: custom type**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:27 +msgid "local custom_error = box.error.new({ code = 500,\n" +" reason = 'Internal server error',\n" +" type = 'CustomInternalError' })\n" +"\n" +"box.error(custom_error)\n" +"--[[\n" +"---\n" +"- error: Internal server error\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:37 +msgid "Create an error object with the specified type and description." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:39 +msgid "an error type" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:41 +#: ../../doc/reference/reference_lua/box_error/new.rst:60 +msgid "description arguments" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:43 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:45 +msgid "local custom_error = box.error.new('CustomInternalError', 'Internal server error')\n" +"\n" +"box.error(custom_error)\n" +"--[[\n" +"---\n" +"- error: Internal server error\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:55 +msgid "Create a predefined :ref:`Tarantool error ` specified by its identifier. You can see all Tarantool errors in the `errcode.h `_ file." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:59 +msgid "a pre-defined error identifier; Lua constants that correspond to those Tarantool errors are defined as members of ``box.error``, for example, ``box.error.NO_SUCH_USER == 45``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:62 +msgid "**Example 1: one argument**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:64 +msgid "local custom_error = box.error.new(box.error.NO_SUCH_USER, 'John')\n" +"\n" +"box.error(custom_error)\n" +"--[[\n" +"---\n" +"- error: User 'John' is not found\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:70 +msgid "**Example 2: two arguments**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/new.rst:72 +msgid "local custom_error = box.error.new(box.error.CREATE_SPACE, 'my_space', 'the space already exists')\n" +"\n" +"box.error(custom_error)\n" +"--[[\n" +"---\n" +"- error: 'Failed to create space ''my_space'': the space already exists'\n" +"...\n" +"--]]\n" +"" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_error/set.pot b/locale/en/reference/reference_lua/box_error/set.pot new file mode 100644 index 0000000000..2dacf43e66 --- /dev/null +++ b/locale/en/reference/reference_lua/box_error/set.pot @@ -0,0 +1,79 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_error/set.rst:5 +msgid "box.error.set()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/set.rst:9 +msgid "**Since:** :doc:`2.4.1 `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/set.rst:11 +msgid "Set the specified error as the last system error explicitly. This error is returned by :doc:`/reference/reference_lua/box_error/last`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/set.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/set.rst:14 +msgid "an error object" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/set.rst:16 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_error/set.rst:18 +msgid "-- Create two errors --\n" +"local error1 = box.error.new({ code = 500, reason = 'Custom error 1' })\n" +"local error2 = box.error.new({ code = 505, reason = 'Custom error 2' })\n" +"\n" +"-- Raise the first error --\n" +"box.error(error1)\n" +"--[[\n" +"---\n" +"- error: Custom error 1\n" +"...\n" +"--]]\n" +"\n" +"-- Get the last error --\n" +"box.error.last()\n" +"--[[\n" +"---\n" +"- Custom error 1\n" +"...\n" +"--]]\n" +"\n" +"-- Set the second error as the last error --\n" +"box.error.set(error2)\n" +"--[[\n" +"---\n" +"...\n" +"--]]\n" +"\n" +"-- Get the last error --\n" +"box.error.last()\n" +"--[[\n" +"---\n" +"- Custom error 2\n" +"...\n" +"--]]\n" +"" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_events.pot b/locale/en/reference/reference_lua/box_events.pot new file mode 100644 index 0000000000..34f617f15b --- /dev/null +++ b/locale/en/reference/reference_lua/box_events.pot @@ -0,0 +1,113 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_events.rst:4 +msgid "Event watchers" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:6 +msgid "Since :doc:`2.10.0 `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:8 +msgid "The ``box`` module contains some features related to event subscriptions, also known as :term:`watchers `. The subscriptions are used to inform the client about server-side :term:`events `. Each event subscription is defined by a certain key." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:13 +msgid "Event" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:16 +msgid "An event is a state change or a system update that triggers the action of other systems. To read more about built-in events in Tarantool, check the :doc:`system events ` section." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:19 +msgid "State" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:21 +msgid "A state is an internally stored key-value pair. The key is a string. The value is an arbitrary type that can be encoded as MsgPack. To update a state, use the ``box.broadcast()`` function." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:25 +msgid "Watcher" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:27 +msgid "A watcher is a :doc:`callback ` that is invoked when a state change occurs. To register a local watcher, use the ``box.watch()`` function. To create a remote watcher, use the ``watch()`` function from the ``net.box`` module. Note that it is possible to register more than one watcher for the same key." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:33 +msgid "How a watcher works" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:35 +msgid "First, you register a watcher. After that, the watcher callback is invoked for the first time. In this case, the callback is triggered whether or not the key has already been broadcast. All subsequent invocations are triggered with :doc:`box.broadcast() ` called on the remote host. If a watcher is subscribed for a key that has not been broadcast yet, the callback is triggered only once, after the registration of the watcher." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:43 +msgid "The watcher callback takes two arguments. The first argument is the name of the key for which it was registered. The second one contains current key data. The callback is always invoked in a new fiber. It means that it is allowed to yield in it. A watcher callback is never executed in parallel with itself. If the key is updated while the watcher callback is running, the callback will be invoked again with the new value as soon as it returns." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:51 +msgid "``box.watch`` and ``box.broadcast`` functions can be used before :doc:`box.cfg `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:53 +msgid "Below is a list of all functions and pages related to watchers or events." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:64 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:65 +msgid "Use" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:67 +msgid ":doc:`./box_events/watch`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:68 +msgid "Create a local watcher." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:70 +msgid ":ref:`conn:watch() `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:71 +msgid "Create a watcher for the remote host." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:73 +msgid ":doc:`./box_events/broadcast`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:74 +msgid "Update a state." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:76 +msgid ":ref:`Built-in events `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events.rst:77 +msgid "Predefined events in Tarantool" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_events/broadcast.pot b/locale/en/reference/reference_lua/box_events/broadcast.pot new file mode 100644 index 0000000000..934041c0c2 --- /dev/null +++ b/locale/en/reference/reference_lua/box_events/broadcast.pot @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_events/broadcast.rst:5 +msgid "box.broadcast()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/broadcast.rst:9 +msgid "Update the value of a particular key and notify all key watchers of the update." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/broadcast.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/broadcast.rst:11 +msgid "key name of the event to subscribe to" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/broadcast.rst:12 +msgid "any data that can be encoded in MsgPack" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/broadcast.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/broadcast.rst:14 +msgid "none" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/broadcast.rst:16 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/broadcast.rst:18 +msgid "The value can't be encoded as MsgPack." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/broadcast.rst:19 +msgid "The key refers to a ``box.`` system event" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/broadcast.rst:21 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/broadcast.rst:23 +msgid "-- Broadcast value 42 for the 'foo' key.\n" +"box.broadcast('foo', 42)" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_events/system_events.pot b/locale/en/reference/reference_lua/box_events/system_events.pot new file mode 100644 index 0000000000..8245acab3d --- /dev/null +++ b/locale/en/reference/reference_lua/box_events/system_events.pot @@ -0,0 +1,208 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:4 +msgid "System events" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:6 +msgid "Since :doc:`2.10.0 `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:8 +msgid "Predefined events have a special naming schema -- theirs names always start with the reserved ``box.`` prefix. It means that you cannot create new events with it." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:11 +msgid "The system processes the following events:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:13 +msgid "``box.id``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:14 +msgid "``box.status``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:15 +msgid "``box.election``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:16 +msgid "``box.schema``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:17 +msgid "``box.shutdown``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:19 +msgid "In response to each event, the server sends back certain ``IPROTO`` fields." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:21 +msgid "The events are available from the beginning as non-:ref:`MP_NIL `. If a watcher subscribes to a system event before it has been broadcast, it receives an empty table for the event value." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:25 +msgid "The event is generated when there is a change in any of the values listed in the event. For example, see the parameters in the ``box.id`` event below -- ``id``, ``instance_uuid``, and ``replicaset_uuid``. Suppose the ``ìd`` value (``box.info.id``) has changed. This triggers the ``box.info`` event, which states that the value of ``box.info.id`` has changed, while ``box.info.uuid`` and ``box.info.cluster.uuid`` remain the same." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:32 +msgid "box.id" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:34 +msgid "Contains :ref:`identification ` of the instance. Value changes are rare." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:37 +msgid "``id``: the numeric instance ID is unknown before the registration. For anonymous replicas, the value is ``0`` until they are officially registered." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:40 +msgid "``instance_uuid``: the UUID of the instance never changes after the first :doc:`box.cfg `. The value is unknown before the ``box.cfg`` call." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:44 +msgid "``replicaset_uuid``: the value is unknown until the instance joins a replicaset or boots a new one." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:46 +msgid "-- box.id value\n" +"{\n" +"MP_STR “id”: MP_UINT; box.info.id,\n" +"MP_STR “instance_uuid”: MP_UUID; box.info.uuid,\n" +"MP_STR “replicaset_uuid”: MP_UUID box.info.cluster.uuid,\n" +"}" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:56 +msgid "box.status" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:58 +msgid "Contains generic information about the instance status." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:60 +#: ../../doc/reference/reference_lua/box_events/system_events.rst:80 +msgid "``is_ro``: :ref:`indicates the read-only mode ` or the ``orphan`` status." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:61 +msgid "``is_ro_cfg``: indicates the :ref:`read_only ` mode for the instance." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:62 +msgid "``status``: shows the status of an instance." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:64 +msgid "{\n" +"MP_STR “is_ro”: MP_BOOL box.info.ro,\n" +"MP_STR “is_ro_cfg”: MP_BOOL box.cfg.read_only,\n" +"MP_STR “status”: MP_STR box.info.status,\n" +"}" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:73 +msgid "box.election" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:75 +msgid "Contains fields of :doc:`box.info.election ` that are necessary to find out the most recent writable leader." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:78 +msgid "``term``: shows the current election term." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:79 +msgid "``role``: indicates the election state of the node -- ``leader``, ``follower``, or ``candidate``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:81 +msgid "``leader``: shows the leader node ID in the current term." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:83 +msgid "{\n" +"MP_STR “term”: MP_UINT box.info.election.term,\n" +"MP_STR “role”: MP_STR box.info.election.state,\n" +"MP_STR “is_ro”: MP_BOOL box.info.ro,\n" +"MP_STR “leader”: MP_UINT box.info.election.leader,\n" +"}" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:93 +msgid "box.schema" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:95 +msgid "Contains schema-related data." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:97 +msgid "``version``: shows the schema version." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:99 +msgid "{\n" +"MP_STR “version”: MP_UINT schema_version,\n" +"}" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:108 +msgid "box.shutdown" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:110 +msgid "Contains a boolean value which indicates whether there is an active shutdown request." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:112 +msgid "The event is generated when the server receives a shutdown request (``os.exit()`` command or :ref:`SIGTERM ` signal)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:115 +msgid "The ``box.shutdown`` event is applied for the graceful shutdown protocol. It is a feature which is available since :doc:`2.10.0 `. This protocol is supposed to be used with connectors to signal a client about the upcoming server shutdown and close active connections without broken requests. For more information, refer to the :ref:`graceful shutdown protocol ` section." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:122 +msgid "Usage example" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:124 +msgid "local conn = net.box.connect(URI)\n" +"local log = require('log')\n" +"-- Subscribe to updates of key 'box.id'\n" +"local w = conn:watch('box.id', function(key, value)\n" +" assert(key == 'box.id')\n" +" log.info(\"The box.id value is '%s'\", value)\n" +"end)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:134 +msgid "If you want to unregister the watcher when it's no longer needed, use the following command:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/system_events.rst:136 +msgid "w:unregister()" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_events/watch.pot b/locale/en/reference/reference_lua/box_events/watch.pot new file mode 100644 index 0000000000..f0fb16ef80 --- /dev/null +++ b/locale/en/reference/reference_lua/box_events/watch.pot @@ -0,0 +1,77 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_events/watch.rst:5 +msgid "box.watch()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/watch.rst:9 +msgid "Subscribe to events broadcast by a local host." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/watch.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/watch.rst:11 +msgid "key name of the event to subscribe to" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/watch.rst:12 +msgid "callback to invoke when the key value is updated" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/watch.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/watch.rst:14 +msgid "a watcher handle. The handle consists of one method -- ``unregister()``, which unregisters the watcher." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/watch.rst:16 +msgid "To read more about watchers, see the :ref:`Functions for watchers ` section." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/watch.rst:20 +msgid "Keep in mind that garbage collection of a watcher handle doesn't lead to the watcher's destruction. In this case, the watcher remains registered. It is okay to discard the result of ``watch`` function if the watcher will never be unregistered." +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/watch.rst:24 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/watch.rst:26 +msgid "-- Broadcast value 42 for the 'foo' key.\n" +"box.broadcast('foo', 42)\n" +"\n" +"local log = require('log')\n" +"-- Subscribe to updates of the 'foo' key.\n" +"local w = box.watch('foo', function(key, value)\n" +" assert(key == 'foo')\n" +" log.info(\"The box.id value is '%d'\", value)\n" +"end)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/watch.rst:38 +msgid "If you don't need the watcher anymore, you can unregister it using the command below:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_events/watch.rst:40 +msgid "w:unregister()" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index.pot b/locale/en/reference/reference_lua/box_index.pot new file mode 100644 index 0000000000..b877eeab88 --- /dev/null +++ b/locale/en/reference/reference_lua/box_index.pot @@ -0,0 +1,213 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index.rst:5 +msgid "Submodule box.index" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:7 +msgid "The ``box.index`` submodule provides read-only access for index definitions and index keys. Indexes are contained in :samp:`box.space.{space-name}.index` array within each space object. They provide an API for ordered iteration over tuples. This API is a direct binding to corresponding methods of index objects of type ``box.index`` in the storage engine." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:13 +msgid "Below is a list of all ``box.index`` functions and members." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:24 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:25 +msgid "Use" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:27 +msgid ":doc:`./box_index/examples`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:28 +msgid "Some useful examples" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:30 +msgid ":doc:`./box_space/create_index`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:31 +msgid "Create an index" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:33 +msgid ":doc:`./box_index/unique`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:34 +msgid "Flag, true if an index is unique" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:36 +msgid ":doc:`./box_index/type`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:37 +msgid "Index type" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:39 +msgid ":doc:`./box_index/parts`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:40 +msgid "Array of index key fields" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:42 +msgid ":doc:`./box_index/pairs`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:43 +msgid "Prepare for iterating" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:45 +msgid ":doc:`./box_index/select`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:46 +msgid "Select one or more tuples via index" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:48 +msgid ":doc:`./box_index/get`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:49 +msgid "Select a tuple via index" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:51 +msgid ":doc:`./box_index/min`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:52 +msgid "Find the minimum value in index" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:54 +msgid ":doc:`./box_index/max`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:55 +msgid "Find the maximum value in index" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:57 +msgid ":doc:`./box_index/random`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:58 +msgid "Find a random value in index" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:60 +msgid ":doc:`./box_index/count`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:61 +msgid "Count tuples matching key value" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:63 +msgid ":doc:`./box_index/update`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:64 +msgid "Update a tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:66 +msgid ":doc:`./box_index/delete`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:67 +msgid "Delete a tuple by key" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:69 +msgid ":doc:`./box_index/alter`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:70 +msgid "Alter an index" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:72 +msgid ":doc:`./box_index/drop`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:73 +msgid "Drop an index" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:75 +msgid ":doc:`./box_index/rename`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:76 +msgid "Rename an index" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:78 +msgid ":doc:`./box_index/bsize`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:79 +msgid "Get count of bytes for an index" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:81 +msgid ":doc:`./box_index/stat`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:82 +msgid "Get statistics for an index" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:84 +msgid ":doc:`./box_index/compact`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:85 +msgid "Remove unused index space" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:87 +msgid ":doc:`./box_index/tuple_pos`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:88 +msgid "Return a tuple's position for an index" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:90 +msgid ":doc:`./box_index/user_defined`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index.rst:91 +msgid "Any function / method that any user wants to add" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/alter.pot b/locale/en/reference/reference_lua/box_index/alter.pot new file mode 100644 index 0000000000..4f9e9f2a31 --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/alter.pot @@ -0,0 +1,111 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/alter.rst:5 +msgid "index_object:alter()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/alter.rst:11 +msgid "Alter an index. It is legal in some circumstances to change one or more of the index characteristics, for example its type, its sequence options, its parts, and whether it is unique. Usually this causes rebuilding of the space, except for the simple case where a part's ``is_nullable`` flag is changed from ``false`` to ``true``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/alter.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/alter.rst:18 +msgid "an :ref:`object reference `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/alter.rst:20 +msgid "index options (see :ref:`index_opts `)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/alter.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/alter.rst:22 +msgid "nil" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/alter.rst:24 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/alter.rst:26 +msgid "index does not exist" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/alter.rst:27 +msgid "the primary-key index cannot be changed to ``{unique = false}``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/alter.rst:31 +msgid "Vinyl does not support ``alter()`` of a primary-key index unless the space is empty." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/alter.rst:33 +msgid "**Example 1:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/alter.rst:35 +msgid "You can add and remove fields that make up a primary index:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/alter.rst:37 +msgid "tarantool> s = box.schema.create_space('test')\n" +"---\n" +"...\n" +"tarantool> i = s:create_index('i', {parts = {{field = 1, type = 'unsigned'}}})\n" +"---\n" +"...\n" +"tarantool> s:insert({1, 2})\n" +"---\n" +"- [1, 2]\n" +"...\n" +"tarantool> i:select()\n" +"---\n" +"- - [1, 2]\n" +"...\n" +"tarantool> i:alter({parts = {{field = 1, type = 'unsigned'}, {field = 2, type = 'unsigned'}}})\n" +"---\n" +"...\n" +"tarantool> s:insert({1, 't'})\n" +"---\n" +"- error: 'Tuple field 2 type does not match one required by operation: expected unsigned'\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/alter.rst:61 +msgid "**Example 2:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/alter.rst:63 +msgid "You can change index options for both memtx and vinyl spaces:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/alter.rst:65 +msgid "tarantool> box.space.space55.index.primary:alter({type = 'HASH'})\n" +"---\n" +"...\n" +"\n" +"tarantool> box.space.vinyl_space.index.i:alter({page_size=4096})\n" +"---\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/bsize.pot b/locale/en/reference/reference_lua/box_index/bsize.pot new file mode 100644 index 0000000000..635b9763a6 --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/bsize.pot @@ -0,0 +1,49 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/bsize.rst:5 +msgid "index_object:bsize()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/bsize.rst:11 +msgid "Return the total number of bytes taken by the index." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/bsize.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/bsize.rst:13 +msgid "an :ref:`object reference `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/bsize.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/bsize.rst:16 +msgid "number of bytes" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/bsize.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/bsize.rst:17 +msgid "number" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/compact.pot b/locale/en/reference/reference_lua/box_index/compact.pot new file mode 100644 index 0000000000..188937900b --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/compact.pot @@ -0,0 +1,33 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/compact.rst:5 +msgid "index_object:compact()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/compact.rst:11 +msgid "Remove unused index space. For the memtx storage engine this method does nothing; ``index_object:compact()`` is only for the vinyl storage engine. For example, with vinyl, if a tuple is deleted, the space is not immediately reclaimed. There is a scheduler for reclaiming space automatically based on factors such as lsm shape and amplification as discussed in the section :ref:`Storing data with vinyl `, so calling ``index_object:compact()`` manually is not always necessary." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/compact.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/compact.rst:20 +msgid "nil (Tarantool returns without waiting for compaction to complete)" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/count.pot b/locale/en/reference/reference_lua/box_index/count.pot new file mode 100644 index 0000000000..a28ecc632f --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/count.pot @@ -0,0 +1,96 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/count.rst:5 +msgid "index_object:count()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/count.rst:11 +msgid "Iterate over an index, counting the number of tuples which match the key-value." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/count.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/count.rst:14 +msgid "an :ref:`object reference `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/count.rst:16 +msgid "values to be matched against the index key" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/count.rst:17 +msgid "comparison method" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/count.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/count.rst:19 +msgid "the number of matching tuples." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/count.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/count.rst:20 +msgid "number" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/count.rst:22 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/count.rst:24 +msgid "Below are few examples of using ``count``. To try out these examples, you need to bootstrap a Tarantool database as described in :ref:`Using data operations `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/count.rst:28 +msgid "-- Insert test data --\n" +"box.space.bands:insert { 1, 'Roxette', 1986 }\n" +"box.space.bands:insert { 2, 'Scorpions', 1965 }\n" +"box.space.bands:insert { 3, 'Ace of Base', 1987 }\n" +"box.space.bands:insert { 4, 'The Beatles', 1960 }\n" +"box.space.bands:insert { 5, 'Pink Floyd', 1965 }\n" +"box.space.bands:insert { 6, 'The Rolling Stones', 1962 }\n" +"box.space.bands:insert { 7, 'The Doors', 1965 }\n" +"box.space.bands:insert { 8, 'Nirvana', 1987 }\n" +"box.space.bands:insert { 9, 'Led Zeppelin', 1968 }\n" +"box.space.bands:insert { 10, 'Queen', 1970 }\n" +"\n" +"-- Count the number of tuples that match the full key value\n" +"count = box.space.bands.index.year:count(1965)\n" +"--[[\n" +"---\n" +"- 3\n" +"...\n" +"--]]\n" +"\n" +"-- Count the number of tuples that match the partial key value\n" +"count_partial = box.space.bands.index.year_band:count(1965)\n" +"--[[\n" +"---\n" +"- 3\n" +"...\n" +"--]]\n" +"" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/delete.pot b/locale/en/reference/reference_lua/box_index/delete.pot new file mode 100644 index 0000000000..0d686647b9 --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/delete.pot @@ -0,0 +1,61 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/delete.rst:5 +msgid "index_object:delete()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/delete.rst:11 +msgid "Delete a tuple identified by a key." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/delete.rst:13 +msgid "Same as :ref:`box.space...delete() `, but key is searched in this index instead of in the primary-key index. This index ought to be unique." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/delete.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/delete.rst:17 +msgid "an :ref:`object reference `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/delete.rst:19 +msgid "values to be matched against the index key" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/delete.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/delete.rst:21 +msgid "the deleted tuple." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/delete.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/delete.rst:22 +msgid "tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/delete.rst:24 +msgid "**Note regarding storage engine:** vinyl will return `nil`, rather than the deleted tuple." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/drop.pot b/locale/en/reference/reference_lua/box_index/drop.pot new file mode 100644 index 0000000000..9829517f53 --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/drop.pot @@ -0,0 +1,63 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/drop.rst:5 +msgid "index_object:drop()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/drop.rst:11 +msgid "Drop an index. Dropping a primary-key index has a side effect: all tuples are deleted." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/drop.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/drop.rst:14 +msgid "an :ref:`object reference `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/drop.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/drop.rst:17 +msgid "nil." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/drop.rst:19 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/drop.rst:21 +msgid "index does not exist," +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/drop.rst:22 +msgid "a primary-key index cannot be dropped while a secondary-key index exists." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/drop.rst:25 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/drop.rst:27 +msgid "tarantool> box.space.space55.index.primary:drop()\n" +"---\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/examples.pot b/locale/en/reference/reference_lua/box_index/examples.pot new file mode 100644 index 0000000000..c3b6c9bbf0 --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/examples.pot @@ -0,0 +1,290 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:5 +msgid "Examples for `box.index`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:9 +msgid "Example showing use of the box functions" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:11 +msgid "This example will work with the sandbox configuration described in the preface. That is, there is a space named tester with a numeric primary key. The example function will:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:15 +msgid "select a tuple whose key value is 1000;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:16 +msgid "raise an error if the tuple already exists and already has 3 fields;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:19 +msgid "Insert or replace the tuple with:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:18 +msgid "field[1] = 1000" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:19 +msgid "field[2] = a uuid" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:20 +msgid "field[3] = number of seconds since 1970-01-01;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:21 +msgid "Get field[3] from what was replaced;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:22 +msgid "Format the value from field[3] as yyyy-mm-dd hh:mm:ss.ffff;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:23 +msgid "Return the formatted value." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:25 +msgid "The function uses Tarantool box functions :ref:`box.space...select `, :ref:`box.space...replace `, :ref:`fiber.time `, :ref:`uuid.str `. The function uses Lua functions `os.date() `_ and `string.sub() `_." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:32 +msgid "function example()\n" +" local a, b, c, table_of_selected_tuples, d\n" +" local replaced_tuple, time_field\n" +" local formatted_time_field\n" +" local fiber = require('fiber')\n" +" table_of_selected_tuples = box.space.tester:select{1000}\n" +" if table_of_selected_tuples ~= nil then\n" +" if table_of_selected_tuples[1] ~= nil then\n" +" if #table_of_selected_tuples[1] == 3 then\n" +" box.error({code=1, reason='This tuple already has 3 fields'})\n" +" end\n" +" end\n" +" end\n" +" replaced_tuple = box.space.tester:replace\n" +" {1000, require('uuid').str(), tostring(fiber.time())}\n" +" time_field = tonumber(replaced_tuple[3])\n" +" formatted_time_field = os.date(\"%Y-%m-%d %H:%M:%S\", time_field)\n" +" c = time_field % 1\n" +" d = string.sub(c, 3, 6)\n" +" formatted_time_field = formatted_time_field .. '.' .. d\n" +" return formatted_time_field\n" +"end" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:57 +msgid "... And here is what happens when one invokes the function:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:59 +msgid "tarantool> box.space.tester:delete(1000)\n" +"---\n" +"- [1000, '264ee2da03634f24972be76c43808254', '1391037015.6809']\n" +"...\n" +"tarantool> example(1000)\n" +"---\n" +"- 2014-01-29 16:11:51.1582\n" +"...\n" +"tarantool> example(1000)\n" +"---\n" +"- error: 'This tuple already has 3 fields'\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:78 +msgid "Example showing a user-defined iterator" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:80 +msgid "Here is an example that shows how to build one's own iterator. The ``paged_iter`` function is an \"iterator function\", which will only be understood by programmers who have read the Lua manual section `Iterators and Closures `_. It does paginated retrievals, that is, it returns 10 tuples at a time from a table named \"t\", whose primary key was defined with ``create_index('primary',{parts={1,'string'}})``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:87 +msgid "function paged_iter(search_key, tuples_per_page)\n" +" local iterator_string = \"GE\"\n" +" return function ()\n" +" local page = box.space.t.index[0]:select(search_key,\n" +" {iterator = iterator_string, limit=tuples_per_page})\n" +" if #page == 0 then return nil end\n" +" search_key = page[#page][1]\n" +" iterator_string = \"GT\"\n" +" return page\n" +" end\n" +"end" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:101 +msgid "Programmers who use ``paged_iter`` do not need to know why it works, they only need to know that, if they call it within a loop, they will get 10 tuples at a time until there are no more tuples." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:105 +msgid "In this example the tuples are merely printed, a page at a time. But it should be simple to change the functionality, for example by yielding after each retrieval, or by breaking when the tuples fail to match some additional criteria." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:110 +msgid "for page in paged_iter(\"X\", 10) do\n" +" print(\"New Page. Number Of Tuples = \" .. #page)\n" +" for i = 1, #page, 1 do\n" +" print(page[i])\n" +" end\n" +"end" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:123 +msgid "Example showing submodule `box.index` with index type = RTREE for spatial searches" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:125 +msgid "This submodule may be used for spatial searches if the index type is RTREE. There are operations for searching *rectangles* (geometric objects with 4 corners and 4 sides) and *boxes* (geometric objects with more than 4 corners and more than 4 sides, sometimes called hyperrectangles). This manual uses the term *rectangle-or-box* for the whole class of objects that includes both rectangles and boxes. Only rectangles will be illustrated." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:133 +msgid "Rectangles are described according to their X-axis (horizontal axis) and Y-axis (vertical axis) coordinates in a grid of arbitrary size. Here is a picture of four rectangles on a grid with 11 horizontal points and 11 vertical points:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:137 +msgid " X AXIS\n" +" 1 2 3 4 5 6 7 8 9 10 11\n" +" 1\n" +" 2 #-------+ <-Rectangle#1\n" +"Y AXIS 3 | |\n" +" 4 +-------#\n" +" 5 #-----------------------+ <-Rectangle#2\n" +" 6 | |\n" +" 7 | #---+ | <-Rectangle#3\n" +" 8 | | | |\n" +" 9 | +---# |\n" +" 10 +-----------------------#\n" +" 11 # <-Rectangle#4" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:153 +msgid "The rectangles are defined according to this scheme: {X-axis coordinate of top left, Y-axis coordinate of top left, X-axis coordinate of bottom right, Y-axis coordinate of bottom right} -- or more succinctly: {x1,y1,x2,y2}. So in the picture ... Rectangle#1 starts at position 1 on the X axis and position 2 on the Y axis, and ends at position 3 on the X axis and position 4 on the Y axis, so its coordinates are {1,2,3,4}. Rectangle#2's coordinates are {3,5,9,10}. Rectangle#3's coordinates are {4,7,5,9}. And finally Rectangle#4's coordinates are {10,11,10,11}. Rectangle#4 is actually a \"point\" since it has zero width and zero height, so it could have been described with only two digits: {10,11}." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:163 +msgid "Some relationships between the rectangles are: \"Rectangle#1's nearest neighbor is Rectangle#2\", and \"Rectangle#3 is entirely inside Rectangle#2\"." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:166 +msgid "Now let us create a space and add an RTREE index." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:168 +msgid "tarantool> s = box.schema.space.create('rectangles')\n" +"tarantool> i = s:create_index('primary', {\n" +" > type = 'HASH',\n" +" > parts = {1, 'unsigned'}\n" +" > })\n" +"tarantool> r = s:create_index('rtree', {\n" +" > type = 'RTREE',\n" +" > unique = false,\n" +" > parts = {2, 'ARRAY'}\n" +" > })" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:181 +msgid "Field#1 doesn't matter, we just make it because we need a primary-key index. (RTREE indexes cannot be unique and therefore cannot be primary-key indexes.) The second field must be an \"array\", which means its values must represent {x,y} points or {x1,y1,x2,y2} rectangles. Now let us populate the table by inserting two tuples, containing the coordinates of Rectangle#2 and Rectangle#4." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:187 +msgid "tarantool> s:insert{1, {3, 5, 9, 10}}\n" +"tarantool> s:insert{2, {10, 11}}" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:192 +msgid "And now, following the description of `RTREE iterator types`_, we can search the rectangles with these requests:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:197 +msgid "tarantool> r:select({10, 11, 10, 11}, {iterator = 'EQ'})\n" +"---\n" +"- - [2, [10, 11]]\n" +"...\n" +"tarantool> r:select({4, 7, 5, 9}, {iterator = 'GT'})\n" +"---\n" +"- - [1, [3, 5, 9, 10]]\n" +"...\n" +"tarantool> r:select({1, 2, 3, 4}, {iterator = 'NEIGHBOR'})\n" +"---\n" +"- - [1, [3, 5, 9, 10]]\n" +" - [2, [10, 11]]\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:213 +msgid "Request#1 returns 1 tuple because the point {10,11} is the same as the rectangle {10,11,10,11} (\"Rectangle#4\" in the picture). Request#2 returns 1 tuple because the rectangle {4,7,5,9}, which was \"Rectangle#3\" in the picture, is entirely within{3,5,9,10} which was Rectangle#2. Request#3 returns 2 tuples, because the NEIGHBOR iterator always returns all tuples, and the first returned tuple will be {3,5,9,10} (\"Rectangle#2\" in the picture) because it is the closest neighbor of {1,2,3,4} (\"Rectangle#1\" in the picture)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:221 +msgid "Now let us create a space and index for cuboids, which are rectangle-or-boxes that have 6 corners and 6 sides." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:224 +msgid "tarantool> s = box.schema.space.create('R')\n" +"tarantool> i = s:create_index('primary', {parts = {1, 'unsigned'}})\n" +"tarantool> r = s:create_index('S', {\n" +" > type = 'RTREE',\n" +" > unique = false,\n" +" > dimension = 3,\n" +" > parts = {2, 'ARRAY'}\n" +" > })" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:235 +msgid "The additional option here is ``dimension=3``. The default dimension is 2, which is why it didn't need to be specified for the examples of rectangle. The maximum dimension is 20. Now for insertions and selections there will usually be 6 coordinates. For example:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:240 +msgid "tarantool> s:insert{1, {0, 3, 0, 3, 0, 3}}\n" +"tarantool> r:select({1, 2, 1, 2, 1, 2}, {iterator = box.index.GT})" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:245 +msgid "Now let us create a space and index for Manhattan-style spatial objects, which are rectangle-or-boxes that have a different way to calculate neighbors." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:248 +msgid "tarantool> s = box.schema.space.create('R')\n" +"tarantool> i = s:create_index('primary', {parts = {1, 'unsigned'}})\n" +"tarantool> r = s:create_index('S', {\n" +" > type = 'RTREE',\n" +" > unique = false,\n" +" > distance = 'manhattan',\n" +" > parts = {2, 'ARRAY'}\n" +" > })" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:259 +msgid "The additional option here is ``distance='manhattan'``. The default distance calculator is 'euclid', which is the straightforward as-the-crow-flies method. The optional distance calculator is 'manhattan', which can be a more appropriate method if one is following the lines of a grid rather than traveling in a straight line." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:265 +msgid "tarantool> s:insert{1, {0, 3, 0, 3}}\n" +"tarantool> r:select({1, 2, 1, 2}, {iterator = box.index.NEIGHBOR})" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/examples.rst:270 +msgid "More examples of spatial searching are online in the file `R tree index quick start and usage `_." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/get.pot b/locale/en/reference/reference_lua/box_index/get.pot new file mode 100644 index 0000000000..26fd9c144b --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/get.pot @@ -0,0 +1,84 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/get.rst:5 +msgid "index_object:get()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/get.rst:11 +msgid "Search for a tuple via the given index, as described in the :ref:`select ` topic." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/get.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/get.rst:13 +msgid "an :ref:`object reference `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/get.rst:15 +msgid "values to be matched against the index key" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/get.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/get.rst:17 +msgid "the tuple whose index-key fields are equal to the passed key values." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/get.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/get.rst:18 +msgid "tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/get.rst:20 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/get.rst:22 +msgid "no such index;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/get.rst:23 +msgid "wrong type;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/get.rst:24 +msgid "more than one tuple matches." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/get.rst:26 +msgid "**Complexity factors:** Index size, Index type. See also :ref:`space_object:get() `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/get.rst:29 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/get.rst:31 +msgid "tarantool> box.space.tester.index.primary:get(2)\n" +"---\n" +"- [2, 'Music']\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/max.pot b/locale/en/reference/reference_lua/box_index/max.pot new file mode 100644 index 0000000000..e4f90ed4d8 --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/max.pot @@ -0,0 +1,108 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/max.rst:4 +msgid "index_object:max()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/max.rst:10 +msgid "Find the maximum value in the specified index." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/max.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/max.rst:12 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/max.rst:14 +msgid "values to be matched against the index key" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/max.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/max.rst:16 +msgid "the tuple for the last key in the index. If the optional ``key`` value is supplied, returns the last key that is less than or equal to ``key``. Starting with :doc:`Tarantool 2.0.4 `, ``index_object:max(key)`` returns nothing if ``key`` doesn't match any value in the index." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/max.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/max.rst:20 +msgid "tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/max.rst:23 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/max.rst:25 +msgid "Index is not of type 'TREE'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/max.rst:26 +msgid ":errcode:`ER_TRANSACTION_CONFLICT` if a transaction conflict is detected in the :ref:`MVCC transaction mode `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/max.rst:29 +msgid "**Complexity factors:** index size, index type." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/max.rst:31 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/max.rst:33 +msgid "Below are few examples of using ``max``. To try out these examples, you need to bootstrap a Tarantool database as described in :ref:`Using data operations `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/max.rst:37 +msgid "-- Insert test data --\n" +"box.space.bands:insert { 1, 'Roxette', 1986 }\n" +"box.space.bands:insert { 2, 'Scorpions', 1965 }\n" +"box.space.bands:insert { 3, 'Ace of Base', 1987 }\n" +"box.space.bands:insert { 4, 'The Beatles', 1960 }\n" +"box.space.bands:insert { 5, 'Pink Floyd', 1965 }\n" +"box.space.bands:insert { 6, 'The Rolling Stones', 1962 }\n" +"box.space.bands:insert { 7, 'The Doors', 1965 }\n" +"box.space.bands:insert { 8, 'Nirvana', 1987 }\n" +"box.space.bands:insert { 9, 'Led Zeppelin', 1968 }\n" +"box.space.bands:insert { 10, 'Queen', 1970 }\n" +"\n" +"-- Find the maximum value in the specified index\n" +"max = box.space.bands.index.year:max()\n" +"--[[\n" +"---\n" +"- [8, 'Nirvana', 1987]\n" +"...\n" +"--]]\n" +"\n" +"-- Find the maximum value that matches the partial key value\n" +"max_partial = box.space.bands.index.year_band:max(1965)\n" +"--[[\n" +"---\n" +"- [7, 'The Doors', 1965]\n" +"...\n" +"--]]\n" +"" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/min.pot b/locale/en/reference/reference_lua/box_index/min.pot new file mode 100644 index 0000000000..7c2b10dff4 --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/min.pot @@ -0,0 +1,108 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/min.rst:4 +msgid "index_object:min()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/min.rst:10 +msgid "Find the minimum value in the specified index." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/min.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/min.rst:12 +msgid "an :ref:`object reference `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/min.rst:14 +msgid "values to be matched against the index key" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/min.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/min.rst:16 +msgid "the tuple for the first key in the index. If the optional ``key`` value is supplied, returns the first key that is greater than or equal to ``key``. Starting with :doc:`Tarantool 2.0.4 `, ``index_object:min(key)`` returns nothing if ``key`` doesn't match any value in the index." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/min.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/min.rst:21 +msgid "tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/min.rst:23 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/min.rst:25 +msgid "Index is not of type 'TREE'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/min.rst:26 +msgid ":errcode:`ER_TRANSACTION_CONFLICT` if a transaction conflict is detected in the :ref:`MVCC transaction mode `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/min.rst:29 +msgid "**Complexity factors:** Index size, Index type." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/min.rst:31 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/min.rst:33 +msgid "Below are few examples of using ``min``. To try out these examples, you need to bootstrap a Tarantool database as described in :ref:`Using data operations `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/min.rst:37 +msgid "-- Insert test data --\n" +"box.space.bands:insert { 1, 'Roxette', 1986 }\n" +"box.space.bands:insert { 2, 'Scorpions', 1965 }\n" +"box.space.bands:insert { 3, 'Ace of Base', 1987 }\n" +"box.space.bands:insert { 4, 'The Beatles', 1960 }\n" +"box.space.bands:insert { 5, 'Pink Floyd', 1965 }\n" +"box.space.bands:insert { 6, 'The Rolling Stones', 1962 }\n" +"box.space.bands:insert { 7, 'The Doors', 1965 }\n" +"box.space.bands:insert { 8, 'Nirvana', 1987 }\n" +"box.space.bands:insert { 9, 'Led Zeppelin', 1968 }\n" +"box.space.bands:insert { 10, 'Queen', 1970 }\n" +"\n" +"-- Find the minimum value in the specified index\n" +"min = box.space.bands.index.year:min()\n" +"--[[\n" +"---\n" +"- [4, 'The Beatles', 1960]\n" +"...\n" +"--]]\n" +"\n" +"-- Find the minimum value that matches the partial key value\n" +"min_partial = box.space.bands.index.year_band:min(1965)\n" +"--[[\n" +"---\n" +"- [5, 'Pink Floyd', 1965]\n" +"...\n" +"--]]\n" +"" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/pairs.pot b/locale/en/reference/reference_lua/box_index/pairs.pot new file mode 100644 index 0000000000..1d72399dd7 --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/pairs.pot @@ -0,0 +1,439 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:6 +msgid "index_object:pairs()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:12 +msgid "Search for a tuple or a set of tuples via the given index, and allow iterating over one tuple at a time. To search by the primary index in the specified space, use the :ref:`box_space-pairs` method." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:16 +msgid "The :samp:`{key}` parameter specifies what must match within the index." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:20 +msgid ":samp:`{key}` is only used to find the first match. Do not assume all matched tuples will contain the key." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:23 +msgid "The :samp:`{iterator}` parameter specifies the rule for matching and ordering. Different index types support different iterators. For example, a TREE index maintains a strict order of keys and can return all tuples in ascending or descending order, starting from the specified key. Other index types, however, do not support ordering." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:29 +msgid "To understand consistency of tuples returned by an iterator, it's essential to know the principles of the Tarantool transaction processing subsystem. An iterator in Tarantool does not own a consistent read view. Instead, each procedure is granted exclusive access to all tuples and spaces until there is a \"context switch\": which may happen due to :ref:`the implicit yield rules `, or by an explicit call to :ref:`fiber.yield `. When the execution flow returns to the yielded procedure, the data set could have changed significantly. Iteration, resumed after a yield point, does not preserve the read view, but continues with the new content of the database. The tutorial :ref:`Indexed pattern search ` shows one way that iterators and yields can be used together." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:43 +msgid "For information about iterators' internal structures, see the `\"Lua Functional library\" `_ documentation." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:47 +msgid "an :ref:`object reference `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:49 +msgid "value to be matched against the index key, which may be multi-part." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:51 +msgid "as defined in tables below. The default iterator type is 'EQ'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:52 +msgid "a tuple or the position of a tuple (:ref:`tuple_pos `) after which ``pairs`` starts the search. You can pass an empty string or :ref:`box.NULL ` to this option to start the search from the first tuple." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:55 +msgid "The `iterator `_, which can be used in a ``for/end`` loop or with `totable() `_." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:59 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:61 +msgid "no such space" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:62 +msgid "wrong type" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:63 +msgid "selected iteration type is not supported for the index type" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:64 +msgid "key is not supported for the iteration type" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:65 +msgid "iterator position is invalid" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:67 +msgid "**Complexity factors:** Index size, Index type; Number of tuples accessed." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:70 +msgid "A search-key-value can be a number (for example ``1234``), a string (for example ``'abcd'``), or a table of numbers and strings (for example ``{1234, 'abcd'}``). Each part of a key will be compared to each part of an index key." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:75 +msgid "The returned tuples will be in order by index key value, or by the hash of the index key value if index type = 'hash'. If the index is non-unique, then duplicates will be secondarily in order by primary key value. The order will be reversed if the iterator type is 'LT' or 'LE' or 'REQ'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:82 +msgid "**Iterator types for TREE indexes**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:93 +msgid "Iterator type" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:93 +#: ../../doc/reference/reference_lua/box_index/pairs.rst:192 +#: ../../doc/reference/reference_lua/box_index/pairs.rst:215 +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "Arguments" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:93 +#: ../../doc/reference/reference_lua/box_index/pairs.rst:192 +#: ../../doc/reference/reference_lua/box_index/pairs.rst:215 +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "Description" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:95 +#: ../../doc/reference/reference_lua/box_index/pairs.rst:199 +#: ../../doc/reference/reference_lua/box_index/pairs.rst:221 +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "box.index.EQ or 'EQ'" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:95 +#: ../../doc/reference/reference_lua/box_index/pairs.rst:101 +#: ../../doc/reference/reference_lua/box_index/pairs.rst:106 +#: ../../doc/reference/reference_lua/box_index/pairs.rst:113 +#: ../../doc/reference/reference_lua/box_index/pairs.rst:120 +#: ../../doc/reference/reference_lua/box_index/pairs.rst:124 +#: ../../doc/reference/reference_lua/box_index/pairs.rst:130 +#: ../../doc/reference/reference_lua/box_index/pairs.rst:199 +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "search value" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:95 +msgid "The comparison operator is '==' (equal to). If an index key is equal to a search value, it matches. Tuples are returned in ascending order by index key. This is the default." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:101 +msgid "box.index.REQ or 'REQ'" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:101 +msgid "Matching is the same as for ``box.index.EQ``. Tuples are returned in descending order by index key." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:106 +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "box.index.GT or 'GT'" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:106 +msgid "The comparison operator is '>' (greater than). If an index key is greater than a search value, it matches. Tuples are returned in ascending order by index key." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:113 +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "box.index.GE or 'GE'" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:113 +msgid "The comparison operator is '>=' (greater than or equal to). If an index key is greater than or equal to a search value, it matches. Tuples are returned in ascending order by index key." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:120 +#: ../../doc/reference/reference_lua/box_index/pairs.rst:217 +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "box.index.ALL or 'ALL'" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:120 +msgid "Same as box.index.GE." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:124 +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "box.index.LT or 'LT'" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:124 +msgid "The comparison operator is '<' (less than). If an index key is less than a search value, it matches. Tuples are returned in descending order by index key." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:130 +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "box.index.LE or 'LE'" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:130 +msgid "The comparison operator is '<=' (less than or equal to). If an index key is less than or equal to a search value, it matches. Tuples are returned in descending order by index key." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:138 +msgid "Informally, we can state that searches with TREE indexes are generally what users will find is intuitive, provided that there are no nils and no missing parts. Formally, the logic is as follows. A search key has zero or more parts, for example {}, {1,2,3},{1,nil,3}. An index key has one or more parts, for example {1}, {1,2,3},{1,2,3}. A search key may contain nil (but not msgpack.NULL, which is the wrong type). An index key may not contain nil or msgpack.NULL, although a later version of Tarantool will have different rules -- the behavior of searches with nil is subject to change. Possible iterators are LT, LE, EQ, REQ, GE, GT. A search key is said to \"match\" an index key if the following statements, which are pseudocode for the comparison operation, return TRUE." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:199 +msgid "If (number-of-search-key-parts > number-of-index-key-parts) return ERROR\n" +"If (number-of-search-key-parts == 0) return TRUE\n" +"for (i = 1; ; ++i)\n" +"{\n" +" if (i > number-of-search-key-parts) OR (search-key-part[i] is nil)\n" +" {\n" +" if (iterator is LT or GT) return FALSE\n" +" return TRUE\n" +" }\n" +" if (type of search-key-part[i] is not compatible with type of index-key-part[i])\n" +" {\n" +" return ERROR\n" +" }\n" +" if (search-key-part[i] == index-key-part[i])\n" +" {\n" +" continue\n" +" }\n" +" if (search-key-part[i] > index-key-part[i])\n" +" {\n" +" if (iterator is EQ or REQ or LE or LT) return FALSE\n" +" return TRUE\n" +" }\n" +" if (search-key-part[i] < index-key-part[i])\n" +" {\n" +" if (iterator is EQ or REQ or GE or GT) return FALSE\n" +" return TRUE\n" +" }\n" +"}" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:183 +msgid "**Iterator types for HASH indexes**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:192 +#: ../../doc/reference/reference_lua/box_index/pairs.rst:215 +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "Type" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:194 +msgid "box.index.ALL" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:194 +#: ../../doc/reference/reference_lua/box_index/pairs.rst:217 +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "none" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:194 +msgid "All index keys match. Tuples are returned in ascending order by hash of index key, which will appear to be random." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:199 +msgid "The comparison operator is '==' (equal to). If an index key is equal to a search value, it matches. The number of returned tuples will be 0 or 1. This is the default." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:206 +msgid "**Iterator types for BITSET indexes**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:217 +msgid "All index keys match. Tuples are returned in their order within the space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:221 +#: ../../doc/reference/reference_lua/box_index/pairs.rst:226 +#: ../../doc/reference/reference_lua/box_index/pairs.rst:231 +#: ../../doc/reference/reference_lua/box_index/pairs.rst:236 +msgid "bitset value" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:221 +msgid "If an index key is equal to a bitset value, it matches. Tuples are returned in their order within the space. This is the default." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:226 +msgid "box.index.BITS_ALL_SET" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:226 +msgid "If all of the bits which are 1 in the bitset value are 1 in the index key, it matches. Tuples are returned in their order within the space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:231 +msgid "box.index.BITS_ANY_SET" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:231 +msgid "If any of the bits which are 1 in the bitset value are 1 in the index key, it matches. Tuples are returned in their order within the space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:236 +msgid "box.index.BITS_ALL_NOT_SET" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:236 +msgid "If all of the bits which are 1 in the bitset value are 0 in the index key, it matches. Tuples are returned in their order within the space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:244 +msgid "**Iterator types for RTREE indexes**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "All keys match. Tuples are returned in their order within the space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "If all points of the rectangle-or-box defined by the search value are the same as the rectangle-or-box defined by the index key, it matches. Tuples are returned in their order within the space. \"Rectangle-or-box\" means \"rectangle-or-box as explained in section about :ref:`RTREE `\". This is the default." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "If all points of the rectangle-or-box defined by the search value are within the rectangle-or-box defined by the index key, it matches. Tuples are returned in their order within the space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "If all points of the rectangle-or-box defined by the search value are within, or at the side of, the rectangle-or-box defined by the index key, it matches. Tuples are returned in their order within the space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "If all points of the rectangle-or-box defined by the index key are within the rectangle-or-box defined by the search key, it matches. Tuples are returned in their order within the space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "If all points of the rectangle-or-box defined by the index key are within, or at the side of, the rectangle-or-box defined by the search key, it matches. Tuples are returned in their order within the space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "box.index.OVERLAPS or 'OVERLAPS'" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "If some points of the rectangle-or-box defined by the search value are within the rectangle-or-box defined by the index key, it matches. Tuples are returned in their order within the space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "box.index.NEIGHBOR or 'NEIGHBOR'" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/box_index_rtree.csv:1 +msgid "If some points of the rectangle-or-box defined by the defined by the key are within, or at the side of, defined by the index key, it matches. Tuples are returned in order: nearest neighbor first." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:259 +msgid "**Examples:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:261 +msgid "Below are few examples of using ``pairs`` with different parameters. To try out these examples, you need to bootstrap a Tarantool instance as described in :ref:`Using data operations `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/pairs.rst:267 +msgid "-- Insert test data --\n" +"tarantool> bands:insert{1, 'Roxette', 1986}\n" +" bands:insert{2, 'Scorpions', 1965}\n" +" bands:insert{3, 'Ace of Base', 1987}\n" +" bands:insert{4, 'The Beatles', 1960}\n" +" bands:insert{5, 'Pink Floyd', 1965}\n" +" bands:insert{6, 'The Rolling Stones', 1962}\n" +" bands:insert{7, 'The Doors', 1965}\n" +" bands:insert{8, 'Nirvana', 1987}\n" +" bands:insert{9, 'Led Zeppelin', 1968}\n" +" bands:insert{10, 'Queen', 1970}\n" +"---\n" +"...\n" +"\n" +"-- Select all tuples by the primary index --\n" +"tarantool> for _, tuple in bands.index.primary:pairs() do\n" +" print(tuple)\n" +" end\n" +"[1, 'Roxette', 1986]\n" +"[2, 'Scorpions', 1965]\n" +"[3, 'Ace of Base', 1987]\n" +"[4, 'The Beatles', 1960]\n" +"[5, 'Pink Floyd', 1965]\n" +"[6, 'The Rolling Stones', 1962]\n" +"[7, 'The Doors', 1965]\n" +"[8, 'Nirvana', 1987]\n" +"[9, 'Led Zeppelin', 1968]\n" +"[10, 'Queen', 1970]\n" +"---\n" +"...\n" +"\n" +"-- Select all tuples whose secondary key values start with the specified string --\n" +"tarantool> for _, tuple in bands.index.band:pairs(\"The\", {iterator = \"GE\"}) do\n" +" if (string.sub(tuple[2], 1, 3) ~= \"The\") then break end\n" +" print(tuple)\n" +" end\n" +"[4, 'The Beatles', 1960]\n" +"[7, 'The Doors', 1965]\n" +"[6, 'The Rolling Stones', 1962]\n" +"---\n" +"...\n" +"\n" +"-- Select all tuples whose secondary key values are between 1965 and 1970 --\n" +"tarantool> for _, tuple in bands.index.year:pairs(1965, {iterator = \"GE\"}) do\n" +" if (tuple[3] > 1970) then break end\n" +" print(tuple)\n" +" end\n" +"[2, 'Scorpions', 1965]\n" +"[5, 'Pink Floyd', 1965]\n" +"[7, 'The Doors', 1965]\n" +"[9, 'Led Zeppelin', 1968]\n" +"[10, 'Queen', 1970]\n" +"---\n" +"...\n" +"\n" +"-- Select all tuples after the specified tuple --\n" +"tarantool> for _, tuple in bands.index.primary:pairs({}, {after={7, 'The Doors', 1965}}) do\n" +" print(tuple)\n" +" end\n" +"[8, 'Nirvana', 1987]\n" +"[9, 'Led Zeppelin', 1968]\n" +"[10, 'Queen', 1970]\n" +"---\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/parts.pot b/locale/en/reference/reference_lua/box_index/parts.pot new file mode 100644 index 0000000000..02377331d1 --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/parts.pot @@ -0,0 +1,37 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/parts.rst:5 +msgid "index_object:parts" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/parts.rst:11 +msgid "The index's key parts." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/parts.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/parts.rst:13 +msgid "table" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/parts.rst:15 +msgid "**See also:** :ref:`index_opts.parts `" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/random.pot b/locale/en/reference/reference_lua/box_index/random.pot new file mode 100644 index 0000000000..a3cab54ced --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/random.pot @@ -0,0 +1,72 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/random.rst:5 +msgid "index_object:random()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/random.rst:11 +msgid "Find a random value in the specified index. This method is useful when it's important to get insight into data distribution in an index without having to iterate over the entire data set." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/random.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/random.rst:16 +msgid "an :ref:`object reference `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/random.rst:18 +msgid "an arbitrary non-negative integer" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/random.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/random.rst:20 +msgid "the tuple for the random key in the index." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/random.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/random.rst:21 +msgid "tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/random.rst:23 +msgid "**Complexity factors:** Index size, Index type." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/random.rst:25 +msgid "**Note regarding storage engine:** vinyl does not support ``random()``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/random.rst:27 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/random.rst:29 +msgid "tarantool> box.space.tester.index.secondary:random(1)\n" +"---\n" +"- ['Beta!', 66, 'This is the second tuple!']\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/rename.pot b/locale/en/reference/reference_lua/box_index/rename.pot new file mode 100644 index 0000000000..4585e7ce42 --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/rename.pot @@ -0,0 +1,63 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/rename.rst:5 +msgid "index_object:rename()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/rename.rst:11 +msgid "Rename an index." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/rename.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/rename.rst:13 +msgid "an :ref:`object reference `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/rename.rst:15 +msgid "new name for index" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/rename.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/rename.rst:17 +msgid "nil" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/rename.rst:19 +msgid "**Possible errors:** index_object does not exist." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/rename.rst:21 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/rename.rst:23 +msgid "tarantool> box.space.space55.index.primary:rename('secondary')\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/rename.rst:29 +msgid "**Complexity factors:** Index size, Index type, Number of tuples accessed." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/select.pot b/locale/en/reference/reference_lua/box_index/select.pot new file mode 100644 index 0000000000..670caafc53 --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/select.pot @@ -0,0 +1,204 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/select.rst:5 +msgid "index_object:select()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:11 +msgid "Search for a tuple or a set of tuples by the current index. To search by the primary index in the specified space, use the :ref:`box_space-select` method." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:14 +msgid "an :ref:`object reference `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:16 +msgid "a value to be matched against the index key, which may be multi-part." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:17 +msgid "none, any, or all of the following parameters: * ``iterator`` -- the :ref:`iterator type `. The default iterator type is 'EQ'. * ``limit`` -- the maximum number of tuples. * ``offset`` -- the number of tuples to skip (use this parameter carefully when scanning :ref:`large data sets `). * ``options.after`` -- a tuple or the position of a tuple (:ref:`tuple_pos `) after which ``select`` starts the search. You can pass an empty string or :ref:`box.NULL ` to this option to start the search from the first tuple. * ``options.fetch_pos`` -- if **true**, the ``select`` method returns the position of the last selected tuple as the second value. .. NOTE:: The ``after`` and ``fetch_pos`` options are supported for the ``TREE`` :ref:`index ` only." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:17 +msgid "none, any, or all of the following parameters:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:19 +msgid "``iterator`` -- the :ref:`iterator type `. The default iterator type is 'EQ'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:20 +msgid "``limit`` -- the maximum number of tuples." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:21 +msgid "``offset`` -- the number of tuples to skip (use this parameter carefully when scanning :ref:`large data sets `)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:22 +msgid "``options.after`` -- a tuple or the position of a tuple (:ref:`tuple_pos `) after which ``select`` starts the search. You can pass an empty string or :ref:`box.NULL ` to this option to start the search from the first tuple." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:23 +msgid "``options.fetch_pos`` -- if **true**, the ``select`` method returns the position of the last selected tuple as the second value." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:27 +msgid "The ``after`` and ``fetch_pos`` options are supported for the ``TREE`` :ref:`index ` only." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:33 +msgid "This function might return one or two values:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:35 +msgid "The tuples whose fields are equal to the fields of the passed key. If the number of passed fields is less than the number of fields in the current key, then only the passed fields are compared, so ``select{1,2}`` matches a tuple whose primary key is ``{1,2,3}``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:40 +msgid "(Optionally) If ``options.fetch_pos`` is set to **true**, returns a base64-encoded string representing the position of the last selected tuple as the second value. If no tuples are fetched, returns ``nil``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:45 +msgid "array of tuples" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:46 +msgid "(Optionally) string" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:52 +msgid "Use the ``offset`` option carefully when scanning large data sets as it linearly increases the number of scanned tuples and leads to a full space scan. Instead, you can use the ``after`` and ``fetch_pos`` options." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:58 +msgid "**Examples:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:60 +msgid "Below are few examples of using ``select`` with different parameters. To try out these examples, you need to bootstrap a Tarantool database as described in :ref:`Using data operations `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:64 +msgid "-- Insert test data --\n" +"box.space.bands:insert { 1, 'Roxette', 1986 }\n" +"box.space.bands:insert { 2, 'Scorpions', 1965 }\n" +"box.space.bands:insert { 3, 'Ace of Base', 1987 }\n" +"box.space.bands:insert { 4, 'The Beatles', 1960 }\n" +"box.space.bands:insert { 5, 'Pink Floyd', 1965 }\n" +"box.space.bands:insert { 6, 'The Rolling Stones', 1962 }\n" +"box.space.bands:insert { 7, 'The Doors', 1965 }\n" +"box.space.bands:insert { 8, 'Nirvana', 1987 }\n" +"box.space.bands:insert { 9, 'Led Zeppelin', 1968 }\n" +"box.space.bands:insert { 10, 'Queen', 1970 }\n" +"\n" +"-- Select a tuple by the specified primary key value --\n" +"select_primary = bands.index.primary:select { 1 }\n" +"--[[\n" +"---\n" +"- - [1, 'Roxette', 1986]\n" +"...\n" +"--]]\n" +"\n" +"-- Select a tuple by the specified secondary key value --\n" +"select_secondary = bands.index.band:select { 'The Doors' }\n" +"--[[\n" +"---\n" +"- - [7, 'The Doors', 1965]\n" +"...\n" +"--]]\n" +"\n" +"-- Select a tuple by the specified multi-part secondary key value --\n" +"select_multipart = bands.index.year_band:select { 1960, 'The Beatles' }\n" +"--[[\n" +"---\n" +"- - [4, 'The Beatles', 1960]\n" +"...\n" +"--]]\n" +"\n" +"-- Select tuples by the specified partial key value --\n" +"select_multipart_partial = bands.index.year_band:select { 1965 }\n" +"--[[\n" +"---\n" +"- - [5, 'Pink Floyd', 1965]\n" +" - [2, 'Scorpions', 1965]\n" +" - [7, 'The Doors', 1965]\n" +"...\n" +"--]]\n" +"\n" +"-- Select maximum 3 tuples by the specified secondary index --\n" +"select_limit = bands.index.band:select({}, { limit = 3 })\n" +"--[[\n" +"---\n" +"- - [3, 'Ace of Base', 1987]\n" +" - [9, 'Led Zeppelin', 1968]\n" +" - [8, 'Nirvana', 1987]\n" +"...\n" +"--]]\n" +"\n" +"-- Select maximum 3 tuples with the key value greater than 1965 --\n" +"select_greater = bands.index.year:select({ 1965 }, { iterator = 'GT', limit = 3 })\n" +"--[[\n" +"---\n" +"- - [9, 'Led Zeppelin', 1968]\n" +" - [10, 'Queen', 1970]\n" +" - [1, 'Roxette', 1986]\n" +"...\n" +"--]]\n" +"\n" +"-- Select maximum 3 tuples after the specified tuple --\n" +"select_after_tuple = bands.index.primary:select({}, { after = { 4, 'The Beatles', 1960 }, limit = 3 })\n" +"--[[\n" +"---\n" +"- - [5, 'Pink Floyd', 1965]\n" +" - [6, 'The Rolling Stones', 1962]\n" +" - [7, 'The Doors', 1965]\n" +"...\n" +"--]]\n" +"\n" +"-- Select first 3 tuples and fetch a last tuple's position --\n" +"result, position = bands.index.primary:select({}, { limit = 3, fetch_pos = true })\n" +"-- Then, pass this position as the 'after' parameter --\n" +"select_after_position = bands.index.primary:select({}, { limit = 3, after = position })\n" +"--[[\n" +"---\n" +"- - [4, 'The Beatles', 1960]\n" +" - [5, 'Pink Floyd', 1965]\n" +" - [6, 'The Rolling Stones', 1962]\n" +"...\n" +"--]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/select.rst:73 +msgid ":samp:`box.space.{space-name}.index.{index-name}:select(...)[1]`. can be replaced by :samp:`box.space.{space-name}.index.{index-name}:get(...)`. That is, ``get`` can be used as a convenient shorthand to get the first tuple in the tuple set that would be returned by ``select``. However, if there is more than one tuple in the tuple set, then ``get`` throws an error." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/stat.pot b/locale/en/reference/reference_lua/box_index/stat.pot new file mode 100644 index 0000000000..76ece8623f --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/stat.pot @@ -0,0 +1,109 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:5 +msgid "index_object:stat()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:11 +msgid "Return statistics about actions taken that affect the index." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:13 +msgid "This is for use with the vinyl engine." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:15 +msgid "Some detail items in the output from ``index_object:stat()`` are:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:17 +msgid "``index_object:stat().latency`` -- timings subdivided by percentages;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:18 +msgid "``index_object:stat().bytes`` -- the number of bytes total;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:19 +msgid "``index_object:stat().disk.rows`` -- the approximate number of tuples in each range;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:20 +msgid "``index_object:stat().disk.statement`` -- counts of inserts|updates|upserts|deletes;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:21 +msgid "``index_object:stat().disk.compaction`` -- counts of compactions and their amounts;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:22 +msgid "``index_object:stat().disk.dump`` -- counts of dumps and their amounts;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:23 +msgid "``index_object:stat().disk.iterator.bloom`` -- counts of bloom filter hits|misses;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:24 +msgid "``index_object:stat().disk.pages`` -- the size in pages;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:25 +msgid "``index_object:stat().disk.last_level`` -- size of data in the last LSM tree level;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:26 +msgid "``index_object:stat().cache.evict`` -- number of evictions from the cache;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:27 +msgid "``index_object:stat().range_size`` -- maximum number of bytes in a range;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:28 +msgid "``index_object:stat().dumps_per_compaction`` -- average number of dumps required to trigger major compaction in any range of the LSM tree." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:30 +msgid "Summary index statistics are also available via :ref:`box.stat.vinyl() `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:33 +msgid "an :ref:`object reference `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:36 +msgid "statistics" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/stat.rst:37 +msgid "table" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/tuple_pos.pot b/locale/en/reference/reference_lua/box_index/tuple_pos.pot new file mode 100644 index 0000000000..ad0e8ffbc8 --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/tuple_pos.pot @@ -0,0 +1,97 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/tuple_pos.rst:5 +msgid "index_object:tuple_pos()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/tuple_pos.rst:11 +msgid "Return a tuple's position for an index. This value can be passed to the ``after`` option of the ``select`` and ``pairs`` methods:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/tuple_pos.rst:14 +msgid ":ref:`index_object:select ` and :ref:`space_object:select `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/tuple_pos.rst:15 +msgid ":ref:`index_object:pairs ` and :ref:`space_object:pairs `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/tuple_pos.rst:17 +msgid "Note that ``tuple_pos`` does not work with :ref:`functional ` and multikey indexes." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/tuple_pos.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/tuple_pos.rst:19 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/tuple_pos.rst:21 +msgid "a tuple whose position should be found" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/tuple_pos.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/tuple_pos.rst:23 +msgid "a tuple's position in a space" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/tuple_pos.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/tuple_pos.rst:24 +msgid "base64-encoded string" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/tuple_pos.rst:27 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/tuple_pos.rst:29 +msgid "To try out this example, you need to bootstrap a Tarantool instance as described in :ref:`Using data operations `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/tuple_pos.rst:32 +msgid "-- Insert test data --\n" +"tarantool> bands:insert{1, 'Roxette', 1986}\n" +" bands:insert{2, 'Scorpions', 1965}\n" +" bands:insert{3, 'Ace of Base', 1987}\n" +" bands:insert{4, 'The Beatles', 1960}\n" +" bands:insert{5, 'Pink Floyd', 1965}\n" +" bands:insert{6, 'The Rolling Stones', 1962}\n" +"---\n" +"...\n" +"\n" +"-- Get a tuple's position --\n" +"tarantool> position = bands.index.primary:tuple_pos({3, 'Ace of Base', 1987})\n" +"---\n" +"...\n" +"-- Pass the tuple's position as the 'after' parameter --\n" +"tarantool> bands:select({}, {limit = 3, after = position})\n" +"---\n" +"- - [4, 'The Beatles', 1960]\n" +" - [5, 'Pink Floyd', 1965]\n" +" - [6, 'The Rolling Stones', 1962]\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/type.pot b/locale/en/reference/reference_lua/box_index/type.pot new file mode 100644 index 0000000000..32b09dd38d --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/type.pot @@ -0,0 +1,37 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/type.rst:5 +msgid "index_object.type" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/type.rst:11 +msgid "The :ref:`index type `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/type.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/type.rst:13 +msgid "string" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/type.rst:15 +msgid "**See also:** :ref:`index_opts.type `" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/unique.pot b/locale/en/reference/reference_lua/box_index/unique.pot new file mode 100644 index 0000000000..5f1896ead8 --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/unique.pot @@ -0,0 +1,37 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/unique.rst:5 +msgid "index_object.unique" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/unique.rst:11 +msgid "``true`` if the index is unique, ``false`` if the index is not unique." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/unique.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/unique.rst:13 +msgid "boolean" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/unique.rst:15 +msgid "**See also:** :ref:`index_opts.unique `" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/update.pot b/locale/en/reference/reference_lua/box_index/update.pot new file mode 100644 index 0000000000..72b5fca861 --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/update.pot @@ -0,0 +1,77 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/update.rst:5 +msgid "index_object:update()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/update.rst:11 +msgid "Update a tuple." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/update.rst:13 +msgid "Same as :ref:`box.space...update() `, but key is searched in this index instead of primary key. This index should be unique." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/update.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/update.rst:17 +msgid "an :ref:`object reference `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/update.rst:19 +msgid "values to be matched against the index key" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/update.rst:20 +msgid "operation type represented in string" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/update.rst:21 +msgid "what field the operation will apply to. The field number can be negative, meaning the position from the end of tuple. (#tuple + negative field number + 1)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/update.rst:25 +msgid "what value will be applied" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/update.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/update.rst:27 +msgid "the updated tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/update.rst:28 +msgid "nil if the key is not found" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/update.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/update.rst:29 +msgid "tuple or nil" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/update.rst:31 +msgid "Since Tarantool 2.3 a tuple can also be updated via :ref:`JSON paths`." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_index/user_defined.pot b/locale/en/reference/reference_lua/box_index/user_defined.pot new file mode 100644 index 0000000000..973486c697 --- /dev/null +++ b/locale/en/reference/reference_lua/box_index/user_defined.pot @@ -0,0 +1,113 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_index/user_defined.rst:5 +msgid "index_object extensions" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/user_defined.rst:7 +msgid "You can extend ``index_object`` with custom functions as follows:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/user_defined.rst:9 +msgid "Create a Lua function." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/user_defined.rst:10 +msgid "Add the function name to a predefined global variable, which has the ``table`` type." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/user_defined.rst:11 +msgid "Call the function on the ``index_object``: ``index_object:function-name([parameters])``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/user_defined.rst:13 +msgid "There are three predefined global variables:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/user_defined.rst:15 +msgid "Adding to ``box_schema.index_mt`` makes the function available for all indexes." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/user_defined.rst:16 +msgid "Adding to ``box_schema.memtx_index_mt`` makes the function available for all memtx indexes." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/user_defined.rst:17 +msgid "Adding to ``box_schema.vinyl_index_mt`` makes the function available for all vinyl indexes." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/user_defined.rst:19 +msgid "Alternatively, you can make a user-defined function available for only one index by calling ``getmetatable(index_object)`` and then adding the function name to the meta table." +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/user_defined.rst:24 +msgid "**Example 1:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/user_defined.rst:26 +msgid "The example below shows how to extend all memtx indexes with the custom function:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/user_defined.rst:28 +msgid "box.schema.space.create('tester1', { engine = 'memtx' })\n" +"box.space.tester1:create_index('index1')\n" +"global_counter = 5\n" +"\n" +"-- Create a custom function.\n" +"function increase_global_counter()\n" +" global_counter = global_counter + 1\n" +"end\n" +"\n" +"-- Extend all memtx indexes with the created function.\n" +"box.schema.memtx_index_mt.increase_global_counter = increase_global_counter\n" +"\n" +"-- Call the 'increase_global_counter' function on 'index1'\n" +"-- to change the 'global_counter' value from 5 to 6.\n" +"box.space.tester1.index.index1:increase_global_counter()\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/user_defined.rst:33 +msgid "**Example 2:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/user_defined.rst:35 +msgid "The example below shows how to extend the specified index with the custom function with parameters:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_index/user_defined.rst:37 +msgid "box.schema.space.create('tester2', { engine = 'memtx', id = 1000 })\n" +"box.space.tester2:create_index('index2')\n" +"local_counter = 0\n" +"\n" +"-- Create a custom function.\n" +"function increase_local_counter(i_arg, param)\n" +" local_counter = local_counter + param + i_arg.space_id\n" +"end\n" +"\n" +"-- Extend only the 'index2' index with the created function.\n" +"box.schema.memtx_index_mt.increase_local_counter = increase_local_counter\n" +"meta = getmetatable(box.space.tester2.index.index2)\n" +"meta.increase_local_counter = increase_local_counter\n" +"\n" +"-- Call the 'increase_local_counter' function on 'index2'\n" +"-- to change the 'local_counter' value from 0 to 1005.\n" +"box.space.tester2.index.index2:increase_local_counter(5)\n" +"" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_info.pot b/locale/en/reference/reference_lua/box_info.pot new file mode 100644 index 0000000000..92241a9dbf --- /dev/null +++ b/locale/en/reference/reference_lua/box_info.pot @@ -0,0 +1,209 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_info.rst:5 +msgid "Submodule box.info" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:9 +msgid "The ``box.info`` submodule provides access to information about server instance variables." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:12 +msgid "**cluster.uuid** is the UUID of the replica set. Every instance in a replica set will have the same ``cluster.uuid`` value. This value is also stored in :ref:`box.space._schema ` system space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:16 +msgid "**gc()** returns the state of the :ref:`Tarantool garbage collector ` including the checkpoints and their consumers (users); see details :doc:`here `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:20 +msgid "**id** corresponds to :samp:`replication[{n}].id` (see :doc:`here `)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:22 +msgid "**lsn** corresponds to :samp:`replication[{n}].lsn` (see :doc:`here `)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:24 +msgid "**listen** returns a real address to which an instance was bound (see :doc:`here `)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:26 +msgid "**memory()** returns the statistics about memory (see :doc:`here `)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:28 +msgid "**pid** is the process ID. This value is also shown by :ref:`tarantool ` module and by the Linux command ``ps -A``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:31 +msgid "**ro** is ``true`` if the instance is in read-only mode (same as :ref:`read_only ` in ``box.cfg{}``), or if status is 'orphan'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:34 +msgid "**ro_reason** is ``nil`` if the instance is in writable mode. When the field is not ``nil``, it contains the reason why the instance is read-only. Possible error reasons: ``election``, ``synchro``, ``config``, and ``orphan`` (see :ref:`box.info.ro_reason ` for details)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:38 +msgid "**signature** is the sum of all ``lsn`` values from each :ref:`vector clock ` (**vclock**) for all instances in the replica set." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:40 +msgid "**sql().cache.size** is the number of bytes in the SQL prepared statement cache." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:41 +msgid "**sql().cache.stmt_count** is the number of statements in the SQL prepared statement cache." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:42 +msgid "**status** is the current state of the instance. It can be:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:44 +msgid "``running`` -- the instance is loaded," +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:45 +msgid "``loading`` -- the instance is either recovering xlogs/snapshots or bootstrapping," +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:46 +msgid "``orphan`` -- the instance has not (yet) succeeded in joining the required number of masters (see :ref:`orphan status `)," +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:48 +msgid "``hot_standby`` -- the instance is :ref:`standing by ` another instance." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:49 +msgid "**uptime** is the number of seconds since the instance started. This value can also be retrieved with :ref:`tarantool.uptime() `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:52 +msgid "**uuid** corresponds to :samp:`replication[{n}].uuid` (see :doc:`here `)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:54 +msgid "**vclock** is a table with the vclock values of all instances in a replica set which have made data changes." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:55 +msgid "**version** is the Tarantool version. This value is also shown by :ref:`tarantool -V `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:57 +msgid "**vinyl()** returns runtime statistics for the vinyl storage engine. This function is deprecated, use :ref:`box.stat.vinyl() ` instead." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:60 +msgid "**election** shows the current state of a replica set node regarding leader election (see :doc:`here `)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:63 +msgid "Below is a list of all ``box.info`` functions and members." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:74 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:75 +msgid "Use" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:77 +msgid ":doc:`./box_info/info`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:78 +msgid "Return all keys and values provided in the submodule" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:80 +msgid ":doc:`./box_info/gc`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:81 +msgid "Return info about garbage collector" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:83 +msgid ":doc:`./box_info/memory`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:84 +msgid "Return info about memory usage" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:86 +msgid ":doc:`./box_info/replication_anon`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:87 +msgid "List all the anonymous replicas following the instance" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:89 +msgid ":doc:`./box_info/replication`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:90 +msgid "Return statistics for all instances in the replica set" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:92 +msgid ":doc:`./box_info/listen`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:93 +msgid "Return a real address to which an instance was bound" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:95 +msgid ":doc:`./box_info/election`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:96 +msgid "Show the current state of a replica set node in regards to leader election" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:99 +msgid ":doc:`./box_info/synchro`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:100 +msgid "Show the current state of synchronous replication" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:102 +msgid ":doc:`./box_info/ro_reason`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:103 +msgid "Show the current mode of an instance (writable or read-only)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:105 +msgid ":doc:`./box_info/schema_version`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info.rst:106 +msgid "Show the database schema version" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_info/election.pot b/locale/en/reference/reference_lua/box_info/election.pot new file mode 100644 index 0000000000..9b0c80a97a --- /dev/null +++ b/locale/en/reference/reference_lua/box_info/election.pot @@ -0,0 +1,77 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-07 07:21+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_info/election.rst:5 +msgid "box.info.election" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/election.rst:11 +msgid "Since version :doc:`2.6.1 `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/election.rst:13 +msgid "Show the current state of a replica set node in regards to :ref:`leader election `. The following information is provided:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/election.rst:16 +msgid "``state`` -- the election state (mode) of the node. Possible values are ``leader``, ``follower``, or ``candidate``. For more details, refer to description of the :ref:`leader election process `. When :ref:`replication.failover ` is set to ``election``, the node is writable only in the ``leader`` state." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/election.rst:20 +msgid "``term`` -- the current election term." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/election.rst:22 +msgid "``vote`` -- the ID of a node the current node votes for. If the value is ``0``, it means the node hasn't voted in the current term yet." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/election.rst:24 +msgid "``leader`` -- a leader node ID in the current term. If the value is ``0``, it means the node doesn't know which node is the leader in the current term." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/election.rst:26 +msgid "``leader_name`` -- a leader name. Returns ``nil`` if there is no leader in a cluster or :ref:`box.NULL ` if a leader does not have a name. Since version :doc:`3.0.0 `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/election.rst:28 +msgid "``leader_idle`` -- time in seconds since the last interaction with the known leader. Since version :doc:`2.10.0 `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/election.rst:32 +msgid "IDs in the ``box.info.election`` output are the replica IDs visible in the ``box.info.id`` output on each node and in the ``_cluster`` space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/election.rst:34 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/election.rst:36 +msgid "auto_leader:instance001> box.info.election\n" +"---\n" +"- leader_idle: 0\n" +" leader_name: instance001\n" +" state: leader\n" +" vote: 2\n" +" term: 3\n" +" leader: 2\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/election.rst:48 +msgid "See also: :ref:`Master-replica: automated failover `." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_info/gc.pot b/locale/en/reference/reference_lua/box_info/gc.pot new file mode 100644 index 0000000000..79ad62b2f1 --- /dev/null +++ b/locale/en/reference/reference_lua/box_info/gc.pot @@ -0,0 +1,57 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_info/gc.rst:5 +msgid "box.info.gc()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/gc.rst:11 +msgid "The **gc** function of ``box.info`` gives the ``admin`` user a picture of the factors that affect the :ref:`Tarantool garbage collector `. The garbage collector compares vclock (:ref:`vector clock `) values of users and checkpoints, so a look at ``box.info.gc()`` may show why the garbage collector has not removed old WAL files, or show what it may soon remove." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/gc.rst:18 +msgid "**gc().consumers** -- a list of users whose requests might affect the garbage collector." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/gc.rst:19 +msgid "**gc().checkpoints** -- a list of preserved checkpoints." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/gc.rst:20 +msgid "**gc().checkpoints[n].references** -- a list of references to a checkpoint." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/gc.rst:21 +msgid "**gc().checkpoints[n].vclock** -- a checkpoint's vclock value." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/gc.rst:22 +msgid "**gc().checkpoints[n].signature** -- a sum of a checkpoint's vclock's components." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/gc.rst:23 +msgid "**gc().checkpoint_is_in_progress** -- true if a checkpoint is in progress, otherwise false" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/gc.rst:24 +msgid "**gc().vclock** -- the garbage collector's vclock." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/gc.rst:25 +msgid "**gc().signature** -- the sum of the garbage collector's checkpoint's components." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_info/info.pot b/locale/en/reference/reference_lua/box_info/info.pot new file mode 100644 index 0000000000..b0515977a0 --- /dev/null +++ b/locale/en/reference/reference_lua/box_info/info.pot @@ -0,0 +1,78 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_info/info.rst:5 +msgid "box.info()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/info.rst:11 +msgid "Since ``box.info`` contents are dynamic, it's not possible to iterate over keys with the Lua ``pairs()`` function. For this purpose, ``box.info()`` builds and returns a Lua table with all keys and values provided in the submodule." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/info.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/info.rst:16 +msgid "keys and values in the submodule" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/info.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/info.rst:17 +msgid "table" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/info.rst:19 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/info.rst:21 +msgid "This example is for a master-replica set that contains one master instance and one replica instance. The request was issued at the replica instance." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/info.rst:24 +msgid "tarantool> box.info()\n" +"---\n" +"- version: 2.4.0-251-gc44ed3c08\n" +" id: 1\n" +" ro: false\n" +" uuid: 1738767b-afa3-4987-b485-c333cf83415b\n" +" package: Tarantool\n" +" cluster:\n" +" uuid: 40ee7f0f-7070-4650-8883-801e7014407c\n" +" listen: '[::1]:57122'\n" +" replication:\n" +" 1:\n" +" id: 1\n" +" uuid: 1738767b-afa3-4987-b485-c333cf83415b\n" +" lsn: 16\n" +" signature: 16\n" +" status: running\n" +" vinyl: []\n" +" uptime: 21\n" +" lsn: 16\n" +" sql: []\n" +" gc: []\n" +" pid: 20293\n" +" memory: []\n" +" vclock: {1: 16}\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_info/listen.pot b/locale/en/reference/reference_lua/box_info/listen.pot new file mode 100644 index 0000000000..965d367dda --- /dev/null +++ b/locale/en/reference/reference_lua/box_info/listen.pot @@ -0,0 +1,59 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_info/listen.rst:5 +msgid "box.info.listen" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/listen.rst:11 +msgid "Since version :doc:`2.4.1 `. Return a real address to which an instance was bound. For example, if ``box.cfg{listen}`` was set with a zero port, ``box.info.listen`` will show a real port. The address is stored as a string:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/listen.rst:16 +msgid "unix/: for UNIX domain sockets" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/listen.rst:17 +msgid ": for IPv4" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/listen.rst:18 +msgid "[ip]: for IPv6" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/listen.rst:20 +msgid "If an instance does not listen to anything, ``box.info.listen`` is nil." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/listen.rst:22 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/listen.rst:24 +msgid "tarantool> box.cfg{listen=0}\n" +"---\n" +"...\n" +"tarantool> box.cfg.listen\n" +"---\n" +"- '0'\n" +"...\n" +"tarantool> box.info.listen\n" +"---\n" +"- 0.0.0.0:44149\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_info/memory.pot b/locale/en/reference/reference_lua/box_info/memory.pot new file mode 100644 index 0000000000..711b23a14f --- /dev/null +++ b/locale/en/reference/reference_lua/box_info/memory.pot @@ -0,0 +1,69 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_info/memory.rst:5 +msgid "box.info.memory()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/memory.rst:11 +msgid "The **memory** function of ``box.info`` gives the ``admin`` user a picture of the whole Tarantool instance." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/memory.rst:16 +msgid "To get a picture of the vinyl subsystem, use :ref:`box.stat.vinyl() ` instead." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/memory.rst:19 +msgid "**memory().cache** -- number of bytes used for caching user data. The memtx storage engine does not require a cache, so in fact this is the number of bytes in the cache for the tuples stored for the vinyl storage engine." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/memory.rst:23 +msgid "**memory().data** -- number of bytes used for storing user data (the tuples) with the memtx engine and with level 0 of the vinyl engine, without taking memory fragmentation into account." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/memory.rst:26 +msgid "**memory().index** -- number of bytes used for indexing user data, including memtx and vinyl memory tree extents, the vinyl page index, and the vinyl bloom filters." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/memory.rst:29 +msgid "**memory().lua** -- number of bytes used for Lua runtime." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/memory.rst:30 +msgid "**memory().net** -- number of bytes used for network input/output buffers." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/memory.rst:31 +msgid "**memory().tx** -- number of bytes in use by active transactions. For the vinyl storage engine, this is the total size of all allocated objects (struct ``txv``, struct ``vy_tx``, struct ``vy_read_interval``) and tuples pinned for those objects." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/memory.rst:36 +msgid "An example with a minimum allocation while only the memtx storage engine is in use:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/memory.rst:39 +msgid "tarantool> box.info.memory()\n" +"---\n" +"- cache: 0\n" +" data: 6552\n" +" tx: 0\n" +" lua: 1315567\n" +" net: 98304\n" +" index: 1196032\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_info/replication.pot b/locale/en/reference/reference_lua/box_info/replication.pot new file mode 100644 index 0000000000..82692d4b85 --- /dev/null +++ b/locale/en/reference/reference_lua/box_info/replication.pot @@ -0,0 +1,153 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:5 +msgid "box.info.replication" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:11 +msgid "The **replication** section of ``box.info()`` is a table with statistics for all instances in the replica set that the current instance belongs to. To see the example, refer to :ref:`Monitoring a replica set `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:14 +msgid "In the following, *n* is the index number of one table item, for example, :samp:`replication[1]`, which has data about server instance number 1, which may or may not be the same as the current instance (the \"current instance\" is what is responding to ``box.info``)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:19 +msgid ":samp:`replication[{n}].id` is a short numeric identifier of instance *n* within the replica set. This value is stored in the :ref:`box.space._cluster ` system space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:23 +msgid ":samp:`replication[{n}].uuid` is a globally unique identifier of instance *n*. This value is stored in the :ref:`box.space._cluster ` system space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:26 +msgid ":samp:`replication[{n}].lsn` is the :ref:`log sequence number ` (LSN) for the latest entry in instance *n*'s :ref:`write-ahead log ` (WAL)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:30 +msgid ":samp:`replication[{n}].upstream` appears (is not ``nil``) if the current instance is following or intending to follow instance *n*, which ordinarily means :samp:`replication[{n}].upstream.status` = ``follow``, :samp:`replication[{n}].upstream.peer` = url of instance *n* which is being followed, :samp:`replication[{n}].lag and idle` = the instance's speed, described later. Another way to say this is: :samp:`replication[{n}].upstream` will appear when :samp:`replication[{n}].upstream.peer` is not of the current instance, and is not read-only, and was specified in ``box.cfg{replication={...}}``, so it is shown in :ref:`box.cfg.replication `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:41 +msgid ":samp:`replication[{n}].upstream.status` is the replication status of the connection with the instance *n*:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:44 +msgid "``connect``: an instance is connecting to the master." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:45 +msgid "``auth``: :ref:`authentication ` is being performed." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:46 +msgid "``wait_snapshot``: an instance is receiving metadata from the master. If join fails with a non-critical :ref:`error ` at this stage (for example, ``ER_READONLY``, ``ER_ACCESS_DENIED``, or a network-related issue), an instance tries to find a new master to join." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:47 +msgid "``fetch_snapshot``: an instance is receiving data from the master's ``.snap`` files." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:48 +msgid "``final_join``: an instance is receiving new data added during ``fetch_snapshot``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:49 +msgid "``sync``: the master and replica are synchronizing to have the same data." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:50 +msgid "``follow``: the current instance's role is **replica**. This means that the instance is read-only or acts as a replica for this remote peer in :ref:`master-master ` configuration. The instance is receiving or able to receive data from the instance *n*'s (upstream) master." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:53 +msgid "``stopped``: replication is stopped due to a replication error (for example, :ref:`duplicate key `)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:55 +msgid "``disconnected``: an instance is not connected to the replica set (for example, due to network issues, not replication errors)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:58 +msgid "Learn more from :ref:`Replication stages `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:62 +msgid ":samp:`replication[{n}].upstream.idle` is the time (in seconds) since the last event was received. This is the primary indicator of replication health. Learn more from :ref:`Monitoring a replica set `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:69 +msgid ":samp:`replication[{n}].upstream.peer` contains instance *n*'s :ref:`URI `, for example, 127.0.0.1:3302. Learn more from :ref:`Monitoring a replica set `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:75 +msgid ":samp:`replication[{n}].upstream.lag` is the time difference between the local time of instance *n*, recorded when the event was received, and the local time at another master recorded when the event was written to the :ref:`write-ahead log ` on that master. Learn more from :ref:`Monitoring a replica set `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:81 +msgid ":samp:`replication[{n}].upstream.message` contains an error message in case of a :ref:`degraded state `; otherwise, it is ``nil``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:84 +msgid ":samp:`replication[{n}].downstream` appears (is not ``nil``) with data about an instance that is following instance *n* or is intending to follow it, which ordinarily means :samp:`replication[{n}].downstream.status` = ``follow``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:89 +msgid ":samp:`replication[{n}].downstream.vclock` contains the :ref:`vector clock `, which is a table of '**id**, **lsn**' pairs, for example, :code:`vclock: {1: 3054773, 4: 8938827, 3: 285902018}`. (Notice that the table may have multiple pairs although ``vclock`` is a singular name)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:96 +msgid "Even if instance *n* is :ref:`removed `, its values will still appear here; however, its values will be overridden if an instance joins later with the same UUID. Vector clock pairs will only appear if ``lsn > 0``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:101 +msgid ":samp:`replication[{n}].downstream.vclock` may be the same as the current instance's vclock (``box.info.vclock``) because this is for all known vclock values of the cluster. A master will know what is in a replica's copy of vclock because, when the master makes a data change, it sends the change information to the replica (including the master's vector clock), and the replica replies with what is in its entire vector clock table." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:110 +msgid "A replica also sends its entire vector clock table in response to a master's heartbeat message, see the heartbeat-message examples in the section :ref:`Binary protocol -- replication `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:114 +msgid ":samp:`replication[{n}].downstream.idle` is the time (in seconds) since the last time that instance *n* sent events through the downstream replication." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:117 +msgid ":samp:`replication[{n}].downstream.status` is the replication status for downstream replications:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:120 +msgid "``stopped`` means that downstream replication has stopped," +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:121 +msgid "``follow`` means that downstream replication is in progress (instance *n* is ready to accept data from the master or is currently doing so)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:124 +msgid ":samp:`replication[{n}].downstream.lag` is the time difference between the local time at the master node, recorded when a particular transaction was written to the :ref:`write-ahead log `, and the local time recorded when it receives an acknowledgment for this transaction from a replica. Since version :doc:`2.10.0 `. See more in :ref:`Monitoring a replica set `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:131 +msgid ":samp:`replication[{n}].downstream.message` and :samp:`replication[{n}].downstream.system_message` will be ``nil`` unless a problem occurs with the connection. For example, if instance *n* goes down, then one may see ``status = 'stopped'``, ``message = 'unexpected EOF when reading from socket'``, and ``system_message = 'Broken pipe'``. See also :ref:`degraded state `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication.rst:140 +msgid "For better understanding, see the following diagram illustrating the ``upstream`` and ``downstream`` connections within the replica set of three instances:" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_info/replication_anon.pot b/locale/en/reference/reference_lua/box_info/replication_anon.pot new file mode 100644 index 0000000000..2ddc52e3a0 --- /dev/null +++ b/locale/en/reference/reference_lua/box_info/replication_anon.pot @@ -0,0 +1,68 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_info/replication_anon.rst:5 +msgid "box.info.replication_anon()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication_anon.rst:11 +msgid "List all the :ref:`anonymous replicas ` following the instance." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication_anon.rst:14 +msgid "The output is similar to the one produced by ``box.info.replication`` with an exception that anonymous replicas are indexed by their uuid strings rather than server ids, since server ids have no meaning for anonymous replicas." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication_anon.rst:19 +msgid "Notice that when you issue a plain ``box.info.replication_anon``, the only info returned is the number of anonymous replicas following the current instance. In order to see the full stats, you have to call ``box.info.replication_anon()``. This is done to not overload the ``box.info`` output with excess info, since there may be lots of anonymous replicas." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication_anon.rst:25 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication_anon.rst:27 +msgid "tarantool> box.info.replication_anon\n" +"---\n" +"- count: 2\n" +"...\n" +"\n" +"tarantool> box.info.replication_anon()\n" +"---\n" +"- 3a6a2cfb-7e47-42f6-8309-7a25c37feea1:\n" +" id: 0\n" +" uuid: 3a6a2cfb-7e47-42f6-8309-7a25c37feea1\n" +" lsn: 0\n" +" downstream:\n" +" status: follow\n" +" idle: 0.76203499999974\n" +" vclock: {1: 1}\n" +" f58e4cb0-e0a8-42a1-b439-591dd36c8e5e:\n" +" id: 0\n" +" uuid: f58e4cb0-e0a8-42a1-b439-591dd36c8e5e\n" +" lsn: 0\n" +" downstream:\n" +" status: follow\n" +" idle: 0.0041349999992235\n" +" vclock: {1: 1}\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/replication_anon.rst:54 +msgid "Notice that anonymous replicas hide their ``lsn`` from the others, so an anonymous replica ``lsn`` will always be reported as zero, even if an anonymous replica performs some local space operations. To find out the ``lsn`` of a specific anonymous replica, you have to issue ``box.info.lsn`` on it." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_info/ro_reason.pot b/locale/en/reference/reference_lua/box_info/ro_reason.pot new file mode 100644 index 0000000000..10e99a20a2 --- /dev/null +++ b/locale/en/reference/reference_lua/box_info/ro_reason.pot @@ -0,0 +1,64 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_info/ro_reason.rst:5 +msgid "box.info.ro_reason" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/ro_reason.rst:11 +msgid "Since :doc:`2.10.0 `. Show the current mode of an instance (writable or read-only). Contains ``nil`` if the instance is in writable mode. When the field is not ``nil``, reports the reason why the instance is read-only." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/ro_reason.rst:16 +msgid "Possible error reasons:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/ro_reason.rst:18 +msgid "``election`` -- the instance is not the leader. That is, ``box.cfg.election_mode`` is not ``off``. See :ref:`box.info.election ` for details." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/ro_reason.rst:22 +msgid "``synchro`` -- the instance is not the owner of the synchronous transaction queue. For details, see :ref:`box.info.synchro `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/ro_reason.rst:25 +msgid "``config`` -- the server instance is in read-only mode. That is, :ref:`box.cfg.read_only ` is ``true``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/ro_reason.rst:28 +msgid "``orphan`` -- the instance is in ``orphan`` state. For details, see :ref:`the orphan status page `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/ro_reason.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/ro_reason.rst:31 +msgid "string" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/ro_reason.rst:33 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/ro_reason.rst:35 +msgid "tarantool> box.info.ro_reason\n" +"---\n" +"- null\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_info/schema_version.pot b/locale/en/reference/reference_lua/box_info/schema_version.pot new file mode 100644 index 0000000000..f0dd2bffa5 --- /dev/null +++ b/locale/en/reference/reference_lua/box_info/schema_version.pot @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-21 08:10+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_info/schema_version.rst:4 +msgid "box.info.schema_version" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/schema_version.rst:10 +msgid "Since :doc:`2.11.0 `. Show the database schema version. A schema version is a number that indicates whether the :ref:`database schema ` is changed. For example, the ``schema_version`` value grows if a :ref:`space ` or :ref:`index ` is added or deleted, or a space, index, or field name is changed." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/schema_version.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/schema_version.rst:15 +msgid "number" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/schema_version.rst:17 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/schema_version.rst:19 +msgid "tarantool> box.info.schema_version\n" +"---\n" +"- 84\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/schema_version.rst:26 +msgid "See also: :ref:`IPROTO_SCHEMA_VERSION `" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_info/synchro.pot b/locale/en/reference/reference_lua/box_info/synchro.pot new file mode 100644 index 0000000000..0862e01b5b --- /dev/null +++ b/locale/en/reference/reference_lua/box_info/synchro.pot @@ -0,0 +1,170 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:5 +msgid "box.info.synchro" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:11 +msgid "Since version :doc:`2.8.1 `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:13 +msgid "Show the current state of synchronous replication." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:15 +msgid "In :ref:`synchronous replication `, transaction is considered committed only after achieving the required quorum number. While transactions are collecting confirmations from remote nodes, these transactions are waiting in the queue." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:19 +msgid "The following information is provided:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:21 +msgid "``queue``:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:23 +msgid "``owner`` (since version :doc:`2.10.0 `) -- ID of the replica that owns the synchronous transaction queue. Once an owner instance appears, all other instances become read-only. If the ``owner`` field is ``0``, then every instance may be writable, but they can't create any synchronous transactions. To claim or reclaim the queue, use :ref:`box.ctl.promote() ` on the instance that you want to promote. With elections enabled, an instance runs ``box.ctl.promote()`` command automatically after winning the elections. To clear the ownership, call :ref:`box.ctl.demote() ` on the synchronous queue owner." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:32 +msgid "``term`` (since version :doc:`2.10.0 `) -- current queue term. It contains the term of the last ``PROMOTE`` request. Usually, it is equal to :ref:`box.info.election.term `. However, the queue term value may be less than the election term. It can happen when a new round of elections has started, but no instance has been promoted yet." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:38 +msgid "``len`` -- the number of entries that are currently waiting in the queue." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:40 +msgid "``busy`` (since version :doc:`2.10.0 `) -- the boolean value is ``true`` when the instance is processing or writing some system request that modifies the queue (for example, ``PROMOTE``, ``CONFIRM``, or ``ROLLBACK``). Until the request is complete, any other incoming synchronous transactions and system requests will be delayed." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:46 +msgid "``quorum`` -- the resulting value of the :ref:`replication_synchro_quorum ` configuration option. Since version :doc:`2.5.3 `, the option can be set as a dynamic formula. In this case, the value of the ``quorum`` member depends on the current number of replicas." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:51 +msgid "**Example 1:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:53 +msgid "In this example, the ``quorum`` field is equal to ``1``. That is, synchronous transactions work like asynchronous ones. `1` means that a successful WAL writing to the master is enough to commit." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:57 +msgid "tarantool> box.info.synchro\n" +"---\n" +"- queue:\n" +" owner: 1\n" +" term: 2\n" +" len: 0\n" +" busy: false\n" +" quorum: 1\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:69 +msgid "**Example 2:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:71 +msgid "First, set a quorum number and a timeout for synchronous replication using the following command:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:73 +msgid "tarantool> box.cfg{\n" +" > replication_synchro_quorum=2,\n" +" > replication_synchro_timeout=1000\n" +" > }" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:80 +msgid "Next, check the current state of synchronous replication:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:82 +msgid "tarantool> box.info.synchro\n" +"---\n" +"- queue:\n" +" owner: 1\n" +" term: 2\n" +" len: 0\n" +" busy: false\n" +" quorum: 2\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:94 +msgid "Create a space called ``sync`` and enable synchronous replication on this space. Then, create an index." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:97 +msgid "tarantool> s = box.schema.space.create(\"sync\", {is_sync=true})\n" +"tarantool> _ = s:create_index('pk')" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:102 +msgid "After that, use ``box.ctl.promote()`` function to claim a queue:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:104 +msgid "tarantool> box.ctl.promote()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:108 +msgid "Next, perform data manipulations:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:110 +msgid "tarantool> require('fiber').new(function() box.space.sync:replace{1} end)\n" +"---\n" +"- status: suspended\n" +" name: lua\n" +" id: 119\n" +"...\n" +"tarantool> require('fiber').new(function() box.space.sync:replace{1} end)\n" +"---\n" +"- status: suspended\n" +" name: lua\n" +" id: 120\n" +"...\n" +"tarantool> require('fiber').new(function() box.space.sync:replace{1} end)\n" +"---\n" +"- status: suspended\n" +" name: lua\n" +" id: 121\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:131 +msgid "If you call the ``box.info.synchro`` command again, you will see that now there are 3 transactions waiting in the queue:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_info/synchro.rst:134 +msgid "tarantool> box.info.synchro\n" +"---\n" +"- queue:\n" +" owner: 1\n" +" term: 2\n" +" len: 3\n" +" busy: false\n" +" quorum: 2\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_iproto.pot b/locale/en/reference/reference_lua/box_iproto.pot new file mode 100644 index 0000000000..69a1fa6db6 --- /dev/null +++ b/locale/en/reference/reference_lua/box_iproto.pot @@ -0,0 +1,254 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-21 08:10+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_iproto.rst:4 +msgid "Submodule box.iproto" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:6 +msgid "Since :doc:`2.11.0 `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:8 +msgid "The ``box.iproto`` submodule provides the ability to work with the network subsystem of Tarantool. It allows you to extend the :ref:`IPROTO ` functionality from Lua. With this submodule, you can:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:12 +msgid ":ref:`parse unknown IPROTO request types `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:13 +msgid ":ref:`send arbitrary IPROTO packets `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:14 +msgid ":ref:`override the behavior ` of the existing and unknown request types in the binary protocol" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:16 +msgid "The submodule exports all IPROTO :ref:`constants ` and :ref:`features ` to Lua." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:21 +msgid "IPROTO constants" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:23 +msgid "IPROTO constants in the ``box.iproto`` namespace are written in uppercase letters without the ``IPROTO_`` prefix. The constants are divided into several groups:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:26 +msgid ":ref:`key `. Example: :ref:`IPROTO_SYNC `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:27 +msgid ":ref:`request type `. Example: :ref:`IPROTO_OK `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:28 +msgid ":ref:`flag `. Example: :ref:`IPROTO_COMMIT `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:29 +msgid ":ref:`ballot key `. Example: :ref:`IPROTO_FLAG_COMMIT `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:30 +msgid ":ref:`metadata key `. Example: :ref:`IPROTO_FIELD_IS_NULLABLE `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:31 +msgid ":ref:`RAFT key `. Example: :ref:`IPROTO_TERM `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:33 +msgid "Each group is located in the corresponding subnamespace without the prefix. For example:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:36 +msgid "box.iproto.key.SYNC = 0x01\n" +"-- ...\n" +"box.iproto.type.SELECT = 1\n" +"-- ...\n" +"box.iproto.flag.COMMIT = 1\n" +"-- ...\n" +"box.iproto.ballot_key.VCLOCK = 2\n" +"-- ...\n" +"box.iproto.metadata_key.IS_NULLABLE = 3\n" +"-- ...\n" +"box.iproto.raft_key.TERM = 0\n" +"-- ..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:54 +msgid "IPROTO features" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:56 +msgid "The submodule exports:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:58 +msgid "the current IPROTO protocol version (:ref:`box.iproto.protocol_version `)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:59 +msgid "the set of IPROTO protocol features supported by the server (:ref:`box.iproto.protocol_features `)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:60 +msgid "IPROTO protocol features with the corresponding code (:ref:`box.iproto.feature `)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:62 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:64 +msgid "The example converts the feature names from ``box.iproto.protocol_features`` set into codes:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:66 +msgid "-- Features supported by the server\n" +"box.iproto.protocol_features = {\n" +" streams = true,\n" +" transactions = true,\n" +" error_extension = true,\n" +" watchers = true,\n" +" pagination = true,\n" +"}\n" +"\n" +"-- Convert the feature names into codes\n" +"features = {}\n" +"for name in pairs(box.iproto.protocol_features) do\n" +" table.insert(features, box.iproto.feature[name])\n" +"end\n" +"return features -- [0, 1, 2, 3, 4]" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:87 +msgid "Handling the unknown IPROTO request types" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:89 +msgid "Every IPROTO request has a static handler. That is, before version :doc:`2.11.0 `, any unknown request raised an error. Since :doc:`2.11.0 `, a new request type is introduced -- :ref:`IPROTO_UNKNOWN `. This type is used to override the handlers of the unknown IPROTO request types. For details, see :ref:`box.iproto.override() ` and :ref:`box_iproto_override ` functions." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:98 +msgid "API reference" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:100 +msgid "The table lists all available functions and data of the submodule:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:111 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:112 +msgid "Use" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:114 +msgid ":doc:`./box_iproto/key`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:115 +msgid "Request keys" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:117 +msgid ":doc:`./box_iproto/request_type`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:118 +msgid "Request types" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:120 +msgid ":doc:`./box_iproto/flag`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:121 +msgid "Flags from the :ref:`IPROTO_FLAGS ` key" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:123 +msgid ":doc:`./box_iproto/ballot`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:124 +msgid "Keys from the :ref:`IPROTO_BALLOT ` requests" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:126 +msgid ":doc:`./box_iproto/metadata`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:127 +msgid "Keys nested in the :ref:`IPROTO_METADATA ` key" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:129 +msgid ":doc:`./box_iproto/raft`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:130 +msgid "Keys from the ``IPROTO_RAFT_`` requests" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:132 +msgid ":doc:`./box_iproto/protocol_version`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:133 +msgid "The current IPROTO protocol version" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:135 +msgid ":doc:`./box_iproto/protocol_features`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:136 +msgid "The set of supported IPROTO protocol features" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:138 +msgid ":doc:`./box_iproto/feature`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:139 +msgid "IPROTO protocol :ref:`features `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:141 +msgid ":doc:`./box_iproto/override`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:142 +msgid "Set a new IPROTO request handler callback for the given request type" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:144 +msgid ":doc:`./box_iproto/send`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto.rst:145 +msgid "Send an IPROTO packet over the session's socket" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_iproto/ballot.pot b/locale/en/reference/reference_lua/box_iproto/ballot.pot new file mode 100644 index 0000000000..42d6e101de --- /dev/null +++ b/locale/en/reference/reference_lua/box_iproto/ballot.pot @@ -0,0 +1,40 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-21 08:10+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_iproto/ballot.rst:4 +msgid "box.iproto.ballot_key" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/ballot.rst:10 +msgid "Contains the keys from the :ref:`IPROTO_BALLOT ` requests. Learn more: :ref:`IPROTO_BALLOT keys `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/ballot.rst:13 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/ballot.rst:15 +msgid "tarantool> box.iproto.ballot_key.IS_RO_CFG\n" +"---\n" +"- 1\n" +"...\n" +"tarantool> box.iproto.ballot_key.VCLOCK\n" +"---\n" +"- 2\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_iproto/feature.pot b/locale/en/reference/reference_lua/box_iproto/feature.pot new file mode 100644 index 0000000000..818b021b40 --- /dev/null +++ b/locale/en/reference/reference_lua/box_iproto/feature.pot @@ -0,0 +1,52 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-21 08:10+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_iproto/feature.rst:4 +msgid "box.iproto.feature" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/feature.rst:10 +msgid "Contains the IPROTO protocol features that are supported by the server. Each feature is mapped to its corresponding code. Learn more: :ref:`IPROTO_FEATURES `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/feature.rst:14 +msgid "The features in the namespace are written" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/feature.rst:16 +msgid "in lowercase letters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/feature.rst:17 +msgid "without the ``IPROTO_FEATURE_`` prefix" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/feature.rst:19 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/feature.rst:21 +msgid "tarantool> box.iproto.feature.streams\n" +"---\n" +"- 0\n" +"...\n" +"tarantool> box.iproto.feature.transactions\n" +"---\n" +"- 1\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_iproto/flag.pot b/locale/en/reference/reference_lua/box_iproto/flag.pot new file mode 100644 index 0000000000..5183f90da3 --- /dev/null +++ b/locale/en/reference/reference_lua/box_iproto/flag.pot @@ -0,0 +1,40 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-21 08:10+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_iproto/flag.rst:4 +msgid "box.iproto.flag" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/flag.rst:10 +msgid "Contains the flags from the ``IPROTO_FLAGS`` key. Learn more: :ref:`IPROTO_FLAGS key `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/flag.rst:13 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/flag.rst:15 +msgid "tarantool> box.iproto.flag.COMMIT\n" +"---\n" +"- 1\n" +"...\n" +"tarantool> box.iproto.flag.WAIT_SYNC\n" +"---\n" +"- 2\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_iproto/key.pot b/locale/en/reference/reference_lua/box_iproto/key.pot new file mode 100644 index 0000000000..0ad3ecda8d --- /dev/null +++ b/locale/en/reference/reference_lua/box_iproto/key.pot @@ -0,0 +1,36 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-21 08:10+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_iproto/key.rst:4 +msgid "box.iproto.key" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/key.rst:10 +msgid "Contains all available request keys, except :ref:`raft `, :ref:`metadata `, and :ref:`ballot ` keys. Learn more: :ref:`Keys used in requests and responses `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/key.rst:14 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/key.rst:16 +msgid "tarantool> box.iproto.key.SYNC\n" +"---\n" +"- 1\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_iproto/metadata.pot b/locale/en/reference/reference_lua/box_iproto/metadata.pot new file mode 100644 index 0000000000..62a9bbd9c9 --- /dev/null +++ b/locale/en/reference/reference_lua/box_iproto/metadata.pot @@ -0,0 +1,40 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-21 08:10+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_iproto/metadata.rst:4 +msgid "box.iproto.metadata_key" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/metadata.rst:10 +msgid "Contains the ``IPROTO_FIELD_*`` keys, which are nested in the :ref:`IPROTO_METADATA ` key." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/metadata.rst:13 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/metadata.rst:15 +msgid "tarantool> box.iproto.metadata_key.NAME\n" +"---\n" +"- 0\n" +"...\n" +"tarantool> box.iproto.metadata_key.TYPE\n" +"---\n" +"- 1\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_iproto/override.pot b/locale/en/reference/reference_lua/box_iproto/override.pot new file mode 100644 index 0000000000..0842dcc299 --- /dev/null +++ b/locale/en/reference/reference_lua/box_iproto/override.pot @@ -0,0 +1,147 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-06 10:08+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:4 +msgid "box.iproto.override()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:10 +msgid "Since version :doc:`2.11.0 `. Set a new IPROTO request handler callback for the given request type." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:13 +msgid "a request type code. Possible values: * a type code from :ref:`box.iproto.type ` (except ``box.iproto.type.UNKNOWN``) -- override the existing request type handler. * ``box.iproto.type.UNKNOWN`` -- override the handler of unknown request types." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:13 +msgid "a request type code. Possible values:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:15 +msgid "a type code from :ref:`box.iproto.type ` (except ``box.iproto.type.UNKNOWN``) -- override the existing request type handler." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:18 +msgid "``box.iproto.type.UNKNOWN`` -- override the handler of unknown request types." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:20 +msgid "IPROTO request handler. The signature of a handler function: ``function(sid, header, body)``, where * ``header`` (userdata): a request header encoded as a :ref:`msgpack_object ` * ``body`` (userdata): a request body encoded as a :ref:`msgpack_object ` Returns ``true`` on success, otherwise ``false``. On ``false``, there is a fallback to the default handler. Also, you can indicate an error by throwing an exception. In this case, the return value is ``false``, but this does not always mean a failure. To reset the request handler, set the ``handler`` parameter to ``nil``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:20 +msgid "IPROTO request handler. The signature of a handler function: ``function(sid, header, body)``, where" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:23 +msgid "``header`` (userdata): a request header encoded as a :ref:`msgpack_object `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:24 +msgid "``body`` (userdata): a request body encoded as a :ref:`msgpack_object `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:26 +msgid "Returns ``true`` on success, otherwise ``false``. On ``false``, there is a fallback to the default handler. Also, you can indicate an error by throwing an exception. In this case, the return value is ``false``, but this does not always mean a failure." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:30 +msgid "To reset the request handler, set the ``handler`` parameter to ``nil``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:32 +msgid "none" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:34 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:36 +msgid "If a Lua handler throws an exception, the behavior is similar to that of a remote procedure call. The following errors are returned to the client over IPROTO (see `src/lua/utils.h `__):" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:39 +msgid ":errcode:`ER_PROC_LUA` -- an exception is thrown from a Lua handler, diagnostic is not set." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:40 +msgid "diagnostics from ``src/box/errcode.h`` -- an exception is thrown, diagnostic is set." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:42 +msgid "For details, see `src/box/errcode.h `__." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:46 +msgid "When using ``box.iproto.override()``, it is important that you follow the wire protocol. That is, the server response should match the return value types of the corresponding request type. Otherwise, it could lead to peer breakdown or undefined behavior." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:50 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:52 +msgid "Define a handler function for the ``box.iproto.type.SELECT`` request type:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:54 +msgid "local function iproto_select_handler_lua(header, body)\n" +" if body.space_id == 512 then\n" +" box.iproto.send(box.session.id(),\n" +" { request_type = box.iproto.type.OK,\n" +" sync = header.SYNC,\n" +" schema_version = box.info.schema_version },\n" +" { data = { 1, 2, 3 } })\n" +" return true\n" +" end\n" +" return false\n" +"end" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:68 +msgid "Override ``box.iproto.type.SELECT`` handler:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:70 +msgid "box.iproto.override(box.iproto.type.SELECT, iproto_select_handler_lua)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:74 +msgid "Reset ``box.iproto.type.SELECT`` handler:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:76 +msgid "box.iproto.override(box.iproto.type.SELECT, nil)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:80 +msgid "Override a handler function for the unknown request type:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/override.rst:82 +msgid "box.iproto.override(box.iproto.type.UNKNOWN, iproto_unknown_request_handler_lua)" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_iproto/protocol_features.pot b/locale/en/reference/reference_lua/box_iproto/protocol_features.pot new file mode 100644 index 0000000000..41cfae7208 --- /dev/null +++ b/locale/en/reference/reference_lua/box_iproto/protocol_features.pot @@ -0,0 +1,40 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-21 08:10+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_iproto/protocol_features.rst:4 +msgid "box.iproto.protocol_features" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/protocol_features.rst:10 +msgid "The set of IPROTO protocol features supported by the server. Learn more: :ref:`net.box features `, `src/box/iproto_features.h `__, and `iproto_features_resolve() `__." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/protocol_features.rst:14 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/protocol_features.rst:16 +msgid "tarantool> box.iproto.protocol_features\n" +"---\n" +"- transactions: true\n" +" watchers: true\n" +" error_extension: true\n" +" streams: true\n" +" pagination: true\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_iproto/protocol_version.pot b/locale/en/reference/reference_lua/box_iproto/protocol_version.pot new file mode 100644 index 0000000000..454cfef1b2 --- /dev/null +++ b/locale/en/reference/reference_lua/box_iproto/protocol_version.pot @@ -0,0 +1,36 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-21 08:10+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_iproto/protocol_version.rst:4 +msgid "box.iproto.protocol_version" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/protocol_version.rst:10 +msgid "The current IPROTO protocol version of the server. Learn more: :ref:`IPROTO_ID `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/protocol_version.rst:13 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/protocol_version.rst:15 +msgid "tarantool> box.iproto.protocol_version\n" +"---\n" +"- 4\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_iproto/raft.pot b/locale/en/reference/reference_lua/box_iproto/raft.pot new file mode 100644 index 0000000000..0c0e9a7889 --- /dev/null +++ b/locale/en/reference/reference_lua/box_iproto/raft.pot @@ -0,0 +1,40 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-21 08:10+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_iproto/raft.rst:4 +msgid "box.iproto.raft" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/raft.rst:10 +msgid "Contains the keys from the ``IPROTO_RAFT_*`` requests. Learn more: :ref:`Synchronous replication keys `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/raft.rst:13 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/raft.rst:15 +msgid "tarantool> box.iproto.raft_key.TERM\n" +"---\n" +"- 0\n" +"...\n" +"tarantool> box.iproto.raft_key.VOTE\n" +"---\n" +"- 1\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_iproto/request_type.pot b/locale/en/reference/reference_lua/box_iproto/request_type.pot new file mode 100644 index 0000000000..384a718281 --- /dev/null +++ b/locale/en/reference/reference_lua/box_iproto/request_type.pot @@ -0,0 +1,40 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-21 08:10+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_iproto/request_type.rst:4 +msgid "box.iproto.type" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/request_type.rst:10 +msgid "Contains all available request types. Learn more about the requests: :ref:`Client-server requests and responses `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/request_type.rst:13 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/request_type.rst:15 +msgid "tarantool> box.iproto.type.UNKNOWN\n" +"---\n" +"- -1\n" +"...\n" +"tarantool> box.iproto.type.CHUNK\n" +"---\n" +"- 128\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_iproto/send.pot b/locale/en/reference/reference_lua/box_iproto/send.pot new file mode 100644 index 0000000000..ce8d12b7a6 --- /dev/null +++ b/locale/en/reference/reference_lua/box_iproto/send.pot @@ -0,0 +1,132 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-21 08:10+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:4 +msgid "box.iproto.send()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:10 +msgid "Since version :doc:`2.11.0 `. Send an :ref:`IPROTO ` packet over the session's socket with the given MsgPack header and body. The header and body contain exported IPROTO constants from the :ref:`box.iproto() ` submodule. Possible IPROTO constant formats:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:16 +msgid "a lowercase constant without the ``IPROTO_`` prefix (``schema_version``, ``request_type``)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:17 +msgid "a constant from the corresponding :ref:`box.iproto ` subnamespace (``box.iproto.SCHEMA_VERSION``, ``box.iproto.REQUEST_TYPE``)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:19 +msgid "The function works for binary sessions only. For details, see :ref:`box.session.type() `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:21 +msgid "the IPROTO session identifier (see :ref:`box.session.id() `)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:22 +msgid "a request header encoded as MsgPack" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:23 +msgid "a request body encoded as MsgPack" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:25 +msgid "0 on success, otherwise an error is raised" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:26 +msgid "number" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:28 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:30 +msgid ":errcode:`ER_SESSION_CLOSED` -- the session is closed." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:31 +msgid ":errcode:`ER_NO_SUCH_SESSION` -- the session does not exist." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:32 +msgid ":errcode:`ER_MEMORY_ISSUE` -- out-of-memory limit has been reached." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:33 +msgid ":errcode:`ER_WRONG_SESSION_TYPE` -- the session type is not binary." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:35 +msgid "For details, see `src/box/errcode.h `__." +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:37 +msgid "**Examples:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:39 +msgid "Send a packet using Lua tables and string IPROTO constants as keys:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:41 +msgid "box.iproto.send(box.session.id(),\n" +" { request_type = box.iproto.type.OK,\n" +" sync = 10,\n" +" schema_version = box.info.schema_version },\n" +" { data = 1 })" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:49 +msgid "Send a packet using Lua tables and numeric IPROTO constants:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:51 +msgid "box.iproto.send(box.session.id(),\n" +" { [box.iproto.key.REQUEST_TYPE] = box.iproto.type.OK,\n" +" [box.iproto.key.SYNC] = 10,\n" +" [box.iproto.key.SCHEMA_VERSION] = box.info.schema_version },\n" +" { [box.iproto.key.DATA] = 1 })" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:59 +msgid "Send a packet that contains only the header:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_iproto/send.rst:61 +msgid "box.iproto.send(box.session.id(),\n" +" { request_type = box.iproto.type.OK,\n" +" sync = 10,\n" +" schema_version = box.info.schema_version })" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_null.pot b/locale/en/reference/reference_lua/box_null.pot new file mode 100644 index 0000000000..07ef57a040 --- /dev/null +++ b/locale/en/reference/reference_lua/box_null.pot @@ -0,0 +1,169 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_null.rst:5 +msgid "Constant box.NULL" +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:7 +msgid "There are some major problems with using Lua **nil** values in tables. For example: you can't correctly assess the length of a table that is not a sequence. (Learn more about data types in `Lua `__ and `LuaJIT `__.)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:12 +#: ../../doc/reference/reference_lua/box_null.rst:60 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:14 +msgid "tarantool> t = {0, nil, 1, 2, nil}\n" +"---\n" +"...\n" +"\n" +"tarantool> t\n" +"---\n" +"- - 0\n" +" - null\n" +" - 1\n" +" - 2\n" +"...\n" +"\n" +"tarantool> #t\n" +"---\n" +"- 4\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:33 +msgid "The console output of ``t`` processes **nil** values in the middle and at the end of the table differently. This is due to undefined behavior." +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:38 +msgid "Trying to find the length for sparse arrays in LuaJIT leads to another scenario of `undefined behavior `_." +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:42 +msgid "To avoid this problem, use Tarantool's ``box.NULL`` constant instead of **nil**. ``box.NULL`` is a placeholder for a **nil** value in tables to preserve a key without a value." +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:48 +msgid "Using box.NULL" +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:50 +msgid "``box.NULL`` is a value of the `cdata `__ type representing a NULL pointer. It is similar to ``msgpack.NULL``, ``json.NULL`` and ``yaml.NULL``. So it is some not **nil** value, even if it is a pointer to NULL." +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:54 +msgid "Use ``box.NULL`` only with capitalized NULL (``box.null`` is incorrect)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:58 +msgid "Technically speaking, ``box.NULL`` equals to ``ffi.cast('void *', 0)``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:62 +msgid "tarantool> t = {0, box.NULL, 1, 2, box.NULL}\n" +"---\n" +"...\n" +"\n" +"tarantool> t\n" +"---\n" +"- - 0\n" +" - null # cdata\n" +" - 1\n" +" - 2\n" +" - null # cdata\n" +"...\n" +"\n" +"tarantool> #t\n" +"---\n" +"- 5\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:84 +msgid "Notice that ``t[2]`` shows the same ``null`` output in both examples. However in this example ``t[2]`` and ``t[5]`` are of the cdata type, while in the previous example their type was **nil**." +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:90 +msgid "Avoid using implicit comparisons with nullable values when using ``box.NULL``. Due to `Lua behavior `_, returning anything except **false** or **nil** from a condition expression is considered as **true**. And, as it was mentioned earlier, ``box.NULL`` is a pointer by design." +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:96 +msgid "That is why the expression ``box.NULL`` will always be considered **true** in case it is used as a condition in a comparison. This means that the code" +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:99 +msgid "``if box.NULL then func() end``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:101 +msgid "will always execute the function ``func()`` (because the condition ``box.NULL`` will always be neither **false** nor **nil**)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:106 +msgid "Distinction of nil and box.NULL" +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:108 +msgid "Use the expression ``if x == nil`` to check if the ``x`` is either a **nil** or a ``box.NULL``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:111 +msgid "To check whether ``x`` is a **nil** but not a ``box.NULL``, use the following condition expression:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:114 +msgid "type(x) == 'nil'" +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:118 +msgid "If it's **true**, then ``x`` is a **nil**, but not a ``box.NULL``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:120 +msgid "You can use the following for ``box.NULL``:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:122 +msgid "x == nil and type(x) == 'cdata'" +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:126 +msgid "If the expression above is **true**, then ``x`` is a ``box.NULL``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:130 +msgid "By converting data to different formats (JSON, YAML, msgpack), you shall expect that it is possible that **nil** in sparse arrays will be converted to ``box.NULL``. And it is worth mentioning that such conversion might be unexpected (for example: by sending data via :ref:`net.box ` or by obtaining data from :ref:`spaces ` etc.)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:136 +msgid "tarantool> type(({1, nil, 2})[2])\n" +"---\n" +"- nil\n" +"...\n" +"\n" +"tarantool> type(json.decode(json.encode({1, nil, 2}))[2])\n" +"---\n" +"- cdata\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_null.rst:148 +msgid "You must anticipate such behavior and use a proper condition expression. Use the explicit comparison ``x == nil`` for checking for NULL in nullable values. It will detect both **nil** and ``box.NULL``." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_once.pot b/locale/en/reference/reference_lua/box_once.pot new file mode 100644 index 0000000000..9360182d59 --- /dev/null +++ b/locale/en/reference/reference_lua/box_once.pot @@ -0,0 +1,77 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_once.rst:5 +msgid "Function box.once" +msgstr "" + +#: ../../doc/reference/reference_lua/box_once.rst:9 +msgid "Execute a function, provided it has not been executed before. A passed value is checked to see whether the function has already been executed. If it has been executed before, nothing happens. If it has not been executed before, the function is invoked." +msgstr "" + +#: ../../doc/reference/reference_lua/box_once.rst:14 +msgid "See an example of using ``box.once()`` while :ref:`bootstrapping a replica set `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_once.rst:17 +msgid "**Warning:** If an error occurs inside ``box.once()`` when initializing a database, you can re-execute the failed ``box.once()`` block without stopping the database. The solution is to delete the ``once`` object from the system space :ref:`_schema `. Say ``box.space._schema:select{}``, find your ``once`` object there and delete it. For example, re-executing a block with ``key='hello'`` :" +msgstr "" + +#: ../../doc/reference/reference_lua/box_once.rst:24 +msgid "When ``box.once()`` is used for initialization, it may be useful to wait until the database is in an appropriate state (read-only or read-write). In that case, see the functions in the :doc:`/reference/reference_lua/box_ctl`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_once.rst:28 +msgid "tarantool> box.space._schema:select{}\n" +"---\n" +"- - ['cluster', 'b4e15788-d962-4442-892e-d6c1dd5d13f2']\n" +" - ['max_id', 512]\n" +" - ['oncebye']\n" +" - ['oncehello']\n" +" - ['version', 1, 7, 2]\n" +"...\n" +"\n" +"tarantool> box.space._schema:delete('oncehello')\n" +"---\n" +"- ['oncehello']\n" +"...\n" +"\n" +"tarantool> box.once('hello', function() end)\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_once.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_once.rst:48 +msgid "a value that will be checked" +msgstr "" + +#: ../../doc/reference/reference_lua/box_once.rst:49 +msgid "a function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_once.rst:50 +msgid "arguments that must be passed to function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_once.rst:54 +msgid "The parameter ``key`` will be stored in the :ref:`_schema ` system space after ``box.once()`` is called in order to prevent a double run. These keys are global per replica set. So a simultaneous call of ``box.once()`` with the same key on two instances of the same replica set may succeed on both of them, but it'll lead to a transaction conflict." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_read_view.pot b/locale/en/reference/reference_lua/box_read_view.pot new file mode 100644 index 0000000000..6d0c253c20 --- /dev/null +++ b/locale/en/reference/reference_lua/box_read_view.pot @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_read_view.rst:3 +msgid "Submodule box.read_view" +msgstr "" + +#: ../../doc/reference/reference_lua/box_read_view.rst:5 +msgid "The box.read_view submodule contains functions related to read views." +msgstr "" + +#: ../../doc/reference/reference_lua/box_read_view.rst:16 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_read_view.rst:17 +msgid "Use" +msgstr "" + +#: ../../doc/reference/reference_lua/box_read_view.rst:19 +msgid ":doc:`./box_read_view/list`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_read_view.rst:20 +msgid "Return an array of all active database read views." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_read_view/list.pot b/locale/en/reference/reference_lua/box_read_view/list.pot new file mode 100644 index 0000000000..28d6d057be --- /dev/null +++ b/locale/en/reference/reference_lua/box_read_view/list.pot @@ -0,0 +1,65 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_read_view/list.rst:5 +msgid "box.read_view.list()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_read_view/list.rst:9 +msgid "Return an array of all active database read views. This array might include the following read view types:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_read_view/list.rst:12 +msgid ":ref:`read views ` created by application code (Enterprise Edition only)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_read_view/list.rst:14 +msgid "system read views (used, for example, to make a :ref:`checkpoint ` or join a new :ref:`replica `)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_read_view/list.rst:17 +msgid "Read views created by application code also have the ``space`` field. The field lists all spaces available in a read view, and may be used like a read view object returned by ``box.read_view.open()``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_read_view/list.rst:23 +msgid "``read_view.list()`` also contains read views created using the :ref:`C API ` (:ref:`box_raw_read_view_new() `). Note that you cannot access database spaces included in such views from Lua." +msgstr "" + +#: ../../doc/reference/reference_lua/box_read_view/list.rst:28 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_read_view/list.rst:30 +msgid "tarantool> box.read_view.list()\n" +"---\n" +"- - timestamp: 1138.98706933\n" +" signature: 47\n" +" is_system: false\n" +" status: open\n" +" vclock: &0 {1: 47}\n" +" name: read_view1\n" +" id: 1\n" +" - timestamp: 1172.202995842\n" +" signature: 49\n" +" is_system: false\n" +" status: open\n" +" vclock: &1 {1: 49}\n" +" name: read_view2\n" +" id: 2\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema.pot b/locale/en/reference/reference_lua/box_schema.pot new file mode 100644 index 0000000000..86e3be0afd --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema.pot @@ -0,0 +1,221 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema.rst:5 +msgid "Submodule box.schema" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:9 +msgid "The ``box.schema`` submodule has data-definition functions for spaces, users, roles, function tuples, and sequences." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:12 +msgid "Below is a list of all ``box.schema`` functions." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:23 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:24 +msgid "Use" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:26 +msgid ":doc:`./box_schema/space_create`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:27 +msgid "Create a space" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:29 +msgid ":doc:`./box_schema/upgrade`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:30 +msgid "Upgrade a database" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:32 +msgid ":doc:`./box_schema/downgrade`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:33 +msgid "Downgrade a database" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:35 +msgid ":doc:`./box_schema/downgrade_issues`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:36 +msgid "List downgrade issues for the specified Tarantool version" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:38 +msgid ":doc:`./box_schema/downgrade_versions`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:39 +msgid "List Tarantool versions available for downgrade" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:41 +msgid ":doc:`./box_schema/user_create`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:42 +msgid "Create a user" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:44 +msgid ":doc:`./box_schema/user_drop`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:45 +msgid "Drop a user" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:47 +msgid ":doc:`./box_schema/user_exists`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:48 +msgid "Check if a user exists" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:50 +msgid ":doc:`./box_schema/user_grant`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:51 +msgid "Grant privileges to a user or a role" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:53 +msgid ":doc:`./box_schema/user_revoke`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:54 +msgid "Revoke privileges from a user or a role" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:56 +msgid ":doc:`./box_schema/user_password`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:57 +msgid "Get a hash of a user's password" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:59 +msgid ":doc:`./box_schema/user_passwd`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:60 +msgid "Associate a password with a user" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:62 +msgid ":doc:`./box_schema/user_info`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:63 +msgid "Get a description of a user's privileges" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:65 +msgid ":doc:`./box_schema/role_create`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:66 +msgid "Create a role" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:68 +msgid ":doc:`./box_schema/role_drop`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:69 +msgid "Drop a role" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:71 +msgid ":doc:`./box_schema/role_exists`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:72 +msgid "Check if a role exists" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:74 +msgid ":doc:`./box_schema/role_grant`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:75 +msgid "Grant privileges to a role" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:77 +msgid ":doc:`./box_schema/role_revoke`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:78 +msgid "Revoke privileges from a role" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:80 +msgid ":doc:`./box_schema/role_info`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:81 +msgid "Get a description of a role's privileges" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:83 +msgid ":doc:`./box_schema/func_create`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:84 +msgid "Create a function tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:86 +msgid ":doc:`./box_schema/func_drop`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:87 +msgid "Drop a function tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:89 +msgid ":doc:`./box_schema/func_exists`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:90 +msgid "Check if a function tuple exists" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:92 +msgid ":doc:`./box_schema/func_reload`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema.rst:93 +msgid "Reload a C module with all its functions, no restart" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/downgrade.pot b/locale/en/reference/reference_lua/box_schema/downgrade.pot new file mode 100644 index 0000000000..cef7a98b2f --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/downgrade.pot @@ -0,0 +1,59 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/downgrade.rst:4 +msgid "box.schema.downgrade()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/downgrade.rst:10 +msgid "Allows you to downgrade a database to the specified Tarantool version. This might be useful if you need to run a database on older Tarantool versions." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/downgrade.rst:13 +msgid "To prepare a database for using it on an older Tarantool instance, call ``box.schema.downgrade`` and pass the desired Tarantool version:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/downgrade.rst:16 +msgid "tarantool> box.schema.downgrade('2.8.4')" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/downgrade.rst:22 +msgid "The Tarantool's downgrade procedure is similar to the upgrade process that is described in the :ref:`Upgrades ` topic. You need to run ``box.schema.downgrade()`` only on master and execute `box.shapshot()` on every instance in a replica set before restart to an older version." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/downgrade.rst:25 +msgid "To see Tarantool versions available for downgrade, call :ref:`box.schema.downgrade_versions() `. The oldest release available for downgrade is ``2.8.2``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/downgrade.rst:27 +msgid "Note that the downgrade process might fail if the database enables specific features not supported in the target Tarantool version. You can see all such issues using the :ref:`box.schema.downgrade_issues() ` method, which accepts the target version. For example, ``downgrade`` to the ``2.8.4`` version fails if you use :ref:`tuple compression ` or field :ref:`constraints ` in your database:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/downgrade.rst:33 +msgid "tarantool> box.schema.downgrade_issues('2.8.4')\n" +"---\n" +"- - Tuple compression is found in space 'bands', field 'band_name'. It is supported\n" +" starting from version 2.10.0.\n" +" - Field constraint is found in space 'bands', field 'year'. It is supported starting\n" +" from version 2.10.0.\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/downgrade.rst:43 +msgid "See also: :ref:`box.schema.upgrade() `" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/downgrade_issues.pot b/locale/en/reference/reference_lua/box_schema/downgrade_issues.pot new file mode 100644 index 0000000000..fdc30fcf48 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/downgrade_issues.pot @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/downgrade_issues.rst:4 +msgid "box.schema.downgrade_issues()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/downgrade_issues.rst:10 +msgid "Return a list of downgrade issues for the specified Tarantool version. To learn how to downgrade a database to the specified Tarantool version, see :ref:`box.schema.downgrade() `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/downgrade_issues.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/downgrade_issues.rst:13 +msgid "a list of downgrade issues" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/downgrade_issues.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/downgrade_issues.rst:14 +msgid "table" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/downgrade_versions.pot b/locale/en/reference/reference_lua/box_schema/downgrade_versions.pot new file mode 100644 index 0000000000..9fbbcb8c3a --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/downgrade_versions.pot @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/downgrade_versions.rst:4 +msgid "box.schema.downgrade_versions()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/downgrade_versions.rst:10 +msgid "Return a list of Tarantool versions available for downgrade. To learn how to downgrade a database to the specified Tarantool version, see :ref:`box.schema.downgrade() `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/downgrade_versions.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/downgrade_versions.rst:13 +msgid "a list of Tarantool versions" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/downgrade_versions.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/downgrade_versions.rst:14 +msgid "table" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/func_create.pot b/locale/en/reference/reference_lua/box_schema/func_create.pot new file mode 100644 index 0000000000..5ef420ad5d --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/func_create.pot @@ -0,0 +1,317 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:5 +msgid "box.schema.func.create()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:13 +msgid "Create a function. The created function can be used in different usage scenarios, for example, in :ref:`field or tuple constraints ` or :ref:`functional indexes `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:18 +msgid "Using the :ref:`body ` option, you can make a function *persistent*. In this case, the function is \"persistent\" because its definition is stored in a snapshot (the :ref:`box.space._func ` system space) and can be recovered if the server restarts." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:21 +msgid "a name of the function, which should conform to the :ref:`rules for object names `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:23 +msgid "see :ref:`function_options `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:25 +msgid "nil" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:29 +msgid ":ref:`box.schema.user.grant() ` can be used to allow the specified user or role to execute the created function." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:32 +msgid "**Example 1: a non-persistent Lua function**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:34 +msgid "The example below shows how to create a non-persistent Lua function:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:36 +msgid "box.schema.func.create('calculate')\n" +"box.schema.func.create('calculate', {if_not_exists = false})\n" +"box.schema.func.create('calculate', {setuid = false})\n" +"box.schema.func.create('calculate', {language = 'LUA'})" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:44 +msgid "**Example 2: a persistent Lua function**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:46 +msgid "The example below shows how to create a persistent Lua function, show its definition using ``box.func.{func-name}``, and call this function using ``box.func.{func-name}:call([parameters])``:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:50 +msgid "tarantool> lua_code = [[function(a, b) return a + b end]]\n" +"tarantool> box.schema.func.create('sum', {body = lua_code})\n" +"\n" +"tarantool> box.func.sum\n" +"---\n" +"- is_sandboxed: false\n" +" is_deterministic: false\n" +" id: 2\n" +" setuid: false\n" +" body: function(a, b) return a + b end\n" +" name: sum\n" +" language: LUA\n" +"...\n" +"\n" +"tarantool> box.func.sum:call({1, 2})\n" +"---\n" +"- 3\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:71 +msgid "To call functions using ``net.box``, use :ref:`net_box:call() `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:75 +msgid "**Example 3: a persistent SQL expression used in a tuple constraint**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:77 +msgid "The code snippet below defines a function that checks a tuple's data using the SQL expression:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:79 +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:220 +msgid "box.schema.func.create('check_person', {\n" +" language = 'SQL_EXPR',\n" +" is_deterministic = true,\n" +" body = [[\"age\" > 21 AND \"name\" != 'Admin']]\n" +"})\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:85 +msgid "Then, this function is used to create a tuple :ref:`constraint `:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:87 +msgid "local customers = box.schema.space.create('customers', { constraint = 'check_person' })\n" +"customers:format({\n" +" { name = 'id', type = 'number' },\n" +" { name = 'name', type = 'string' },\n" +" { name = 'age', type = 'number' },\n" +"})\n" +"customers:create_index('primary', { parts = { 1 } })\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:93 +msgid "On an attempt to insert a tuple that doesn't meet the required criteria, an error is raised:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:95 +msgid "customers:insert { 2, \"Bob\", 18 }\n" +"-- error: Check constraint 'check_person' failed for tuple\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:104 +msgid "function_options" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:108 +msgid "A table containing options passed to the :ref:`box.schema.func.create(func-name [, function_options]) ` function." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:114 +msgid "Specify whether there should be no error if the function already exists." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:116 +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:128 +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:182 +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:191 +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:201 +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:252 +msgid "Type: boolean" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:117 +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:129 +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:183 +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:192 +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:202 +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:253 +msgid "Default: ``false``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:123 +msgid "Make Tarantool treat the function's caller as the function's creator, with full privileges. Note that ``setuid`` works only over :ref:`binary ports `. ``setuid`` doesn't work if you invoke a function using the :ref:`admin console ` or inside a Lua script." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:135 +msgid "Specify the function language. The possible values are:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:138 +msgid "``LUA``: define a Lua function in the :ref:`body ` attribute." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:139 +msgid "``SQL_EXPR``: define an :ref:`SQL expression ` in the :ref:`body ` attribute. An SQL expression can only be used as a field or tuple :ref:`constraint `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:140 +msgid "``C``: import a C function using its name from a ``.so`` file. Learn how to call C code from Lua in the :ref:`C tutorial `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:144 +msgid "To reload a C module with all its functions without restarting the server, call :ref:`box.schema.func.reload() `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:146 +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:228 +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:291 +msgid "Type: string" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:147 +msgid "Default: ``LUA``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:153 +msgid "Whether the function should be executed in an isolated environment. This means that any operation that accesses the world outside the sandbox is forbidden or has no effect. Therefore, a sandboxed function can only use modules and functions that cannot affect isolation:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:158 +msgid "`assert `_, `assert `_, `error `_, `ipairs `_, `math.* `_, `next `_, `pairs `_, `pcall `_, `print `_, `select `_, `string.* `_, `table.* `_, `tonumber `_, `tostring `_, `type `_, `unpack `_, `xpcall `_, :ref:`utf8.* `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:177 +msgid "Also, a sandboxed function cannot refer to global variables -- they are treated as local variables because the sandbox is established with `setfenv `_. So, a sandboxed function is stateless and deterministic." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:189 +msgid "Specify whether a function should be deterministic." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:198 +msgid "If ``true`` is set in the function definition for a functional index, the function returns multiple keys. For details, see the :ref:`example `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:208 +msgid "Specify a function body. You can set a function's language using the :ref:`language ` attribute." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:211 +msgid "The code snippet below defines a :ref:`constraint ` function that checks a tuple's data using a Lua function:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:213 +msgid "box.schema.func.create('check_person', {\n" +" language = 'LUA',\n" +" is_deterministic = true,\n" +" body = 'function(t, c) return (t.age >= 0 and #(t.name) > 3) end'\n" +"})\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:218 +msgid "In the following example, an SQL expression is used to check a tuple's data:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:226 +msgid "Example: :ref:`A persistent SQL expression used in a tuple constraint `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:229 +msgid "Default: ``nil``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:235 +msgid "**Since:** :doc:`2.10.0 `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:237 +msgid "If set to ``true`` for a Lua function and the function is called via ``net.box`` (:ref:`conn:call() `) or by ``box.func.:call()``, the function arguments are passed being wrapped in a :ref:`MsgPack object `:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:240 +msgid "local msgpack = require('msgpack')\n" +"box.schema.func.create('my_func', {takes_raw_args = true})\n" +"local my_func = function(mp)\n" +" assert(msgpack.is_object(mp))\n" +" local args = mp:decode() -- array of arguments\n" +"end" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:249 +msgid "If a function forwards most of its arguments to another Tarantool instance or writes them to a database, the usage of this option can improve performance because it skips the MsgPack data decoding in Lua." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:260 +msgid "Specify the languages that can call the function." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:262 +msgid "Example: ``exports = {'LUA', 'SQL'}``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:264 +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:277 +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:289 +msgid "See also: :ref:`Calling Lua routines from SQL `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:266 +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:279 +msgid "Type: table" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:267 +msgid "Default: ``{'LUA'}``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:273 +msgid "Specify the Lua type names for each parameter of the function." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:275 +msgid "Example: ``param_list = {'number', 'number'}``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:285 +msgid "Specify the Lua type name for a function's return value." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_create.rst:287 +msgid "Example: ``returns = 'number'``" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/func_drop.pot b/locale/en/reference/reference_lua/box_schema/func_drop.pot new file mode 100644 index 0000000000..50eb31131c --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/func_drop.pot @@ -0,0 +1,45 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/func_drop.rst:5 +msgid "box.schema.func.drop()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_drop.rst:11 +msgid "Drop a function tuple. For explanation of how Tarantool maintains function data, see reference on :ref:`_func space `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_drop.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_drop.rst:15 +msgid "the name of the function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_drop.rst:16 +msgid "``if_exists`` = ``true|false`` (default = ``false``) - boolean; ``true`` means there should be no error if the _func tuple does not exist." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_drop.rst:19 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_drop.rst:21 +msgid "box.schema.func.drop('calculate')" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/func_exists.pot b/locale/en/reference/reference_lua/box_schema/func_exists.pot new file mode 100644 index 0000000000..425f57a2ea --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/func_exists.pot @@ -0,0 +1,49 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/func_exists.rst:5 +msgid "box.schema.func.exists()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_exists.rst:11 +msgid "Return true if a function tuple exists; return false if a function tuple does not exist." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_exists.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_exists.rst:14 +msgid "the name of the function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_exists.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_exists.rst:15 +msgid "bool" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_exists.rst:17 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_exists.rst:19 +msgid "box.schema.func.exists('calculate')" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/func_reload.pot b/locale/en/reference/reference_lua/box_schema/func_reload.pot new file mode 100644 index 0000000000..7f9e3ad34d --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/func_reload.pot @@ -0,0 +1,50 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/func_reload.rst:5 +msgid "box.schema.func.reload()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_reload.rst:11 +msgid "Reload a C module with all its functions without restarting the server." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_reload.rst:13 +msgid "Under the hood, Tarantool loads a new copy of the module (``*.so`` shared library) and starts routing all new request to the new version. The previous version remains active until all started calls are finished. All shared libraries are loaded with ``RTLD_LOCAL`` (see \"man 3 dlopen\"), therefore multiple copies can co-exist without any problems." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_reload.rst:21 +msgid "Reload will fail if a module was loaded from Lua script with `ffi.load() `_." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_reload.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_reload.rst:24 +msgid "the name of the module to reload" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_reload.rst:26 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/func_reload.rst:28 +msgid "-- reload the entire module contents\n" +"box.schema.func.reload('module')" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/role_create.pot b/locale/en/reference/reference_lua/box_schema/role_create.pot new file mode 100644 index 0000000000..5803ed201e --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/role_create.pot @@ -0,0 +1,54 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/role_create.rst:5 +msgid "box.schema.role.create()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_create.rst:11 +msgid "Create a role. For explanation of how Tarantool maintains role data, see section :ref:`Roles `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_create.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_create.rst:15 +msgid "name of role, which should conform to the :ref:`rules for object names `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_create.rst:17 +msgid "``if_not_exists`` = ``true|false`` (default = ``false``) - boolean; ``true`` means there should be no error if the role already exists" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_create.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_create.rst:21 +msgid "nil" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_create.rst:23 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_create.rst:25 +msgid "box.schema.role.create('Accountant')\n" +"box.schema.role.create('Accountant', {if_not_exists = false})" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/role_drop.pot b/locale/en/reference/reference_lua/box_schema/role_drop.pot new file mode 100644 index 0000000000..bcdfb18e16 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/role_drop.pot @@ -0,0 +1,45 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/role_drop.rst:5 +msgid "box.schema.role.drop()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_drop.rst:11 +msgid "Drop a role. For explanation of how Tarantool maintains role data, see section :ref:`Roles `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_drop.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_drop.rst:15 +msgid "the name of the role" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_drop.rst:16 +msgid "``if_exists`` = ``true|false`` (default = ``false``) - boolean; ``true`` means there should be no error if the role does not exist." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_drop.rst:19 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_drop.rst:21 +msgid "box.schema.role.drop('Accountant')" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/role_exists.pot b/locale/en/reference/reference_lua/box_schema/role_exists.pot new file mode 100644 index 0000000000..2487284588 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/role_exists.pot @@ -0,0 +1,49 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/role_exists.rst:5 +msgid "box.schema.role.exists()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_exists.rst:11 +msgid "Return ``true`` if a role exists; return ``false`` if a role does not exist." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_exists.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_exists.rst:13 +msgid "the name of the role" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_exists.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_exists.rst:14 +msgid "bool" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_exists.rst:16 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_exists.rst:18 +msgid "box.schema.role.exists('Accountant')" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/role_grant.pot b/locale/en/reference/reference_lua/box_schema/role_grant.pot new file mode 100644 index 0000000000..be3b302f72 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/role_grant.pot @@ -0,0 +1,73 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/role_grant.rst:5 +msgid "box.schema.role.grant()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_grant.rst:13 +msgid "Grant :ref:`privileges ` to a role." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_grant.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_grant.rst:15 +msgid "the name of the role." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_grant.rst:16 +msgid "'read' or 'write' or 'execute' or 'create' or 'alter' or 'drop' or a combination." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_grant.rst:18 +msgid "'space' or 'function' or 'sequence' or 'role'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_grant.rst:19 +msgid "the name of a function or space or sequence or role." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_grant.rst:20 +msgid "``if_not_exists`` = ``true|false`` (default = ``false``) - boolean; ``true`` means there should be no error if the role already has the privilege." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_grant.rst:24 +msgid "The role must exist, and the object must exist." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_grant.rst:26 +msgid "**Variation:** instead of ``object-type, object-name`` say 'universe' which means 'all object-types and all objects'. In this case, object name is omitted." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_grant.rst:29 +msgid "**Variation:** instead of ``privilege, object-type, object-name`` say ``role-name`` -- to grant a role to a role." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_grant.rst:32 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_grant.rst:34 +msgid "box.schema.role.grant('Accountant', 'read', 'space', 'tester')\n" +"box.schema.role.grant('Accountant', 'execute', 'function', 'f')\n" +"box.schema.role.grant('Accountant', 'read,write', 'universe')\n" +"box.schema.role.grant('public', 'Accountant')\n" +"box.schema.role.grant('role1', 'role2', nil, nil, {if_not_exists=false})" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/role_info.pot b/locale/en/reference/reference_lua/box_schema/role_info.pot new file mode 100644 index 0000000000..68fef738a3 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/role_info.pot @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/role_info.rst:5 +msgid "box.schema.role.info()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_info.rst:11 +msgid "Return a description of a role's privileges." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_info.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_info.rst:13 +msgid "the name of the role." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_info.rst:15 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_info.rst:17 +msgid "box.schema.role.info('Accountant')" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/role_revoke.pot b/locale/en/reference/reference_lua/box_schema/role_revoke.pot new file mode 100644 index 0000000000..b7acd9686d --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/role_revoke.pot @@ -0,0 +1,68 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/role_revoke.rst:5 +msgid "box.schema.role.revoke()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_revoke.rst:11 +msgid "Revoke :ref:`privileges ` from a role." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_revoke.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_revoke.rst:13 +msgid "the name of the role." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_revoke.rst:14 +msgid "'read' or 'write' or 'execute' or 'create' or 'alter' or 'drop' or a combination." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_revoke.rst:16 +msgid "'space' or 'function' or 'sequence' or 'role'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_revoke.rst:17 +msgid "the name of a function or space or sequence or role." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_revoke.rst:19 +msgid "The role must exist, and the object must exist, but it is not an error if the role does not have the privilege." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_revoke.rst:22 +msgid "**Variation:** instead of ``object-type, object-name`` say 'universe' which means 'all object-types and all objects'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_revoke.rst:25 +msgid "**Variation:** instead of ``privilege, object-type, object-name`` say ``role-name``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_revoke.rst:28 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/role_revoke.rst:30 +msgid "box.schema.role.revoke('Accountant', 'read', 'space', 'tester')\n" +"box.schema.role.revoke('Accountant', 'execute', 'function', 'f')\n" +"box.schema.role.revoke('Accountant', 'read,write', 'universe')\n" +"box.schema.role.revoke('public', 'Accountant')" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/space_create.pot b/locale/en/reference/reference_lua/box_schema/space_create.pot new file mode 100644 index 0000000000..9132c097b3 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/space_create.pot @@ -0,0 +1,292 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-07 07:21+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:5 +msgid "box.schema.space.create()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:12 +msgid "Create a :ref:`space `. You can use either syntax. For example, ``s = box.schema.space.create('tester')`` has the same effect as ``s = box.schema.create_space('tester')``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:17 +msgid "There are :ref:`three syntax variations ` for object references targeting space objects, for example :samp:`box.schema.space.drop({space-id})` drops a space. However, the common approach is to use functions attached to the space objects, for example :ref:`space_object:drop() `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:24 +msgid "After a space is created, usually the next step is to :ref:`create an index ` for it, and then it is available for insert, select, and all the other :ref:`box.space ` functions." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:29 +msgid "name of space, which should conform to the :ref:`rules for object names `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:31 +msgid "space options (see :ref:`space_opts `)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:33 +msgid "space object" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:34 +msgid "userdata" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:39 +msgid "space_opts" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:43 +msgid "Space options that include the space id, format, field count, constraints and foreign keys, and so on. These options are passed to the :ref:`box.schema.space.create() ` method." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:49 +msgid "These options are also passed to :doc:`/reference/reference_lua/box_space/alter`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:55 +msgid "Create a space only if a space with the same name does not exist already. Otherwise, do nothing but do not cause an error." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:58 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:121 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:135 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:153 +msgid "Type: boolean" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:59 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:122 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:136 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:154 +msgid "Default: ``false``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:65 +msgid "A :ref:`storage engine `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:67 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:98 +msgid "Type: string" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:68 +msgid "Default: `memtx`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:69 +msgid "Possible values: ``memtx``, ``vinyl``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:75 +msgid "A unique numeric identifier of the space: users can refer to spaces with this id instead of the name." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:78 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:88 +msgid "Type: number" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:79 +msgid "Default: last space's ID + 1" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:85 +msgid "A fixed count of :ref:`fields `. For example, if ``field_count=5``, it is illegal to insert a tuple with fewer than or more than 5 fields." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:89 +msgid "Default: ``0`` (not fixed)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:95 +msgid "The name of the user who is considered to be the space's :ref:`owner ` for authorization purposes." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:99 +msgid "Default: current user's name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:105 +msgid "Field names and types. See the illustrations of format clauses in the :ref:`space_object:format() ` description and in the :ref:`box.space._space ` example. Optional and usually not specified." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:110 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:162 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:178 +msgid "Type: table" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:111 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:163 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:179 +msgid "Default: blank" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:117 +msgid "Space contents are :ref:`replication-local `: changes are stored in the :ref:`write-ahead log ` of the local node but there is no :ref:`replication `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:128 +msgid "Space contents are temporary: changes are not stored in the :ref:`write-ahead log ` and there is no :ref:`replication `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:133 +msgid "Vinyl does not support temporary spaces." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:143 +msgid "Any transaction doing a DML request on this space becomes :ref:`synchronous `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:145 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:165 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:181 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:205 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:147 +msgid "box.schema.space.create('bands', { is_sync = true })\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:160 +msgid "The :ref:`constraints ` that space tuples must satisfy." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:167 +msgid "-- Define a tuple constraint function --\n" +"box.schema.func.create('check_person', {\n" +" language = 'LUA',\n" +" is_deterministic = true,\n" +" body = 'function(t, c) return (t.age >= 0 and #(t.name) > 3) end'\n" +"})\n" +"\n" +"-- Create a space with a tuple constraint --\n" +"customers = box.schema.space.create('customers', {constraint = 'check_person'})\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:176 +msgid "The :ref:`foreign keys ` for space fields." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:183 +msgid "-- Create a space with a tuple foreign key --\n" +"box.schema.space.create(\"orders\", {\n" +" foreign_key = {\n" +" space = 'customers',\n" +" field = {customer_id = 'id', customer_name = 'name'}\n" +" }\n" +"})\n" +"\n" +"box.space.orders:format({\n" +" {name = \"id\", type = \"number\"},\n" +" {name = \"customer_id\" },\n" +" {name = \"customer_name\"},\n" +" {name = \"price_total\", type = \"number\"},\n" +"})\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:188 +msgid "Saying ``box.cfg{read_only=true...}`` during :ref:`configuration ` affects spaces differently depending on the options that were used during ``box.schema.space.create``, as summarized by this chart:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:195 +msgid "Option" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:195 +msgid "Can be created?" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:195 +msgid "Can be written to?" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:195 +msgid "Is replicated?" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:195 +msgid "Is persistent?" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:197 +msgid "(default)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:197 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:197 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:199 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:199 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:199 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:201 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:201 +msgid "no" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:197 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:197 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:199 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:201 +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:201 +msgid "yes" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:199 +msgid "temporary" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:201 +msgid "is_local" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/space_create.rst:207 +msgid "tarantool> s = box.schema.space.create('space55')\n" +"---\n" +"...\n" +"tarantool> s = box.schema.space.create('space55', {\n" +" > id = 555,\n" +" > temporary = false\n" +" > })\n" +"---\n" +"- error: Space 'space55' already exists\n" +"...\n" +"tarantool> s = box.schema.space.create('space55', {\n" +" > if_not_exists = true\n" +" > })\n" +"---\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/upgrade.pot b/locale/en/reference/reference_lua/box_schema/upgrade.pot new file mode 100644 index 0000000000..92bea3b417 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/upgrade.pot @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/upgrade.rst:4 +msgid "box.schema.upgrade()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/upgrade.rst:10 +msgid "If you created a database with an older Tarantool version and have now installed a newer version, make the request ``box.schema.upgrade()``. This updates Tarantool system spaces to match the currently installed version of Tarantool. You can learn about the general upgrade process from the :ref:`Upgrades ` topic." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/upgrade.rst:15 +msgid "For example, here is what happens when you run ``box.schema.upgrade()`` with a database created with Tarantool version 1.6.4 to version 1.7.2 (only a small part of the output is shown):" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/upgrade.rst:19 +msgid "tarantool> box.schema.upgrade()\n" +"alter index primary on _space set options to {\"unique\":true}, parts to [[0,\"unsigned\"]]\n" +"alter space _schema set options to {}\n" +"create view _vindex...\n" +"grant read access to 'public' role for _vindex view\n" +"set schema version to 1.7.0\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/upgrade.rst:30 +msgid "You can also put the request ``box.schema.upgrade()`` inside a :doc:`box.once() ` function in your Tarantool :ref:`initialization file `. On startup, this will create new system spaces, update data type names (for example, ``num`` -> ``unsigned``, ``str`` -> ``string``) and options in Tarantool system spaces." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/upgrade.rst:36 +msgid "See also: :ref:`box.schema.downgrade() `" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/user_create.pot b/locale/en/reference/reference_lua/box_schema/user_create.pot new file mode 100644 index 0000000000..24a0517348 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/user_create.pot @@ -0,0 +1,71 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/user_create.rst:5 +msgid "box.schema.user.create()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_create.rst:11 +msgid "Create a user. For explanation of how Tarantool maintains user data, see section :ref:`Users` and reference on :ref:`_user ` space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_create.rst:16 +msgid "The possible options are:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_create.rst:18 +msgid "``if_not_exists`` = ``true|false`` (default = ``false``) - boolean; ``true`` means there should be no error if the user already exists," +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_create.rst:21 +msgid "``password`` (default = '') - string; the ``password`` = *password* specification is good because in a :ref:`URI ` (Uniform Resource Identifier) it is usually illegal to include a user-name without a password." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_create.rst:28 +msgid "The maximum number of users is 32." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_create.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_create.rst:30 +msgid "a user name, which should conform to the :ref:`rules for object names `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_create.rst:31 +msgid "``if_not_exists``, ``password``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_create.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_create.rst:33 +msgid "nil" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_create.rst:35 +msgid "**Examples:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_create.rst:37 +msgid "box.schema.user.create('testuser')\n" +"box.schema.user.create('testuser', {password = 'foobar'})\n" +"box.schema.user.create('testuser', {if_not_exists = false})" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/user_drop.pot b/locale/en/reference/reference_lua/box_schema/user_drop.pot new file mode 100644 index 0000000000..6f7f811166 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/user_drop.pot @@ -0,0 +1,46 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/user_drop.rst:5 +msgid "box.schema.user.drop()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_drop.rst:11 +msgid "Drop a user. For explanation of how Tarantool maintains user data, see section :ref:`Users ` and reference on :ref:`_user ` space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_drop.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_drop.rst:16 +msgid "the name of the user" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_drop.rst:17 +msgid "``if_exists`` = ``true|false`` (default = ``false``) - boolean; ``true`` means there should be no error if the user does not exist." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_drop.rst:20 +msgid "**Examples:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_drop.rst:22 +msgid "box.schema.user.drop('Lena')\n" +"box.schema.user.drop('Lena',{if_exists=false})" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/user_exists.pot b/locale/en/reference/reference_lua/box_schema/user_exists.pot new file mode 100644 index 0000000000..538ee057c1 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/user_exists.pot @@ -0,0 +1,49 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/user_exists.rst:5 +msgid "box.schema.user.exists()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_exists.rst:11 +msgid "Return ``true`` if a user exists; return ``false`` if a user does not exist. For explanation of how Tarantool maintains user data, see section :ref:`Users ` and reference on :ref:`_user ` space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_exists.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_exists.rst:16 +msgid "the name of the user" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_exists.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_exists.rst:17 +msgid "bool" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_exists.rst:19 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_exists.rst:21 +msgid "box.schema.user.exists('Lena')" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/user_grant.pot b/locale/en/reference/reference_lua/box_schema/user_grant.pot new file mode 100644 index 0000000000..ce9d439b86 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/user_grant.pot @@ -0,0 +1,94 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/user_grant.rst:5 +msgid "box.schema.user.grant()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_grant.rst:13 +msgid "Grant :ref:`privileges ` to a user or to another role." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_grant.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_grant.rst:16 +msgid "the name of a user to grant privileges to" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_grant.rst:17 +msgid "one or more privileges to grant to the user (for example, `read` or `read,write`)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_grant.rst:18 +msgid "a database object type to grant privileges to (for example, `space`, `role`, or `function`)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_grant.rst:19 +msgid "the name of a database object to grant privileges to" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_grant.rst:20 +msgid "the name of a role to grant to the user" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_grant.rst:21 +msgid "``grantor``, ``if_not_exists``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_grant.rst:23 +msgid "If :samp:`'function','{object-name}'` is specified, then a _func tuple with that object-name must exist." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_grant.rst:26 +msgid "**Variation:** instead of ``object-type, object-name`` say 'universe' which means 'all object-types and all objects'. In this case, object name is omitted." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_grant.rst:29 +msgid "**Variation:** instead of ``privilege, object-type, object-name`` say ``role-name`` (see section :ref:`Roles `)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_grant.rst:32 +msgid "**Variation:** instead of :samp:`box.schema.user.grant('{user-name}','usage,session','universe',nil,` :code:`{if_not_exists=true})` say :samp:`box.schema.user.enable('{user-name}')`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_grant.rst:36 +msgid "The possible options are:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_grant.rst:38 +msgid "``grantor`` = *grantor_name_or_id* -- string or number, for custom grantor," +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_grant.rst:39 +msgid "``if_not_exists`` = ``true|false`` (default = ``false``) - boolean; ``true`` means there should be no error if the user already has the privilege." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_grant.rst:42 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_grant.rst:44 +msgid "box.schema.user.grant('Lena', 'read', 'space', 'tester')\n" +"box.schema.user.grant('Lena', 'execute', 'function', 'f')\n" +"box.schema.user.grant('Lena', 'read,write', 'universe')\n" +"box.schema.user.grant('Lena', 'Accountant')\n" +"box.schema.user.grant('Lena', 'read,write,execute', 'universe')\n" +"box.schema.user.grant('X', 'read', 'universe', nil, {if_not_exists=true})" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/user_info.pot b/locale/en/reference/reference_lua/box_schema/user_info.pot new file mode 100644 index 0000000000..12c97fac82 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/user_info.pot @@ -0,0 +1,46 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/user_info.rst:5 +msgid "box.schema.user.info()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_info.rst:11 +msgid "Return a description of a user's :ref:`privileges `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_info.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_info.rst:13 +msgid "the name of the user. This is optional; if it is not supplied, then the information will be for the user who is currently logged in." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_info.rst:19 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_info.rst:21 +msgid "tarantool> box.schema.user.info('admin')\n" +"---\n" +"- - - read,write,execute,session,usage,create,drop,alter,reference,trigger,insert,update,delete\n" +" - universe\n" +" -\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/user_passwd.pot b/locale/en/reference/reference_lua/box_schema/user_passwd.pot new file mode 100644 index 0000000000..e8259cada1 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/user_passwd.pot @@ -0,0 +1,54 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/user_passwd.rst:5 +msgid "box.schema.user.passwd()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_passwd.rst:11 +msgid "Sets a password for a currently logged in or a specified user:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_passwd.rst:13 +msgid "A currently logged in user can change their password using ``box.schema.user.passwd(new_password)``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_passwd.rst:16 +msgid "An administrator can change the password of another user with ``box.schema.user.passwd(name, new_password)``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_passwd.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_passwd.rst:19 +msgid "name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_passwd.rst:20 +msgid "new_password" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_passwd.rst:22 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_passwd.rst:24 +msgid "box.schema.user.passwd('foobar')\n" +"box.schema.user.passwd('testuser', 'foobar')" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/user_password.pot b/locale/en/reference/reference_lua/box_schema/user_password.pot new file mode 100644 index 0000000000..6660166f16 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/user_password.pot @@ -0,0 +1,57 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/user_password.rst:5 +msgid "box.schema.user.password()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_password.rst:11 +msgid "Return a hash of a user's password. For explanation of how Tarantool maintains passwords, see section :ref:`Passwords ` and reference on :ref:`_user ` space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_password.rst:17 +msgid "If a non-'guest' user has no password, it’s **impossible** to connect to Tarantool using this user. The user is regarded as “internal” only, not usable from a remote connection. Such users can be useful if they have defined some procedures with the :doc:`SETUID ` option, on which privileges are granted to externally-connectable users. This way, external users cannot create/drop objects, they can only invoke procedures." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_password.rst:26 +msgid "For the 'guest' user, it’s impossible to set a password: that would be misleading, since 'guest' is the default user on a newly-established connection over a :ref:`binary port `, and Tarantool does not require a password to establish a :ref:`binary connection `. It is, however, possible to change the current user to ‘guest’ by providing the :ref:`AUTH packet ` with no password at all or an empty password. This feature is useful for connection pools, which want to reuse a connection for a different user without re-establishing it." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_password.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_password.rst:36 +msgid "password to be hashed" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_password.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_password.rst:37 +msgid "string" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_password.rst:39 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_password.rst:41 +msgid "box.schema.user.password('foobar')" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema/user_revoke.pot b/locale/en/reference/reference_lua/box_schema/user_revoke.pot new file mode 100644 index 0000000000..a8e78c4d47 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema/user_revoke.pot @@ -0,0 +1,76 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema/user_revoke.rst:5 +msgid "box.schema.user.revoke()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_revoke.rst:13 +msgid "Revoke :ref:`privileges ` from a user or from another role." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_revoke.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_revoke.rst:16 +msgid "the name of the user." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_revoke.rst:17 +msgid "'read' or 'write' or 'execute' or 'create' or 'alter' or 'drop' or a combination." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_revoke.rst:19 +msgid "'space' or 'function' or 'sequence'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_revoke.rst:20 +msgid "the name of a function or space or sequence." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_revoke.rst:21 +msgid "``if_exists``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_revoke.rst:23 +msgid "The user must exist, and the object must exist, but if the option setting is ``{if_exists=true}`` then it is not an error if the user does not have the privilege." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_revoke.rst:27 +msgid "**Variation:** instead of ``object-type, object-name`` say 'universe' which means 'all object-types and all objects'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_revoke.rst:30 +msgid "**Variation:** instead of ``privilege, object-type, object-name`` say ``role-name`` (see section :ref:`Roles `)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_revoke.rst:33 +msgid "**Variation:** instead of :samp:`box.schema.user.revoke('{user-name}','usage,session','universe',nil,` :code:`{if_exists=true})` say :samp:`box.schema.user.disable('{user-name}')`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_revoke.rst:37 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema/user_revoke.rst:39 +msgid "box.schema.user.revoke('Lena', 'read', 'space', 'tester')\n" +"box.schema.user.revoke('Lena', 'execute', 'function', 'f')\n" +"box.schema.user.revoke('Lena', 'read,write', 'universe')\n" +"box.schema.user.revoke('Lena', 'Accountant')" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema_sequence.pot b/locale/en/reference/reference_lua/box_schema_sequence.pot new file mode 100644 index 0000000000..bdabdb2a35 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema_sequence.pot @@ -0,0 +1,130 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:5 +msgid "Sequences" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:7 +msgid "An introduction to sequences is in the :ref:`Sequences ` section of the \"Data model\" chapter. Here are the details for each function and option." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:11 +msgid "All functions related to sequences require appropriate :ref:`privileges `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:14 +msgid "Below is a list of all ``box.schema.sequence`` functions." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:25 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:26 +msgid "Use" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:28 +msgid ":doc:`./box_schema_sequence/create`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:29 +msgid "Create a new sequence generator" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:31 +msgid ":doc:`./box_schema_sequence/next`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:32 +msgid "Generate and return the next value" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:34 +msgid ":doc:`./box_schema_sequence/alter`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:35 +msgid "Change sequence options" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:37 +msgid ":doc:`./box_schema_sequence/reset`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:38 +msgid "Reset sequence state" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:40 +msgid ":doc:`./box_schema_sequence/set`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:41 +msgid "Set the new value" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:43 +msgid ":doc:`./box_schema_sequence/current`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:44 +msgid "Return the last retrieved value" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:46 +msgid ":doc:`./box_schema_sequence/drop`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:47 +msgid "Drop the sequence" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:49 +msgid ":doc:`./box_schema_sequence/create_index`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:50 +msgid "Create an index with a sequence option" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:64 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:66 +msgid "Here is an example showing all sequence options and operations:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence.rst:68 +msgid "s = box.schema.sequence.create(\n" +" 'S2',\n" +" {start=100,\n" +" min=100,\n" +" max=200,\n" +" cache=100000,\n" +" cycle=false,\n" +" step=100\n" +" })\n" +"s:alter({step=6})\n" +"s:next()\n" +"s:reset()\n" +"s:set(150)\n" +"s:drop()" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema_sequence/alter.pot b/locale/en/reference/reference_lua/box_schema_sequence/alter.pot new file mode 100644 index 0000000000..061a317c1f --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema_sequence/alter.pot @@ -0,0 +1,77 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema_sequence/alter.rst:5 +msgid "sequence_object:alter()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/alter.rst:11 +msgid "The ``alter()`` function can be used to change any of the sequence's options. Requirements and restrictions are the same as for :doc:`/reference/reference_lua/box_schema_sequence/create`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/alter.rst:15 +msgid "Options:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/alter.rst:17 +msgid "``start`` -- the STARTS WITH value. Type = integer, Default = 1." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/alter.rst:19 +msgid "``min`` -- the MINIMUM value. Type = integer, Default = 1." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/alter.rst:21 +msgid "``max`` - the MAXIMUM value. Type = integer, Default = 9223372036854775807." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/alter.rst:23 +msgid "There is a rule: ``min`` <= ``start`` <= ``max``. For example it is illegal to say ``{start=0}`` because then the specified start value (0) would be less than the default min value (1)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/alter.rst:27 +msgid "There is a rule: ``min`` <= next-value <= ``max``. For example, if the next generated value would be 1000, but the maximum value is 999, then that would be considered \"overflow\"." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/alter.rst:32 +msgid "``cycle`` -- the CYCLE value. Type = bool. Default = false." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/alter.rst:34 +msgid "If the sequence generator's next value is an overflow number, it causes an error return -- unless ``cycle == true``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/alter.rst:37 +msgid "But if ``cycle == true``, the count is started again, at the MINIMUM value or at the MAXIMUM value (not the STARTS WITH value)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/alter.rst:40 +msgid "``cache`` -- the CACHE value. Type = unsigned integer. Default = 0." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/alter.rst:42 +msgid "Currently Tarantool ignores this value, it is reserved for future use." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/alter.rst:44 +msgid "``step`` -- the INCREMENT BY value. Type = integer. Default = 1." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/alter.rst:46 +msgid "Ordinarily this is what is added to the previous value." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema_sequence/create.pot b/locale/en/reference/reference_lua/box_schema_sequence/create.pot new file mode 100644 index 0000000000..d52e71b3bf --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema_sequence/create.pot @@ -0,0 +1,101 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:5 +msgid "box.schema.sequence.create()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:11 +msgid "Create a new sequence generator." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:13 +msgid "the name of the sequence" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:15 +msgid "see a quick overview in the \"Options for ``box.schema.sequence.create()``\" :ref:`chart ` (in the :ref:`Sequences ` section of the \"Data model\" chapter), and see more details below." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:22 +msgid "a reference to a new sequence object." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:24 +msgid "Options:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:26 +msgid "``start`` -- the STARTS WITH value. Type = integer, Default = 1." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:28 +msgid "``min`` -- the MINIMUM value. Type = integer, Default = 1." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:30 +msgid "``max`` - the MAXIMUM value. Type = integer, Default = 9223372036854775807." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:32 +msgid "There is a rule: ``min`` <= ``start`` <= ``max``. For example it is illegal to say ``{start=0}`` because then the specified start value (0) would be less than the default min value (1)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:36 +msgid "There is a rule: ``min`` <= next-value <= ``max``. For example, if the next generated value would be 1000, but the maximum value is 999, then that would be considered \"overflow\"." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:41 +msgid "There is a rule: ``start`` and ``min`` and ``max`` must all be <= 9223372036854775807 which is 2^63 - 1 (not 2^64)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:44 +msgid "``cycle`` -- the CYCLE value. Type = bool. Default = false." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:46 +msgid "If the sequence generator's next value is an overflow number, it causes an error return -- unless ``cycle == true``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:49 +msgid "But if ``cycle == true``, the count is started again, at the MINIMUM value or at the MAXIMUM value (not the STARTS WITH value)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:52 +msgid "``cache`` -- the CACHE value. Type = unsigned integer. Default = 0." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:54 +msgid "Currently Tarantool ignores this value, it is reserved for future use." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:56 +msgid "``step`` -- the INCREMENT BY value. Type = integer. Default = 1." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create.rst:58 +msgid "Ordinarily this is what is added to the previous value." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema_sequence/create_index.pot b/locale/en/reference/reference_lua/box_schema_sequence/create_index.pot new file mode 100644 index 0000000000..35a178e042 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema_sequence/create_index.pot @@ -0,0 +1,99 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create_index.rst:5 +msgid "specifying a sequence in create_index()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create_index.rst:11 +msgid "You can use the :samp:`sequence={sequence-name}` (or :samp:`sequence={sequence-id}` or :samp:`sequence=true`) option when :ref:`creating ` or :doc:`altering ` a primary-key index. The sequence becomes associated with the index, so that the next ``insert()`` will put the next generated number into the primary-key field, if the field would otherwise be nil." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create_index.rst:19 +msgid "The syntax may be any of: |br| :samp:`sequence = {sequence identifier}` |br| or :code:`sequence = {id =` :samp:`{sequence identifier}` :code:`}` |br| or :code:`sequence = {field =` :samp:`{field number}` :code:`}` |br| or :code:`sequence = {id =` :samp:`{sequence identifier}` :code:`, field =` :samp:`{field number}` :code:`}` |br| or :code:`sequence = true` |br| or :code:`sequence = {}`. |br| The sequence identifier may be either a number (the sequence id) or a string (the sequence name). The field number may be the ordinal number of any field in the index; default = 1. Examples of all possibilities: ``sequence = 1`` or ``sequence = 'sequence_name'`` or ``sequence = {id = 1}`` or ``sequence = {id = 'sequence_name'}`` or ``sequence = {id = 1, field = 1}`` or ``sequence = {id = 'sequence_name', field = 1}`` or ``sequence = {field = 1}`` or ``sequence = true`` or ``sequence = {}``. Notice that the sequence identifier can be omitted, if it is omitted then a new sequence is created automatically with default name = :samp:`{space-name}_seq`. Notice that the field number does not have to be 1, that is, the sequence can be associated with any field in the primary-key index." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create_index.rst:53 +msgid "For example, if 'Q' is a sequence and 'T' is a new space, then this will work:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create_index.rst:56 +msgid "tarantool> box.space.T:create_index('Q',{sequence='Q'})\n" +"---\n" +"- unique: true\n" +" parts:\n" +" - type: unsigned\n" +" is_nullable: false\n" +" fieldno: 1\n" +" sequence_id: 8\n" +" id: 0\n" +" space_id: 514\n" +" name: Q\n" +" type: TREE\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create_index.rst:72 +msgid "(Notice that the index now has a ``sequence_id`` field.)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create_index.rst:74 +msgid "And this will work:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create_index.rst:76 +msgid "tarantool> box.space.T:insert{box.NULL,0}\n" +"---\n" +"- [1, 0]\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create_index.rst:85 +msgid "The index key type may be either 'integer' or 'unsigned'. If any of the sequence options is a negative number, then the index key type should be 'integer'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create_index.rst:89 +msgid "Users should not insert a value greater than 9223372036854775807, which is 2^63 - 1, in the indexed field. The sequence generator will ignore it." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create_index.rst:93 +msgid "A sequence cannot be dropped if it is associated with an index. However, :ref:`index_object:alter() ` can be used to say that a sequence is not associated with an index, for example ``box.space.T.index.I:alter({sequence=false})``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create_index.rst:99 +msgid "If a sequence was created automatically because the sequence identifier was omitted, then it will be dropped automatically if the index is altered so that ``sequence=false``, or if the index is dropped." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create_index.rst:104 +msgid "``index_object:alter()`` can also be used to associate a sequence with an existing index, with the same syntax for options." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create_index.rst:107 +msgid "When a sequence is used with an index based on a JSON path, inserted tuples must have all components of the path preceding the autoincrement field, and the autoincrement field. To achieve that use ``box.NULL`` rather than ``nil``. Example:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/create_index.rst:112 +msgid "s = box.schema.space.create('test')\n" +"s:create_index('pk', {parts = {{'[1].a.b[1]', 'unsigned'}}, sequence = true})\n" +"s:replace{} -- error\n" +"s:replace{{c = {}}} -- error\n" +"s:replace{{a = {c = {}}}} -- error\n" +"s:replace{{a = {b = {}}}} -- error\n" +"s:replace{{a = {b = {nil}}}} -- error\n" +"s:replace{{a = {b = {box.NULL}}}} -- ok" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema_sequence/current.pot b/locale/en/reference/reference_lua/box_schema_sequence/current.pot new file mode 100644 index 0000000000..7e9af4b964 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema_sequence/current.pot @@ -0,0 +1,61 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema_sequence/current.rst:5 +msgid "sequence_object:current()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/current.rst:11 +msgid "Since version :doc:`2.4.1 `. Return the last retrieved value of the specified sequence or throw an error if no value has been generated yet (``next()`` has not been called yet, or ``current()`` is called right after ``reset()`` is called)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/current.rst:16 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/current.rst:18 +msgid "tarantool> sq = box.schema.sequence.create('test')\n" +"---\n" +"...\n" +"tarantool> sq:current()\n" +"---\n" +"- error: Sequence 'test' is not started\n" +"...\n" +"tarantool> sq:next()\n" +"---\n" +"- 1\n" +"...\n" +"tarantool> sq:current()\n" +"---\n" +"- 1\n" +"...\n" +"tarantool> sq:set(42)\n" +"---\n" +"...\n" +"tarantool> sq:current()\n" +"---\n" +"- 42\n" +"...\n" +"tarantool> sq:reset()\n" +"---\n" +"...\n" +"tarantool> sq:current() -- error\n" +"---\n" +"- error: Sequence 'test' is not started\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema_sequence/drop.pot b/locale/en/reference/reference_lua/box_schema_sequence/drop.pot new file mode 100644 index 0000000000..d690d18205 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema_sequence/drop.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema_sequence/drop.rst:5 +msgid "sequence_object:drop()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/drop.rst:11 +msgid "Drop an existing sequence." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema_sequence/next.pot b/locale/en/reference/reference_lua/box_schema_sequence/next.pot new file mode 100644 index 0000000000..3fa516c9a7 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema_sequence/next.pot @@ -0,0 +1,89 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema_sequence/next.rst:5 +msgid "sequence_object:next()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/next.rst:11 +msgid "Generate the next value and return it." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/next.rst:13 +msgid "The generation algorithm is simple:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/next.rst:15 +msgid "If this is the first time, then return the STARTS WITH value." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/next.rst:16 +msgid "If the previous value plus the INCREMENT value is less than the MINIMUM value or greater than the MAXIMUM value, that is \"overflow\", so either raise an error (if ``cycle`` = ``false``) or return the MAXIMUM value (if ``cycle`` = ``true`` and ``step`` < 0) or return the MINIMUM value (if ``cycle`` = ``true`` and ``step`` > 0)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/next.rst:22 +msgid "If there was no error, then save the returned result, it is now the \"previous value\"." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/next.rst:25 +msgid "For example, suppose sequence 'S' has:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/next.rst:27 +msgid "``min`` == -6," +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/next.rst:28 +msgid "``max`` == -1," +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/next.rst:29 +msgid "``step`` == -3," +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/next.rst:30 +msgid "``start`` = -2," +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/next.rst:31 +msgid "``cycle`` = true," +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/next.rst:32 +msgid "previous value = -2." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/next.rst:34 +msgid "Then ``box.sequence.S:next()`` returns -5 because -2 + (-3) == -5." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/next.rst:36 +msgid "Then ``box.sequence.S:next()`` again returns -1 because -5 + (-3) < -6, which is overflow, causing cycle, and ``max`` == -1." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/next.rst:39 +msgid "This function requires a :doc:`'write' privilege ` on the sequence." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/next.rst:45 +msgid "This function should not be used in \"cross-engine\" transactions (transactions which use both the memtx and the vinyl storage engines)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/next.rst:48 +msgid "To see what the previous value was, without changing it, you can select from the :ref:`_sequence_data ` system space." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema_sequence/reset.pot b/locale/en/reference/reference_lua/box_schema_sequence/reset.pot new file mode 100644 index 0000000000..aa0c770dc2 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema_sequence/reset.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema_sequence/reset.rst:5 +msgid "sequence_object:reset()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/reset.rst:11 +msgid "Set the sequence back to its original state. The effect is that a subsequent ``next()`` will return the ``start`` value. This function requires a :doc:`'write' privilege ` on the sequence." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_schema_sequence/set.pot b/locale/en/reference/reference_lua/box_schema_sequence/set.pot new file mode 100644 index 0000000000..83e056f858 --- /dev/null +++ b/locale/en/reference/reference_lua/box_schema_sequence/set.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_schema_sequence/set.rst:5 +msgid "sequence_object:set()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_schema_sequence/set.rst:11 +msgid "Set the \"previous value\" to ``new-previous-value``. This function requires a :doc:`'write' privilege ` on the sequence." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_session.pot b/locale/en/reference/reference_lua/box_session.pot new file mode 100644 index 0000000000..b40b8fc532 --- /dev/null +++ b/locale/en/reference/reference_lua/box_session.pot @@ -0,0 +1,161 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_session.rst:5 +msgid "Submodule box.session" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:7 +msgid "The ``box.session`` submodule allows querying the session state, writing to a session-specific temporary Lua table, or sending out-of-band messages, or setting up triggers which will fire when a session starts or ends." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:11 +msgid "A *session* is an object associated with each client connection." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:13 +msgid "Below is a list of all ``box.session`` functions and members." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:24 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:25 +msgid "Use" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:27 +msgid ":doc:`./box_session/id`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:28 +msgid "Get the current session's ID" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:30 +msgid ":doc:`./box_session/exists`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:31 +msgid "Check if a session exists" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:33 +msgid ":doc:`./box_session/peer`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:34 +msgid "Get the session peer's host address and port" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:36 +msgid ":doc:`./box_session/sync`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:37 +msgid "Get the sync integer constant" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:39 +msgid ":doc:`./box_session/user`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:40 +msgid "Get the current user's name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:42 +msgid ":doc:`./box_session/type`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:43 +msgid "Get the connection type or cause of action" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:45 +msgid ":doc:`./box_session/su`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:46 +msgid "Change the current user" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:48 +msgid ":doc:`./box_session/uid`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:49 +msgid "Get the current user's ID" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:51 +msgid ":doc:`./box_session/euid`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:52 +msgid "Get the current effective user's ID" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:54 +msgid ":doc:`./box_session/storage`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:55 +msgid "Table with session-specific names and values" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:57 +msgid ":doc:`./box_session/on_connect`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:58 +msgid "Define a connect trigger" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:60 +msgid ":doc:`./box_session/on_disconnect`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:61 +msgid "Define a disconnect trigger" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:63 +msgid ":doc:`./box_session/on_auth`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:64 +msgid "Define an authentication trigger" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:66 +msgid ":doc:`./box_session/on_access_denied`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:67 +msgid "Define a trigger to report restricted actions" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:69 +msgid ":doc:`./box_session/push`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session.rst:70 +msgid "Send an out-of-band message" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_session/euid.pot b/locale/en/reference/reference_lua/box_session/euid.pot new file mode 100644 index 0000000000..93eb680479 --- /dev/null +++ b/locale/en/reference/reference_lua/box_session/euid.pot @@ -0,0 +1,72 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_session/euid.rst:6 +msgid "box.session.euid()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/euid.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/euid.rst:12 +msgid "the effective user ID of the :ref:`current user `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/euid.rst:14 +msgid "This is the same as :doc:`/reference/reference_lua/box_session/uid`, except in two cases:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/euid.rst:17 +msgid "The first case: if the call to ``box.session.euid()`` is within a function invoked by :doc:`box.session.su(user-name, function-to-execute) ` -- in that case, ``box.session.euid()`` returns the ID of the changed user (the user who is specified by the ``user-name`` parameter of the ``su`` function) but ``box.session.uid()`` returns the ID of the original user (the user who is calling the ``su`` function)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/euid.rst:25 +msgid "The second case: if the call to ``box.session.euid()`` is within a function specified with :doc:`box.schema.func.create(function-name, {setuid= true}) ` and the binary protocol is in use -- in that case, ``box.session.euid()`` returns the ID of the user who created \"function-name\" but ``box.session.uid()`` returns the ID of the the user who is calling \"function-name\"." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/euid.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/euid.rst:33 +msgid "number" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/euid.rst:35 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/euid.rst:37 +msgid "tarantool> box.session.su('admin')\n" +"---\n" +"...\n" +"tarantool> box.session.uid(), box.session.euid()\n" +"---\n" +"- 1\n" +"- 1\n" +"...\n" +"tarantool> function f() return {box.session.uid(),box.session.euid()} end\n" +"---\n" +"...\n" +"tarantool> box.session.su('guest', f)\n" +"---\n" +"- - 1\n" +" - 0\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_session/exists.pot b/locale/en/reference/reference_lua/box_session/exists.pot new file mode 100644 index 0000000000..21ac58f9ca --- /dev/null +++ b/locale/en/reference/reference_lua/box_session/exists.pot @@ -0,0 +1,37 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_session/exists.rst:6 +msgid "box.session.exists()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/exists.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/exists.rst:12 +msgid "true if the session exists, false if the session does not exist." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/exists.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/exists.rst:13 +msgid "boolean" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_session/id.pot b/locale/en/reference/reference_lua/box_session/id.pot new file mode 100644 index 0000000000..4424d77474 --- /dev/null +++ b/locale/en/reference/reference_lua/box_session/id.pot @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-21 08:10+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_session/id.rst:5 +msgid "box.session.id()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/id.rst:11 +msgid "Return the unique identifier (ID) for the current session." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/id.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/id.rst:13 +msgid "the session identifier; 0 or -1 if there is no session" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/id.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/id.rst:14 +msgid "number" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_session/on_access_denied.pot b/locale/en/reference/reference_lua/box_session/on_access_denied.pot new file mode 100644 index 0000000000..d990bc7f97 --- /dev/null +++ b/locale/en/reference/reference_lua/box_session/on_access_denied.pot @@ -0,0 +1,87 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_session/on_access_denied.rst:6 +msgid "box.session.on_access_denied()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_access_denied.rst:12 +msgid "Define a trigger for reacting to user's attempts to execute actions that are not within the user's privileges." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_access_denied.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_access_denied.rst:15 +msgid "function which will become the trigger function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_access_denied.rst:17 +msgid "existing trigger function which will be replaced by trigger-function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_access_denied.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_access_denied.rst:19 +msgid "nil or function pointer" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_access_denied.rst:21 +msgid "If the parameters are (nil, old-trigger-function), then the old trigger is deleted." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_access_denied.rst:24 +msgid "If both parameters are omitted, then the response is a list of existing trigger functions." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_access_denied.rst:27 +msgid "Details about trigger characteristics are in the :ref:`triggers ` section." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_access_denied.rst:31 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_access_denied.rst:33 +msgid "For example, server administrator can log restricted actions like this:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_access_denied.rst:35 +msgid "tarantool> function on_access_denied(op, type, name)\n" +" > log.warn('User %s tried to %s %s %s without required privileges', box.session.user(), op, type, name)\n" +" > end\n" +"---\n" +"...\n" +"tarantool> box.session.on_access_denied(on_access_denied)\n" +"---\n" +"- 'function: 0x011b41af38'\n" +"...\n" +"tarantool> function test() print('you shall not pass') end\n" +"---\n" +"...\n" +"tarantool> box.schema.func.create('test')\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_access_denied.rst:53 +msgid "Then, when some user without required privileges tries to call ``test()`` and gets the error, the server will execute this trigger and write to log **\"User *user_name* tried to Execute function test without required privileges\"**" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_session/on_auth.pot b/locale/en/reference/reference_lua/box_session/on_auth.pot new file mode 100644 index 0000000000..4d96583bb6 --- /dev/null +++ b/locale/en/reference/reference_lua/box_session/on_auth.pot @@ -0,0 +1,158 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:6 +msgid "box.session.on_auth()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:12 +msgid "Define a trigger for execution during :ref:`authentication `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:15 +msgid "The ``on_auth`` trigger function is invoked in these circumstances:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:17 +msgid "The :ref:`console.connect ` function includes an authentication check for all users except 'guest'. For this case, the ``on_auth`` trigger function is invoked after the ``on_connect`` trigger function, if and only if the connection has succeeded so far." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:22 +msgid "The :ref:`binary protocol ` has a separate :ref:`authentication packet `. For this case, connection and authentication are considered to be separate steps." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:26 +msgid "Unlike other trigger types, ``on_auth`` trigger functions are invoked **before** the event. Therefore a trigger function like :code:`function auth_function () v = box.session.user(); end` will set :code:`v` to \"guest\", the user name before the authentication is done. To get the user name **after** the authentication is done, use the special syntax: :code:`function auth_function (user_name) v = user_name; end`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:33 +msgid "If the trigger fails by raising an error, the error is sent to the client and the connection is closed." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:36 +msgid "function which will become the trigger function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:38 +msgid "existing trigger function which will be replaced by trigger-function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:40 +msgid "nil or function pointer" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:42 +msgid "If the parameters are (nil, old-trigger-function), then the old trigger is deleted." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:45 +msgid "If both parameters are omitted, then the response is a list of existing trigger functions." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:48 +msgid "Details about trigger characteristics are in the :ref:`triggers ` section." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:51 +msgid "**Example 1**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:53 +msgid "tarantool> function f ()\n" +" > x = x + 1\n" +" > end\n" +"tarantool> box.session.on_auth(f)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:60 +msgid "**Example 2**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:62 +msgid "This is a more complex example, with two server instances." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:64 +msgid "The first server instance listens on port 3301; its default user name is 'admin'. There are three ``on_auth`` triggers:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:68 +msgid "The first trigger has a function with no arguments, it can only look at ``box.session.user()``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:70 +msgid "The second trigger has a function with a ``user_name`` argument, it can look at both of: ``box.session.user()`` and ``user_name``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:72 +msgid "The third trigger has a function with a ``user_name`` argument and a ``status`` argument, it can look at all three of: ``box.session.user()`` and ``user_name`` and ``status``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:77 +msgid "The second server instance will connect with :ref:`console.connect `, and then will cause a display of the variables that were set by the trigger functions." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:82 +msgid "-- On the first server instance, which listens on port 3301\n" +"box.cfg{listen=3301}\n" +"function function1()\n" +" print('function 1, box.session.user()='..box.session.user())\n" +" end\n" +"function function2(user_name)\n" +" print('function 2, box.session.user()='..box.session.user())\n" +" print('function 2, user_name='..user_name)\n" +" end\n" +"function function3(user_name, status)\n" +" print('function 3, box.session.user()='..box.session.user())\n" +" print('function 3, user_name='..user_name)\n" +" if status == true then\n" +" print('function 3, status = true, authorization succeeded')\n" +" end\n" +" end\n" +"box.session.on_auth(function1)\n" +"box.session.on_auth(function2)\n" +"box.session.on_auth(function3)\n" +"box.schema.user.passwd('admin')" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:105 +msgid "-- On the second server instance, that connects to port 3301\n" +"console = require('console')\n" +"console.connect('admin:admin@localhost:3301')" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:111 +msgid "The result looks like this:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_auth.rst:113 +msgid "function 3, box.session.user()=guest\n" +"function 3, user_name=admin\n" +"function 3, status = true, authorization succeeded\n" +"function 2, box.session.user()=guest\n" +"function 2, user_name=admin\n" +"function 1, box.session.user()=guest" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_session/on_connect.pot b/locale/en/reference/reference_lua/box_session/on_connect.pot new file mode 100644 index 0000000000..dcd7d337e3 --- /dev/null +++ b/locale/en/reference/reference_lua/box_session/on_connect.pot @@ -0,0 +1,72 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_session/on_connect.rst:6 +msgid "box.session.on_connect()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_connect.rst:12 +msgid "Define a trigger for execution when a new session is created due to an event such as :ref:`console.connect `. The trigger function will be the first thing executed after a new session is created. If the trigger execution fails and raises an error, the error is sent to the client and the connection is closed." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_connect.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_connect.rst:18 +msgid "function which will become the trigger function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_connect.rst:20 +msgid "existing trigger function which will be replaced by trigger-function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_connect.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_connect.rst:22 +msgid "nil or function pointer" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_connect.rst:24 +msgid "If the parameters are (nil, old-trigger-function), then the old trigger is deleted." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_connect.rst:27 +msgid "If both parameters are omitted, then the response is a list of existing trigger functions." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_connect.rst:30 +msgid "Details about trigger characteristics are in the :ref:`triggers ` section." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_connect.rst:33 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_connect.rst:35 +msgid "tarantool> function f ()\n" +" > x = x + 1\n" +" > end\n" +"tarantool> box.session.on_connect(f)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_connect.rst:44 +msgid "If a trigger always results in an error, it may become impossible to connect to a server to reset it." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_session/on_disconnect.pot b/locale/en/reference/reference_lua/box_session/on_disconnect.pot new file mode 100644 index 0000000000..2a1578a948 --- /dev/null +++ b/locale/en/reference/reference_lua/box_session/on_disconnect.pot @@ -0,0 +1,108 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_session/on_disconnect.rst:6 +msgid "box.session.on_disconnect()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_disconnect.rst:12 +msgid "Define a trigger for execution after a client has disconnected. If the trigger function causes an error, the error is logged but otherwise is ignored. The trigger is invoked while the session associated with the client still exists and can access session properties, such as :doc:`/reference/reference_lua/box_session/id`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_disconnect.rst:18 +msgid "Since version 1.10, the trigger function is invoked immediately after the disconnect, even if requests that were made during the session have not finished." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_disconnect.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_disconnect.rst:22 +msgid "function which will become the trigger function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_disconnect.rst:24 +msgid "existing trigger function which will be replaced by trigger-function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_disconnect.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_disconnect.rst:26 +msgid "nil or function pointer" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_disconnect.rst:28 +msgid "If the parameters are (nil, old-trigger-function), then the old trigger is deleted." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_disconnect.rst:31 +msgid "If both parameters are omitted, then the response is a list of existing trigger functions." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_disconnect.rst:34 +msgid "Details about trigger characteristics are in the :ref:`triggers ` section." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_disconnect.rst:37 +msgid "**Example #1**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_disconnect.rst:39 +msgid "tarantool> function f ()\n" +" > x = x + 1\n" +" > end\n" +"tarantool> box.session.on_disconnect(f)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_disconnect.rst:46 +msgid "**Example #2**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_disconnect.rst:48 +msgid "After the following series of requests, a Tarantool instance will write a message using the :ref:`log ` module whenever any user connects or disconnects." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_disconnect.rst:52 +msgid "function log_connect ()\n" +" local log = require('log')\n" +" local m = 'Connection. user=' .. box.session.user() .. ' id=' .. box.session.id()\n" +" log.info(m)\n" +"end\n" +"\n" +"function log_disconnect ()\n" +" local log = require('log')\n" +" local m = 'Disconnection. user=' .. box.session.user() .. ' id=' .. box.session.id()\n" +" log.info(m)\n" +"end\n" +"\n" +"box.session.on_connect(log_connect)\n" +"box.session.on_disconnect(log_disconnect)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_disconnect.rst:69 +msgid "Here is what might appear in the log file in a typical installation:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/on_disconnect.rst:71 +msgid "2014-12-15 13:21:34.444 [11360] main/103/iproto I>\n" +" Connection. user=guest id=3\n" +"2014-12-15 13:22:19.289 [11360] main/103/iproto I>\n" +" Disconnection. user=guest id=3" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_session/peer.pot b/locale/en/reference/reference_lua/box_session/peer.pot new file mode 100644 index 0000000000..6f7ed6ab52 --- /dev/null +++ b/locale/en/reference/reference_lua/box_session/peer.pot @@ -0,0 +1,45 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_session/peer.rst:6 +msgid "box.session.peer()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/peer.rst:12 +msgid "This function works only if there is a peer, that is, if a connection has been made to a separate Tarantool instance." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/peer.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/peer.rst:15 +msgid "The host address and port of the session peer, for example \"127.0.0.1:55457\". If the session exists but there is no connection to a separate instance, the return is null. The command is executed on the server instance, so the \"local name\" is the server instance's host and port, and the \"peer name\" is the client's host and port." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/peer.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/peer.rst:23 +msgid "string" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/peer.rst:25 +msgid "Possible errors: 'session.peer(): session does not exist'" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_session/push.pot b/locale/en/reference/reference_lua/box_session/push.pot new file mode 100644 index 0000000000..29931021ba --- /dev/null +++ b/locale/en/reference/reference_lua/box_session/push.pot @@ -0,0 +1,154 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_session/push.rst:6 +msgid "box.session.push()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/push.rst:13 +msgid "Generate an out-of-band message. By \"out-of-band\" we mean an extra message which supplements what is passed in a network via the usual channels. Although ``box.session.push()`` can be called at any time, in practice it is used with networks that are set up with :ref:`module net.box `, and it is invoked by the server (on the \"remote database system\" to use our terminology for net.box), and the client has options for getting such messages." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/push.rst:22 +msgid "This function returns an error if the session is disconnected." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/push.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/push.rst:24 +msgid "what to send" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/push.rst:25 +msgid "an optional argument to indicate what the session is, as taken from an earlier call to :doc:`/reference/reference_lua/box_session/sync`. If it is omitted, the default is the current ``box.session.sync()`` value. In Tarantool version :doc:`2.4.2 `, ``sync`` is **deprecated** and its use will cause a warning. Since version 2.5.1, its use will cause an error." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/push.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/push.rst:33 +msgid "{nil, error} or true:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/push.rst:35 +msgid "If the result is an error, then the first part of the return is ``nil`` and the second part is the error object." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/push.rst:37 +msgid "If the result is not an error, then the return is the boolean value ``true``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/push.rst:38 +msgid "When the return is ``true``, the message has gone to the network buffer as a :ref:`packet ` with a different header code so the client can distinguish from an ordinary Okay response." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/push.rst:43 +msgid "The server's sole job is to call ``box.session.push()``, there is no automatic mechanism for showing that the message was received." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/push.rst:46 +msgid "The client's job is to check for such messages after it sends something to the server. The major client methods -- :ref:`conn:call `, :ref:`conn:eval `, :ref:`conn:select `, :ref:`conn:insert `, :ref:`conn:replace `, :ref:`conn:update `, :ref:`conn:upsert `, :ref:`delete ` -- may cause the server to send a message." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/push.rst:54 +msgid "Situation 1: when the client calls synchronously with the default ``{async=false}`` option. There are two optional additional options: :samp:`on_push={function-name}`, and :samp:`on_push_ctx={function-argument}`. When the client receives an out-of-band message for the session, it invokes \"function-name(function-argument)\". For example, with options ``{on_push=table.insert, on_push_ctx=messages}``, the client will insert whatever it receives into a table named 'messages'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/push.rst:62 +msgid "Situation 2: when the client calls asynchronously with the non-default ``{async=true}`` option. Here ``on_push`` and ``on_push_ctx`` are not allowed, but the messages can be seen by calling ``pairs()`` in a loop." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/push.rst:66 +msgid "Situation 2 complication: ``pairs()`` is subject to timeout. So there is an optional argument = timeout per iteration. If timeout occurs before there is a new message or a final response, there is an error return. To check for an error one can use the first loop parameter (if the loop starts with \"for i, message in future:pairs()\" then the first loop parameter is i). If it is ``box.NULL`` then the second parameter (in our example, \"message\") is the error object." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/push.rst:74 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/push.rst:76 +msgid "-- Make two shells. On Shell#1 set up a \"server\", and\n" +"-- in it have a function that includes box.session.push:\n" +"box.cfg{listen=3301}\n" +"box.schema.user.grant('guest','read,write,execute','universe')\n" +"x = 0\n" +"fiber = require('fiber')\n" +"function server_function() x=x+1; fiber.sleep(1); box.session.push(x); end\n" +"\n" +"-- On Shell#2 connect to this server as a \"client\" that\n" +"-- can handle Lua (such as another Tarantool server operating\n" +"-- as a client), and initialize a table where we'll get messages:\n" +"net_box = require('net.box')\n" +"conn = net_box.connect(3301)\n" +"messages_from_server = {}\n" +"\n" +"-- On Shell#2 remotely call the server function and receive\n" +"-- a SYNCHRONOUS out-of-band message:\n" +"conn:call('server_function', {},\n" +" {is_async = false,\n" +" on_push = table.insert,\n" +" on_push_ctx = messages_from_server})\n" +"messages_from_server\n" +"-- After a 1-second pause that is caused by the fiber.sleep()\n" +"-- request inside server_function, the result in the\n" +"-- messages_from_server table will be: 1. Like this:\n" +"-- tarantool> messages_from_server\n" +"-- ---\n" +"-- - - 1\n" +"-- ...\n" +"-- Good. That shows that box.session.push(x) worked,\n" +"-- because we know that x was 1.\n" +"\n" +"-- On Shell#2 remotely call the same server function and\n" +"-- get an ASYNCHRONOUS out-of-band message. For this we cannot\n" +"-- use on_push and on_push_ctx options, but we can use pairs():\n" +"future = conn:call('server_function', {}, {is_async = true})\n" +"messages = {}\n" +"keys = {}\n" +"for i, message in future:pairs() do\n" +" table.insert(messages, message) table.insert(keys, i) end\n" +"messages\n" +"future:wait_result(1000)\n" +"for i, message in future:pairs() do\n" +" table.insert(messages, message) table.insert(keys, i) end\n" +"messages\n" +"-- There is no pause because conn:call does not wait for\n" +"-- server_function to finish. The first time that we go through\n" +"-- the pairs() loop, we see the messages table is empty. Like this:\n" +"-- tarantool> messages\n" +"-- ---\n" +"-- - - 2\n" +"-- - []\n" +"-- ...\n" +"-- That is okay because the server hasn't yet called\n" +"-- box.session.push(). The second time that we go through\n" +"-- the pairs() loop, we see the value of x at the time of\n" +"-- the second call to box.session.push(). Like this:\n" +"-- tarantool> messages\n" +"-- ---\n" +"-- - - 2\n" +"-- - &0 []\n" +"-- - 2\n" +"-- - *0\n" +"-- ...\n" +"-- Good. That shows that the message was asynchronous, and\n" +"-- that box.session.push() did its job." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_session/storage.pot b/locale/en/reference/reference_lua/box_session/storage.pot new file mode 100644 index 0000000000..a9824a1a4a --- /dev/null +++ b/locale/en/reference/reference_lua/box_session/storage.pot @@ -0,0 +1,54 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_session/storage.rst:6 +msgid "box.session.storage" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/storage.rst:12 +msgid "A Lua table that can hold arbitrary unordered session-specific names and values, which will last until the session ends. For example, this table could be useful to store current tasks when working with a `Tarantool queue manager `_." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/storage.rst:17 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/storage.rst:19 +msgid "tarantool> box.session.peer(box.session.id())\n" +"---\n" +"- 127.0.0.1:45129\n" +"...\n" +"tarantool> box.session.storage.random_memorandum = \"Don't forget the eggs\"\n" +"---\n" +"...\n" +"tarantool> box.session.storage.radius_of_mars = 3396\n" +"---\n" +"...\n" +"tarantool> m = ''\n" +"---\n" +"...\n" +"tarantool> for k, v in pairs(box.session.storage) do\n" +" > m = m .. k .. '='.. v .. ' '\n" +" > end\n" +"---\n" +"...\n" +"tarantool> m\n" +"---\n" +"- 'radius_of_mars=3396 random_memorandum=Don't forget the eggs. '\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_session/su.pot b/locale/en/reference/reference_lua/box_session/su.pot new file mode 100644 index 0000000000..0ff61d8dc2 --- /dev/null +++ b/locale/en/reference/reference_lua/box_session/su.pot @@ -0,0 +1,62 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_session/su.rst:6 +msgid "box.session.su()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/su.rst:12 +msgid "Change Tarantool's :ref:`current user ` -- this is analogous to the Unix command ``su``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/su.rst:15 +msgid "Or, if function-to-execute is specified, change Tarantool's :ref:`current user ` temporarily while executing the function -- this is analogous to the Unix command ``sudo``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/su.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/su.rst:20 +msgid "name of a target user" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/su.rst:21 +msgid "name of a function, or definition of a function. Additional parameters may be passed to ``box.session.su``, they will be interpreted as parameters of function-to-execute." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/su.rst:26 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/su.rst:28 +msgid "tarantool> function f(a) return box.session.user() .. a end\n" +"---\n" +"...\n" +"\n" +"tarantool> box.session.su('guest', f, '-xxx')\n" +"---\n" +"- guest-xxx\n" +"...\n" +"\n" +"tarantool> box.session.su('guest',function(...) return ... end,1,2)\n" +"---\n" +"- 1\n" +"- 2\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_session/sync.pot b/locale/en/reference/reference_lua/box_session/sync.pot new file mode 100644 index 0000000000..883194f1af --- /dev/null +++ b/locale/en/reference/reference_lua/box_session/sync.pot @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_session/sync.rst:6 +msgid "box.session.sync()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/sync.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/sync.rst:12 +msgid "the value of the :code:`sync` integer constant used in the `binary protocol `_. This value becomes invalid when the session is disconnected." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/sync.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/sync.rst:16 +msgid "number" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/sync.rst:18 +msgid "This function is local for the request, i.e. not global for the session. If the connection behind the session is multiplexed, this function can be safely used inside the request processor." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_session/type.pot b/locale/en/reference/reference_lua/box_session/type.pot new file mode 100644 index 0000000000..b57ce59e49 --- /dev/null +++ b/locale/en/reference/reference_lua/box_session/type.pot @@ -0,0 +1,65 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_session/type.rst:6 +msgid "box.session.type()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/type.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/type.rst:12 +msgid "the type of connection or cause of action." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/type.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/type.rst:14 +msgid "string" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/type.rst:16 +msgid "Possible return values are:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/type.rst:18 +msgid "'binary' if the connection was done via the binary protocol, for example to a target made with :ref:`box.cfg{listen=...} `;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/type.rst:21 +msgid "'console' if the connection was done via the administrative console, for example to a target made with :ref:`console.listen `;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/type.rst:24 +msgid "'repl' if the connection was done directly, for example when :ref:`using Tarantool as a client `;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/type.rst:26 +msgid "'applier' if the action is due to :ref:`replication `, regardless of how the connection was done;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/type.rst:29 +msgid "'background' if the action is in a :ref:`background fiber `, regardless of whether the Tarantool server was :ref:`started in the background `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/type.rst:34 +msgid "``box.session.type()`` is useful for an :ref:`on_replace() ` trigger on a replica -- the value will be 'applier' if and only if the trigger was activated because of a request that was done on the master." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_session/uid.pot b/locale/en/reference/reference_lua/box_session/uid.pot new file mode 100644 index 0000000000..9f500c6841 --- /dev/null +++ b/locale/en/reference/reference_lua/box_session/uid.pot @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_session/uid.rst:6 +msgid "box.session.uid()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/uid.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/uid.rst:12 +msgid "the user ID of the :ref:`current user `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/uid.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/uid.rst:14 +msgid "number" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/uid.rst:16 +msgid "Every user has a unique name (seen with :doc:`/reference/reference_lua/box_session/user`) and a unique ID (seen with ``box.session.uid()``). The values are stored together in the ``_user`` space." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_session/user.pot b/locale/en/reference/reference_lua/box_session/user.pot new file mode 100644 index 0000000000..3d574972a3 --- /dev/null +++ b/locale/en/reference/reference_lua/box_session/user.pot @@ -0,0 +1,37 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_session/user.rst:6 +msgid "box.session.user()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/user.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/user.rst:12 +msgid "the name of the :ref:`current user `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/user.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_session/user.rst:14 +msgid "string" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_slab.pot b/locale/en/reference/reference_lua/box_slab.pot new file mode 100644 index 0000000000..1970eac222 --- /dev/null +++ b/locale/en/reference/reference_lua/box_slab.pot @@ -0,0 +1,61 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_slab.rst:5 +msgid "Submodule box.slab" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab.rst:7 +msgid "The ``box.slab`` submodule provides access to slab allocator statistics. The slab allocator is the main allocator used to store :ref:`tuples `. This can be used to monitor the total memory usage and memory fragmentation." +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab.rst:11 +msgid "Below is a list of all ``box.slab`` functions." +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab.rst:22 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab.rst:23 +msgid "Use" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab.rst:25 +msgid ":doc:`./box_slab/runtime_info`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab.rst:26 +msgid "Show a memory usage report for Lua runtime" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab.rst:28 +msgid ":doc:`./box_slab/slab_info`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab.rst:29 +msgid "Show an aggregated memory usage report for slab allocator" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab.rst:31 +msgid ":doc:`./box_slab/slab_stats`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab.rst:32 +msgid "Show a detailed memory usage report for slab allocator" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_slab/runtime_info.pot b/locale/en/reference/reference_lua/box_slab/runtime_info.pot new file mode 100644 index 0000000000..caa1c652c9 --- /dev/null +++ b/locale/en/reference/reference_lua/box_slab/runtime_info.pot @@ -0,0 +1,70 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_slab/runtime_info.rst:5 +msgid "box.runtime.info()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/runtime_info.rst:11 +msgid "Show runtime memory usage report in bytes." +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/runtime_info.rst:13 +msgid "The runtime memory encompasses internal Lua memory as well as the runtime arena. The Lua memory stores Lua objects. The runtime arena stores Tarantool-specific objects -- for example, runtime tuples, network buffers and other objects associated with the application server subsystem." +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/runtime_info.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/runtime_info.rst:20 +msgid "``lua`` is the size of the Lua heap that is controlled by the Lua garbage collector." +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/runtime_info.rst:21 +msgid "``maxalloc`` is the maximum size of the runtime memory." +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/runtime_info.rst:22 +msgid "``used`` is the current number of bytes used by the runtime memory." +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/runtime_info.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/runtime_info.rst:24 +msgid "table" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/runtime_info.rst:26 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/runtime_info.rst:28 +msgid "tarantool> box.runtime.info()\n" +"---\n" +"- lua: 913710\n" +" maxalloc: 4398046510080\n" +" used: 12582912\n" +"...\n" +"tarantool> box.runtime.info().used\n" +"---\n" +"- used: 12582912\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_slab/slab_info.pot b/locale/en/reference/reference_lua/box_slab/slab_info.pot new file mode 100644 index 0000000000..b3cbc8bd9d --- /dev/null +++ b/locale/en/reference/reference_lua/box_slab/slab_info.pot @@ -0,0 +1,137 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:5 +msgid "box.slab.info()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:11 +msgid "Show an aggregated memory usage report (in bytes) for the slab allocator. This report is useful for assessing out-of-memory risks." +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:14 +msgid "``box.slab.info`` gives a few ratios:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:16 +msgid "items_used_ratio" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:17 +msgid "arena_used_ratio" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:18 +msgid "quota_used_ratio" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:20 +msgid "Here are two possible cases for monitoring memtx memory usage:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:22 +msgid "**Case 1:** 0.5 < ``items_used_ratio`` < 0.9" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:27 +msgid "Apparently your memory is highly fragmented. Check how many slab classes you have by looking at ``box.slab.stats()`` and counting the number of different classes. If there are many slab classes (more than a few dozens), you may run out of memory even though memory utilization is not high. While each slab may have few items used, whenever a tuple of a size different from any existing slab class size is allocated, Tarantool may need to get a new slab from the slab arena, and since the arena has few empty slabs left, it will attempt to increase its quota usage, which, in turn, may end up with an out-of-memory error due to the low remaining quota." +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:37 +msgid "**Case 2:** ``items_used_ratio`` > 0.9" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:42 +msgid "You are running out of memory. All memory utilization indicators are high. Your memory is not fragmented, but there are few reserves left on each slab allocator level. You should consider increasing Tarantool's memory limit (``box.cfg.memtx_memory``)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:47 +msgid "**To sum up:** your main out-of-memory indicator is ``quota_used_ratio``. However, there are lots of perfectly stable setups with a high ``quota_used_ratio``, so you only need to pay attention to it when both arena and item used ratio are also high." +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:54 +msgid "``quota_size`` - memory limit for slab allocator (as configured in the :ref:`memtx_memory ` parameter, the default is 2^28 bytes = 268,435,456 bytes)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:57 +msgid "``quota_used`` - used by slab allocator" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:58 +msgid "``items_size`` - allocated only for tuples" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:59 +msgid "``items_used`` - used only for tuples" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:60 +msgid "``arena_size`` - allocated for both tuples and indexes" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:61 +msgid "``arena_used`` - used for both tuples and indexes" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:62 +msgid "``items_used_ratio`` = ``items_used`` / ``items_size``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:63 +msgid "``quota_used_ratio`` = ``quota_used`` / ``quota_size``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:64 +msgid "``arena_used_ratio`` = ``arena_used`` / ``arena_size``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:66 +msgid "table" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:68 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_info.rst:70 +msgid "tarantool> box.slab.info()\n" +"---\n" +"- items_size: 228128\n" +" items_used_ratio: 1.8%\n" +" quota_size: 1073741824\n" +" quota_used_ratio: 0.8%\n" +" arena_used_ratio: 43.2%\n" +" items_used: 4208\n" +" quota_used: 8388608\n" +" arena_size: 2325176\n" +" arena_used: 1003632\n" +"...\n" +"\n" +"tarantool> box.slab.info().arena_used\n" +"---\n" +"- 1003632\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_slab/slab_stats.pot b/locale/en/reference/reference_lua/box_slab/slab_stats.pot new file mode 100644 index 0000000000..ba6f81f1f2 --- /dev/null +++ b/locale/en/reference/reference_lua/box_slab/slab_stats.pot @@ -0,0 +1,124 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_slab/slab_stats.rst:5 +msgid "box.slab.stats()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_stats.rst:11 +msgid "Show a detailed memory usage report (in bytes) for the slab allocator. The report is broken down into groups by *data item size* as well as by *slab size* (64-byte, 136-byte, etc). The report includes the memory allocated for storing both tuples and indexes." +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_stats.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_stats.rst:18 +msgid "``mem_free`` is the allocated, but currently unused memory;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_stats.rst:19 +msgid "``mem_used`` is the memory used for storing data items (tuples and indexes);" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_stats.rst:20 +msgid "``item_count`` is the number of stored items;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_stats.rst:21 +msgid "``item_size`` is the size of each data item;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_stats.rst:22 +msgid "``slab_count`` is the number of slabs allocated;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_stats.rst:23 +msgid "``slab_size`` is the size of each allocated slab." +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_stats.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_stats.rst:25 +msgid "table" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_stats.rst:27 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_stats.rst:29 +msgid "Here is a sample report for the first group:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_stats.rst:31 +msgid "tarantool> box.slab.stats()[1]\n" +"---\n" +"- mem_free: 16232\n" +" mem_used: 48\n" +" item_count: 2\n" +" item_size: 24\n" +" slab_count: 1\n" +" slab_size: 16384\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_stats.rst:43 +msgid "This report is saying that there are 2 data items (``item_count`` = 2) stored in one (``slab_count`` = 1) 24-byte slab (``item_size`` = 24), so ``mem_used`` = 2 * 24 = 48 bytes. Also, ``slab_size`` is 16384 bytes, of which 16384 - 48 = 16232 bytes are free (``mem_free``)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_stats.rst:48 +msgid "A complete report would show memory usage statistics for all groups:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_stats.rst:50 +msgid "tarantool> box.slab.stats()\n" +"---\n" +"- - mem_free: 16232\n" +" mem_used: 48\n" +" item_count: 2\n" +" item_size: 24\n" +" slab_count: 1\n" +" slab_size: 16384\n" +" - mem_free: 15720\n" +" mem_used: 560\n" +" item_count: 14\n" +" item_size: 40\n" +" slab_count: 1\n" +" slab_size: 16384\n" +" <...>\n" +" - mem_free: 32472\n" +" mem_used: 192\n" +" item_count: 1\n" +" item_size: 192\n" +" slab_count: 1\n" +" slab_size: 32768\n" +" - mem_free: 1097624\n" +" mem_used: 999424\n" +" item_count: 61\n" +" item_size: 16384\n" +" slab_count: 1\n" +" slab_size: 2097152\n" +" ..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_slab/slab_stats.rst:81 +msgid "The total ``mem_used`` for all groups in this report equals ``arena_used`` in :doc:`/reference/reference_lua/box_slab/slab_info` report." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_snapshot.pot b/locale/en/reference/reference_lua/box_snapshot.pot new file mode 100644 index 0000000000..269b537b8b --- /dev/null +++ b/locale/en/reference/reference_lua/box_snapshot.pot @@ -0,0 +1,84 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_snapshot.rst:5 +msgid "Function box.snapshot" +msgstr "" + +#: ../../doc/reference/reference_lua/box_snapshot.rst:9 +msgid "**Memtx**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_snapshot.rst:11 +msgid "Take a snapshot of all data and store it in :ref:`memtx_dir `:samp:`/{}.snap`. To take a snapshot, Tarantool first enters the delayed garbage collection mode for all data. In this mode, the :ref:`Tarantool garbage collector ` will not remove files which were created before the snapshot started, it will not remove them until the snapshot has finished. To preserve consistency of the primary key, used to iterate over tuples, a copy-on-write technique is employed. If the master process changes part of a primary key, the corresponding process page is split, and the snapshot process obtains an old copy of the page. In effect, the snapshot process uses multi-version concurrency control in order to avoid copying changes which are superseded while it is running." +msgstr "" + +#: ../../doc/reference/reference_lua/box_snapshot.rst:25 +msgid "Since a snapshot is written sequentially, you can expect a very high write performance (averaging to 80MB/second on modern disks), which means an average database instance gets saved in a matter of minutes. You may restrict the speed by changing :ref:`snap_io_rate_limit `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_snapshot.rst:33 +msgid "As long as there are any changes to the parent index memory through concurrent updates, there are going to be page splits, and therefore you need to have some extra free memory to run this command. 10% of :ref:`memtx_memory ` is, on average, sufficient. This statement waits until a snapshot is taken and returns operation result." +msgstr "" + +#: ../../doc/reference/reference_lua/box_snapshot.rst:41 +msgid "**Change notice:** Prior to Tarantool version 1.6.6, the snapshot process caused a fork, which could cause occasional latency spikes. Starting with Tarantool version 1.6.6, the snapshot process creates a consistent read view and this view is written to the snapshot file by a separate thread (the \"Write Ahead Log\" thread)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_snapshot.rst:47 +msgid "Although ``box.snapshot()`` does not cause a fork, there is a separate fiber which may produce snapshots at regular intervals -- see the discussion of the :ref:`checkpoint daemon `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_snapshot.rst:51 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_snapshot.rst:53 +msgid "tarantool> box.info.version\n" +"---\n" +"- 1.7.0-1216-g73f7154\n" +"...\n" +"tarantool> box.snapshot()\n" +"---\n" +"- ok\n" +"...\n" +"tarantool> box.snapshot()\n" +"---\n" +"- error: can't save snapshot, errno 17 (File exists)\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_snapshot.rst:68 +msgid "Taking a snapshot does not cause the server to start a new write-ahead log. Once a snapshot is taken, old WALs can be deleted as long as all replicated data is up to date. But the WAL which was current at the time ``box.snapshot()`` started must be kept for recovery, since it still contains log records written after the start of ``box.snapshot()``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_snapshot.rst:74 +msgid "An alternative way to save a snapshot is to send a SIGUSR1 signal to the instance. While this approach could be handy, it is not recommended for use in automation: a signal provides no way to find out whether the snapshot was taken successfully or not." +msgstr "" + +#: ../../doc/reference/reference_lua/box_snapshot.rst:79 +msgid "**Vinyl**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_snapshot.rst:81 +msgid "In vinyl, inserted data is stacked in memory until the limit, set in the :ref:`vinyl_memory ` parameter, is reached. Then vinyl automatically dumps it to the disc. ``box.snapshot()`` forces this dump in order to have the ability to recover from this checkpoint. The snapshot files are stored in :samp:`{space_id}/{index_id}/*.run`. Thus, strictly all the data that was written at the time of LSN of the checkpoint is in the ``*.run`` files on the disk, and all operations that happened after the checkpoint will be written in the ``*.xlog``. All dump files created by ``box.snapshot()`` are consistent and have the same LSN as checkpoint." +msgstr "" + +#: ../../doc/reference/reference_lua/box_snapshot.rst:91 +msgid "At the checkpoint vinyl also rotates the metadata log ``*.vylog``, containing data manipulation operations like \"create file\" and \"delete file\". It goes through the log, removes duplicating operations from the memory and creates a new ``*.vylog`` file, giving it the name according to the :ref:`vclock ` of the new checkpoint, with \"create\" operations only. This procedure cleans ``*.vylog`` and is useful for recovery because the name of the log is the same as the checkpoint signature." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space.pot b/locale/en/reference/reference_lua/box_space.pot new file mode 100644 index 0000000000..f7b7c4b161 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space.pot @@ -0,0 +1,429 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space.rst:7 +msgid "Submodule box.space" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:9 +msgid "**CRUD operations** in Tarantool are implemented by the ``box.space`` submodule. It has the data-manipulation functions ``select``, ``insert``, ``replace``, ``update``, ``upsert``, ``delete``, ``get``, ``put``. It also has members, such as id, and whether or not a space is enabled." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:14 +msgid "Below is a list of all ``box.space`` functions and members." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:25 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:26 +msgid "Use" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:28 +msgid ":doc:`./box_schema/space_create`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:29 +msgid "Create a space" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:31 +msgid ":doc:`./box_space/alter`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:32 +msgid "Alter a space" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:34 +msgid ":doc:`./box_space/auto_increment`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:35 +msgid "Generate key + Insert a tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:37 +msgid ":doc:`./box_space/bsize`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:38 +msgid "Get count of bytes" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:40 +msgid ":doc:`./box_space/count`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:41 +#: ../../doc/reference/reference_lua/box_space.rst:65 +msgid "Get count of tuples" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:43 +msgid ":doc:`./box_space/create_index`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:44 +msgid "Create an index" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:46 +msgid ":doc:`./box_space/delete`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:47 +msgid "Delete a tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:49 +msgid ":doc:`./box_space/drop`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:50 +msgid "Destroy a space" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:52 +msgid ":doc:`./box_space/format`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:53 +msgid "Declare field names and types" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:55 +msgid ":doc:`./box_space/frommap`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:56 +msgid "Convert from map to tuple or table" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:58 +msgid ":doc:`./box_space/get`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:59 +msgid "Select a tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:61 +msgid ":doc:`./box_space/insert`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:62 +msgid "Insert a tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:64 +msgid ":doc:`./box_space/len`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:67 +msgid ":doc:`./box_space/on_replace`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:68 +msgid "Create a replace trigger with a function that cannot change the tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:70 +msgid ":doc:`./box_space/before_replace`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:71 +msgid "Create a replace trigger with a function that can change the tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:73 +msgid ":doc:`./box_space/pairs`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:74 +msgid "Prepare for iterating" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:76 +msgid ":doc:`./box_space/put`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:77 +#: ../../doc/reference/reference_lua/box_space.rst:83 +msgid "Insert or replace a tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:79 +msgid ":doc:`./box_space/rename`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:80 +msgid "Rename a space" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:82 +msgid ":doc:`./box_space/replace`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:85 +msgid ":doc:`./box_space/run_triggers`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:86 +msgid "Enable/disable a replace trigger" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:88 +msgid ":doc:`./box_space/select`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:89 +msgid "Select one or more tuples" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:91 +msgid ":doc:`./box_space/truncate`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:92 +msgid "Delete all tuples" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:94 +msgid ":doc:`./box_space/update`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:95 +#: ../../doc/reference/reference_lua/box_space.rst:98 +msgid "Update a tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:97 +msgid ":doc:`./box_space/upsert`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:100 +msgid ":doc:`./box_space/user_defined`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:101 +msgid "Any function / method that any user wants to add" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:103 +msgid ":doc:`./box_space/create_check_constraint`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:104 +msgid "Create a check constraint" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:106 +msgid ":doc:`./box_space/enabled`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:107 +msgid "Flag, true if space is enabled" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:109 +msgid ":doc:`./box_space/field_count`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:110 +msgid "Required number of fields" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:112 +msgid ":doc:`./box_space/id`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:113 +msgid "Numeric identifier of space" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:115 +msgid ":doc:`./box_space/index_data`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:116 +msgid "Container of space's indexes" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:118 +msgid ":doc:`./box_space/_cluster`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:119 +msgid "(Metadata) List of replica sets" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:121 +msgid ":doc:`./box_space/_func`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:122 +msgid "(Metadata) List of function tuples" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:124 +msgid ":doc:`./box_space/_index`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:125 +msgid "(Metadata) List of indexes" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:127 +msgid ":doc:`./box_space/_vindex`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:128 +msgid "(Metadata) List of indexes accessible for the current user" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:130 +msgid ":doc:`./box_space/_priv`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:131 +msgid "(Metadata) List of privileges" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:133 +msgid ":doc:`./box_space/_vpriv`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:134 +msgid "(Metadata) List of privileges accessible for the current user" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:136 +msgid ":doc:`./box_space/_schema`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:137 +msgid "(Metadata) List of schemas" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:139 +msgid ":doc:`./box_space/_sequence`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:140 +#: ../../doc/reference/reference_lua/box_space.rst:143 +msgid "(Metadata) List of sequences" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:142 +msgid ":doc:`./box_space/_sequence_data`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:145 +msgid ":doc:`./box_space/_space`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:146 +msgid "(Metadata) List of spaces" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:148 +msgid ":doc:`./box_space/_vspace`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:149 +msgid "(Metadata) List of spaces accessible for the current user" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:151 +msgid ":doc:`./box_space/_space_sequence`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:152 +msgid "(Metadata) List of connections between spaces and sequences" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:154 +msgid ":doc:`./box_space/_vspace_sequence`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:155 +msgid "(Metadata) List of connections between spaces and sequences accessible for the current user" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:158 +msgid ":doc:`./box_space/_user`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:159 +msgid "(Metadata) List of users" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:161 +msgid ":doc:`./box_space/_vuser`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:162 +msgid "(Metadata) List of users accessible for the current user" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:164 +msgid ":doc:`./box_space/_ck_constraint`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:165 +msgid "(Metadata) List of check constraints" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:167 +msgid ":doc:`./box_space/_collation`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:168 +msgid "(Metadata) List of collations" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:170 +msgid ":doc:`./box_space/_vcollation`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:171 +msgid "(Metadata) List of collations accessible for the current user" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:173 +msgid ":doc:`./box_space/system_views`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:174 +msgid "(Metadata) Spaces whose names begin with _v" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:176 +msgid ":doc:`./box_space/_session_settings`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:177 +msgid "(Metadata) List of settings affecting behavior of the current session" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space.rst:179 +msgid "To see examples, visit the :ref:`how-to guide on CRUD operations `." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/_ck_constraint.pot b/locale/en/reference/reference_lua/box_space/_ck_constraint.pot new file mode 100644 index 0000000000..956a9a7b06 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/_ck_constraint.pot @@ -0,0 +1,61 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/_ck_constraint.rst:5 +msgid "box.space._ck_constraint" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_ck_constraint.rst:11 +msgid "``_ck_constraint`` is a system space where check constraints are stored." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_ck_constraint.rst:13 +msgid "Tuples in this space contain the following fields:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_ck_constraint.rst:15 +msgid "the numeric id of the space (\"space_id\")," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_ck_constraint.rst:16 +msgid "the name," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_ck_constraint.rst:17 +msgid "whether the check is deferred (\"is_deferred\")," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_ck_constraint.rst:18 +msgid "the language of the expression, such as 'SQL'," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_ck_constraint.rst:19 +msgid "the expression (\"code\")" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_ck_constraint.rst:21 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_ck_constraint.rst:23 +msgid "tarantool> box.space._ck_constraint:select()\n" +"---\n" +"- - [527, 'c1', false, 'SQL', '\"f2\" > ''A''']\n" +" - [527, 'c2', false, 'SQL', '\"f2\" == UPPER(\"f3\") AND NOT \"f2\" LIKE ''__''']\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/_cluster.pot b/locale/en/reference/reference_lua/box_space/_cluster.pot new file mode 100644 index 0000000000..0074b55d27 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/_cluster.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/_cluster.rst:5 +msgid "box.space._cluster" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_cluster.rst:11 +msgid "``_cluster`` is a system space for support of the :ref:`replication feature `." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/_collation.pot b/locale/en/reference/reference_lua/box_space/_collation.pot new file mode 100644 index 0000000000..ff1491f3f1 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/_collation.pot @@ -0,0 +1,40 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/_collation.rst:5 +msgid "box.space._collation" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_collation.rst:11 +msgid "``_collation`` is a system space with a list of :ref:`collations `. There are over 270 built-in collations and users may add more. Here is one example:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_collation.rst:14 +msgid "tarantool> box.space._collation:select(239)\n" +"---\n" +"- - [239, 'unicode_uk_s2', 1, 'ICU', 'uk', {'strength': 'secondary'}]\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_collation.rst:21 +msgid "Explanation of the fields in the example: id = 239 i.e. Tarantool's primary key is 239, name = 'unicode_uk_s2' i.e. according to Tarantool's naming convention this is a Unicode collation + it is for the uk locale + it has secondary strength, owner = 1 i.e. :ref:`the admin user `, type = 'ICU' i.e. the rules are according to `International Components for Unicode `_, locale = 'uk' i.e. `Ukrainian `_, opts = 'strength:secondary' i.e. with this collation comparisons use both primary and secondary `weights `_." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_collation.rst:30 +msgid "The :ref:`system space view ` for ``_collation`` is ``_vcollation``." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/_func.pot b/locale/en/reference/reference_lua/box_space/_func.pot new file mode 100644 index 0000000000..a272263e0f --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/_func.pot @@ -0,0 +1,29 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/_func.rst:5 +msgid "box.space._func" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_func.rst:11 +msgid "A system space containing functions created using :ref:`box.schema.func.create() `. If a function's definition is specified in the :ref:`body ` option, this function is *persistent*. In this case, its definition is stored in a snapshot and can be recovered if the server restarts." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_func.rst:18 +msgid "The :ref:`system space view ` for ``_func`` is ``_vfunc``." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/_index.pot b/locale/en/reference/reference_lua/box_space/_index.pot new file mode 100644 index 0000000000..c4901bf7d6 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/_index.pot @@ -0,0 +1,78 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/_index.rst:5 +msgid "box.space._index" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_index.rst:11 +msgid "``_index`` is a system space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_index.rst:13 +msgid "Tuples in this space contain the following fields:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_index.rst:15 +msgid "``id`` (= id of space)," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_index.rst:16 +msgid "``iid`` (= index number within space)," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_index.rst:17 +msgid "``name``," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_index.rst:18 +msgid "``type``," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_index.rst:19 +msgid "``opts`` (e.g. unique option), [``tuple-field-no``, ``tuple-field-type`` ...]." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_index.rst:21 +msgid "Here is what ``_index`` contains in a typical installation:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_index.rst:23 +msgid "tarantool> box.space._index:select{}\n" +"---\n" +"- - [272, 0, 'primary', 'tree', {'unique': true}, [[0, 'string']]]\n" +" - [280, 0, 'primary', 'tree', {'unique': true}, [[0, 'unsigned']]]\n" +" - [280, 1, 'owner', 'tree', {'unique': false}, [[1, 'unsigned']]]\n" +" - [280, 2, 'name', 'tree', {'unique': true}, [[2, 'string']]]\n" +" - [281, 0, 'primary', 'tree', {'unique': true}, [[0, 'unsigned']]]\n" +" - [281, 1, 'owner', 'tree', {'unique': false}, [[1, 'unsigned']]]\n" +" - [281, 2, 'name', 'tree', {'unique': true}, [[2, 'string']]]\n" +" - [288, 0, 'primary', 'tree', {'unique': true}, [[0, 'unsigned'], [1, 'unsigned']]]\n" +" - [288, 2, 'name', 'tree', {'unique': true}, [[0, 'unsigned'], [2, 'string']]]\n" +" - [289, 0, 'primary', 'tree', {'unique': true}, [[0, 'unsigned'], [1, 'unsigned']]]\n" +" - [289, 2, 'name', 'tree', {'unique': true}, [[0, 'unsigned'], [2, 'string']]]\n" +" - [296, 0, 'primary', 'tree', {'unique': true}, [[0, 'unsigned']]]\n" +" - [296, 1, 'owner', 'tree', {'unique': false}, [[1, 'unsigned']]]\n" +" - [296, 2, 'name', 'tree', {'unique': true}, [[2, 'string']]]\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_index.rst:44 +msgid "The :ref:`system space view ` for ``_index`` is ``_vindex``." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/_priv.pot b/locale/en/reference/reference_lua/box_space/_priv.pot new file mode 100644 index 0000000000..2a89f4759c --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/_priv.pot @@ -0,0 +1,57 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/_priv.rst:5 +msgid "box.space._priv" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_priv.rst:11 +msgid "``_priv`` is a system space where :ref:`privileges ` are stored." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_priv.rst:14 +msgid "Tuples in this space contain the following fields:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_priv.rst:16 +msgid "the numeric id of the user who gave the privilege (\"grantor_id\")," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_priv.rst:17 +msgid "the numeric id of the user who received the privilege (\"grantee_id\")," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_priv.rst:18 +msgid "the type of object: 'space', 'index', 'function', 'sequence', 'user', 'role', or 'universe'," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_priv.rst:19 +msgid "the numeric id of the object," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_priv.rst:20 +msgid "the type of operation: \"read\" = 1, \"write\" = 2, \"execute\" = 4, \"create\" = 32, \"drop\" = 64, \"alter\" = 128, or a combination such as \"read,write,execute\"." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_priv.rst:24 +msgid "See :ref:`Access control ` for details about user privileges." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_priv.rst:26 +msgid "The :ref:`system space view ` for ``_priv`` is ``_vpriv``." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/_schema.pot b/locale/en/reference/reference_lua/box_space/_schema.pot new file mode 100644 index 0000000000..688e39a4a7 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/_schema.pot @@ -0,0 +1,63 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/_schema.rst:5 +msgid "box.space._schema" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_schema.rst:11 +msgid "``_schema`` is a system space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_schema.rst:13 +msgid "This space contains the following tuples:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_schema.rst:15 +msgid "``version`` tuple with version information for this Tarantool instance," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_schema.rst:16 +msgid "``cluster`` tuple with the instance's replica set ID," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_schema.rst:17 +msgid "``max_id`` tuple with the maximal space ID," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_schema.rst:18 +msgid "``once...`` tuples that correspond to specific :doc:`box.once() ` blocks from the instance's :ref:`initialization file `. The first field in these tuples contains the ``key`` value from the corresponding ``box.once()`` block prefixed with 'once' (e.g. `oncehello`), so you can easily find a tuple that corresponds to a specific ``box.once()`` block." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_schema.rst:26 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_schema.rst:28 +msgid "Here is what ``_schema`` contains in a typical installation (notice the tuples for two ``box.once()`` blocks, ``'oncebye'`` and ``'oncehello'``):" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_schema.rst:31 +msgid "tarantool> box.space._schema:select{}\n" +"---\n" +"- - ['cluster', 'b4e15788-d962-4442-892e-d6c1dd5d13f2']\n" +" - ['max_id', 512]\n" +" - ['oncebye']\n" +" - ['oncehello']\n" +" - ['version', 1, 7, 2]" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/_sequence.pot b/locale/en/reference/reference_lua/box_space/_sequence.pot new file mode 100644 index 0000000000..41994ba240 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/_sequence.pot @@ -0,0 +1,29 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/_sequence.rst:5 +msgid "box.space._sequence" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_sequence.rst:11 +msgid "``_sequence`` is a system space for support of the :ref:`sequence feature `. It contains persistent information that was established by :doc:`/reference/reference_lua/box_schema_sequence/create` or :doc:`/reference/reference_lua/box_schema_sequence/alter`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_sequence.rst:17 +msgid "The :ref:`system space view ` for ``_sequence`` is ``_vsequence``." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/_sequence_data.pot b/locale/en/reference/reference_lua/box_space/_sequence_data.pot new file mode 100644 index 0000000000..b966a47bbf --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/_sequence_data.pot @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/_sequence_data.rst:5 +msgid "box.space._sequence_data" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_sequence_data.rst:11 +msgid "``_sequence_data`` is a system space for support of the :ref:`sequence feature `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_sequence_data.rst:14 +msgid "Each tuple in ``_sequence_data`` contains two fields:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_sequence_data.rst:16 +msgid "the id of the sequence, and" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_sequence_data.rst:17 +msgid "the last value that the sequence generator returned (non-persistent information)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_sequence_data.rst:20 +msgid "There is no guarantee that this space will be updated immediately after every data-change request." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/_session_settings.pot b/locale/en/reference/reference_lua/box_space/_session_settings.pot new file mode 100644 index 0000000000..373de11d70 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/_session_settings.pot @@ -0,0 +1,73 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/_session_settings.rst:5 +msgid "box.space._session_settings" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_session_settings.rst:11 +msgid "A temporary system space with settings that affect behavior, particularly SQL behavior, for the current session. It uses a special engine named 'service'. Every 'service' tuple is created on the fly, that is, new tuples are made every time ``_session_settings`` is accessed. Every settings tuple has two fields: ``name`` (the primary key) and ``value``. The tuples' names and default values are:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_session_settings.rst:18 +msgid "``sql_default_engine``: default :ref:`storage engine ` for new SQL tables. Default: ``memtx``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_session_settings.rst:19 +msgid "``sql_full_column_names``: use full column names in :ref:`SQL result set metadata `. Default: ``false``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_session_settings.rst:21 +msgid "``sql_full_metadata``: whether :ref:`SQL result set metadata ` includes more than just name and type. Default:``false``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_session_settings.rst:23 +msgid "``sql_parser_debug``: show parser steps for following statements. Default: ``false``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_session_settings.rst:24 +msgid "``sql_recursive_triggers``: whether a triggered statement can activate a :ref:`trigger `. Default: ``true``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_session_settings.rst:26 +msgid "``sql_reverse_unordered_selects``: return result rows in reverse order if there is no :ref:`ORDER BY clause `. Default: ``false``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_session_settings.rst:28 +msgid "``sql_select_debug``: show execution steps during :ref:`SELECT `. Default:``false``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_session_settings.rst:29 +msgid "``sql_seq_scan``: allow sequential scans in SQL :ref:`SELECT `. Default: ``true``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_session_settings.rst:30 +msgid "``sql_vdbe_debug``: for internal use. Default:``false``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_session_settings.rst:31 +msgid "``sql_defer_foreign_keys`` (removed in :doc:`2.11.0 `): whether foreign-key checks can wait till commit. Default: ``false``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_session_settings.rst:33 +msgid "``error_marshaling_enabled`` (removed in :doc:`2.10.0 `): whether :doc:`error objects ` have a special structure. Default: ``false``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_session_settings.rst:36 +msgid "Three requests are possible: :doc:`select `, :doc:`get ` and :doc:`update `. For example, after ``s = box.space._session_settings``, ``s:select('sql_default_engine')`` probably returns ``{'sql_default_engine', 'memtx'}``, and ``s:update('sql_default_engine', {{'=', 'value', 'vinyl'}})`` changes the default engine to 'vinyl'. |br| Updating ``sql_parser_debug`` or ``sql_select_debug`` or ``sql_vdbe_debug`` has no effect unless Tarantool was built with ``-DCMAKE_BUILD_TYPE=Debug``. To check if this is so, look at ``require('tarantool').build.target``." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/_space.pot b/locale/en/reference/reference_lua/box_space/_space.pot new file mode 100644 index 0000000000..7227969df1 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/_space.pot @@ -0,0 +1,140 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/_space.rst:4 +msgid "box.space._space" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space.rst:10 +msgid "``_space`` is a system space. It contains all spaces hosted on the current Tarantool instance, both system ones and created by users." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space.rst:13 +msgid "Tuples in this space contain the following fields:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space.rst:15 +msgid "``id``," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space.rst:16 +msgid "``owner`` (= id of user who owns the space)," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space.rst:17 +msgid "``name``, ``engine``, ``field_count``," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space.rst:18 +msgid "``flags`` (e.g. temporary)," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space.rst:19 +msgid "``format`` (as made by a :doc:`format clause `)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space.rst:21 +msgid "These fields are established by :doc:`/reference/reference_lua/box_schema/space_create`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space.rst:23 +msgid "The :ref:`system space view ` for ``_space`` is ``_vspace``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space.rst:25 +msgid "**Example #1:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space.rst:27 +msgid "The following function will display every simple field in all tuples of ``_space``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space.rst:30 +msgid "function example()\n" +" local ta = {}\n" +" local i, line\n" +" for k, v in box.space._space:pairs() do\n" +" i = 1\n" +" line = ''\n" +" while i <= #v do\n" +" if type(v[i]) ~= 'table' then\n" +" line = line .. v[i] .. ' '\n" +" end\n" +" i = i + 1\n" +" end\n" +" table.insert(ta, line)\n" +" end\n" +" return ta\n" +"end" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space.rst:49 +msgid "Here is what ``example()`` returns in a typical installation:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space.rst:51 +msgid "tarantool> example()\n" +"---\n" +"- - '272 1 _schema memtx 0 '\n" +" - '280 1 _space memtx 0 '\n" +" - '281 1 _vspace sysview 0 '\n" +" - '288 1 _index memtx 0 '\n" +" - '296 1 _func memtx 0 '\n" +" - '304 1 _user memtx 0 '\n" +" - '305 1 _vuser sysview 0 '\n" +" - '312 1 _priv memtx 0 '\n" +" - '313 1 _vpriv sysview 0 '\n" +" - '320 1 _cluster memtx 0 '\n" +" - '512 1 tester memtx 0 '\n" +" - '513 1 origin vinyl 0 '\n" +" - '514 1 archive memtx 0 '\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space.rst:70 +msgid "**Example #2:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space.rst:72 +msgid "The following requests will create a space using ``box.schema.space.create()`` with a :doc:`format clause `, then retrieve the ``_space`` tuple for the new space. This illustrates the typical use of the ``format`` clause, it shows the recommended names and data types for the fields." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space.rst:78 +msgid "tarantool> box.schema.space.create('TM', {\n" +" > id = 12345,\n" +" > format = {\n" +" > [1] = {[\"name\"] = \"field_1\"},\n" +" > [2] = {[\"type\"] = \"unsigned\"}\n" +" > }\n" +" > })\n" +"---\n" +"- index: []\n" +" on_replace: 'function: 0x41c67338'\n" +" temporary: false\n" +" id: 12345\n" +" engine: memtx\n" +" enabled: false\n" +" name: TM\n" +" field_count: 0\n" +"- created\n" +"...\n" +"tarantool> box.space._space:select(12345)\n" +"---\n" +"- - [12345, 1, 'TM', 'memtx', 0, {}, [{'name': 'field_1'}, {'type': 'unsigned'}]]\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/_space_sequence.pot b/locale/en/reference/reference_lua/box_space/_space_sequence.pot new file mode 100644 index 0000000000..bfac9432e6 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/_space_sequence.pot @@ -0,0 +1,83 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/_space_sequence.rst:4 +msgid "box.space._space_sequence" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space_sequence.rst:10 +msgid "``_space_sequence`` is a system space. It contains connections between spaces and sequences." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space_sequence.rst:13 +msgid "Tuples in this space contain the following fields:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space_sequence.rst:15 +msgid "``id`` (``unsigned``) -- space id" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space_sequence.rst:16 +msgid "``sequence_id`` (``unsigned``) -- id of the attached sequence" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space_sequence.rst:17 +msgid "``is_generated`` (``boolean``) -- ``true`` if the sequence was created automatically via a ``space:create_index('pk', {sequence = true})`` call" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space_sequence.rst:19 +msgid "``field`` (``unsigned``) -- id of the space field to which the sequence is attached." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space_sequence.rst:20 +msgid "``path`` (``string``) -- path to the data within the field that is set using the attached sequence." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space_sequence.rst:23 +msgid "The :ref:`system space view ` for ``_space_sequence`` is ``_vspace_sequence``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space_sequence.rst:27 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_space_sequence.rst:29 +msgid "-- Create a sequence --\n" +"box.schema.sequence.create('id_seq',{min=1000, start=1000})\n" +"-- Create a space --\n" +"box.schema.space.create('customers')\n" +"\n" +"-- Create an index that uses the sequence --\n" +"box.space.customers:create_index('primary',{ sequence = 'id_seq' })\n" +"\n" +"-- Create a space --\n" +"box.schema.space.create('orders')\n" +"\n" +"-- Create an index that uses an auto sequence --\n" +"box.space.orders:create_index( 'primary', { sequence = true })\n" +"\n" +"-- Check the connections between spaces and sequences\n" +"box.space._space_sequence:select{}\n" +"--[[\n" +"---\n" +"- - [512, 1, false, 0, '']\n" +" - [513, 2, true, 0, '']\n" +"...\n" +"--]]\n" +"" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/_user.pot b/locale/en/reference/reference_lua/box_space/_user.pot new file mode 100644 index 0000000000..22df81bd3c --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/_user.pot @@ -0,0 +1,239 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:5 +msgid "box.space._user" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:11 +msgid "``_user`` is a system space where user-names and password hashes are stored." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:13 +msgid "Tuples in this space contain the following fields:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:15 +msgid "a numeric id of the tuple (\"id\")" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:16 +msgid "a numeric id of the tuple’s creator" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:17 +msgid "a name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:18 +msgid "a type: 'user' or 'role'" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:19 +msgid "(optional) a password hash" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:20 +msgid "(optional) an array of previous authentication data" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:21 +msgid "(optional) a timestamp of the last password update" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:23 +msgid "There are five special tuples in the ``_user`` space: 'guest', 'admin', 'public', 'replication', and 'super'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:36 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:36 +msgid "ID" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:36 +msgid "Type" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:36 +msgid "Description" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:38 +msgid "guest" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:38 +msgid "0" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:38 +#: ../../doc/reference/reference_lua/box_space/_user.rst:41 +msgid "user" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:38 +msgid "Default user when connecting remotely. Usually, an untrusted user with few privileges." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:41 +msgid "admin" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:41 +msgid "1" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:41 +msgid "Default user when using Tarantool as a console. Usually, an :ref:`administrative user ` with all privileges." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:46 +msgid "public" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:46 +msgid "2" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:46 +#: ../../doc/reference/reference_lua/box_space/_user.rst:54 +#: ../../doc/reference/reference_lua/box_space/_user.rst:58 +msgid "role" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:46 +msgid "Pre-defined :ref:`role `, automatically granted to new users when they are created with ``box.schema.user.create(user-name)``. Therefore a convenient way to grant 'read' on space 't' to every user that will ever exist is with ``box.schema.role.grant('public','read','space','t')``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:54 +msgid "replication" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:54 +msgid "3" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:54 +msgid "Pre-defined :ref:`role `, which the 'admin' user can grant to users who need to use :ref:`replication ` features." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:58 +msgid "super" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:58 +msgid "31" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:58 +msgid "Pre-defined :ref:`role `, which the 'admin' user can grant to users who need all privileges on all objects. The 'super' role has these privileges on 'universe': read, write, execute, create, drop, alter." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:66 +msgid "To select a tuple from the ``_user`` space, use ``box.space._user:select()``. In the example below, ``select`` is executed for a user with id = 0. This is the 'guest' user that has no password." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:70 +msgid "tarantool> box.space._user:select{0}\n" +"---\n" +"- - [0, 1, 'guest', 'user']\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:79 +msgid "To change tuples in the ``_user`` space, do not use ordinary ``box.space`` functions for insert, update, or delete. The ``_user`` space is special, so there are special functions that have appropriate error checking.\\" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:83 +msgid "To create a new user, use :doc:`/reference/reference_lua/box_schema/user_create`:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:85 +msgid "box.schema.user.create(*user-name*)\n" +"box.schema.user.create(*user-name*, {if_not_exists = true})\n" +"box.schema.user.create(*user-name*, {password = *password*})" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:91 +msgid "To change the user's password, use :doc:`/reference/reference_lua/box_schema/user_passwd`:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:93 +msgid "-- To change the current user's password\n" +"box.schema.user.passwd(*password*)\n" +"\n" +"-- To change a different user's password\n" +"-- (usually only 'admin' can do it)\n" +"box.schema.user.passwd(*user-name*, *password*)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:102 +msgid "To drop a user, use :doc:`/reference/reference_lua/box_schema/user_drop`:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:104 +msgid "box.schema.user.drop(*user-name*)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:108 +msgid "To check whether a user exists, use :doc:`/reference/reference_lua/box_schema/user_exists`, which returns ``true`` or ``false``:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:111 +msgid "box.schema.user.exists(*user-name*)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:115 +msgid "To find what privileges a user has, use :doc:`/reference/reference_lua/box_schema/user_info`:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:117 +msgid "box.schema.user.info(*user-name*)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:123 +msgid "The maximum number of users is 32." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:125 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:127 +msgid "Here is a session which creates a new user with a strong password, selects a tuple in the ``_user`` space, and then drops the user." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:130 +msgid "tarantool> box.schema.user.create('JeanMartin', {password = 'Iwtso_6_os$$'})\n" +"---\n" +"...\n" +"tarantool> box.space._user.index.name:select{'JeanMartin'}\n" +"---\n" +"- - [17, 1, 'JeanMartin', 'user', {'chap-sha1': 't3xjUpQdrt857O+YRvGbMY5py8Q='}]\n" +"...\n" +"tarantool> box.schema.user.drop('JeanMartin')\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_user.rst:143 +msgid "The :ref:`system space view ` for ``_user`` is ``_vuser``." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/_vcollation.pot b/locale/en/reference/reference_lua/box_space/_vcollation.pot new file mode 100644 index 0000000000..e5984b5d3a --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/_vcollation.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/_vcollation.rst:5 +msgid "box.space._vcollation" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_vcollation.rst:11 +msgid "``_vcollation`` is the :ref:`system space view ` for :ref:`_collation `." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/_vindex.pot b/locale/en/reference/reference_lua/box_space/_vindex.pot new file mode 100644 index 0000000000..e39434bf59 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/_vindex.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/_vindex.rst:5 +msgid "box.space._vindex" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_vindex.rst:11 +msgid "``_vindex`` is the :ref:`system space view ` for :ref:`_index `." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/_vpriv.pot b/locale/en/reference/reference_lua/box_space/_vpriv.pot new file mode 100644 index 0000000000..ce6b682226 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/_vpriv.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/_vpriv.rst:5 +msgid "box.space._vpriv" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_vpriv.rst:11 +msgid "``_vpriv`` is the :ref:`system space view ` for :ref:`_priv `." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/_vspace.pot b/locale/en/reference/reference_lua/box_space/_vspace.pot new file mode 100644 index 0000000000..fad91deafc --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/_vspace.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/_vspace.rst:4 +msgid "box.space._vspace" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_vspace.rst:10 +msgid "``_vspace`` is the :ref:`system space view ` for :ref:`_space `." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/_vspace_sequence.pot b/locale/en/reference/reference_lua/box_space/_vspace_sequence.pot new file mode 100644 index 0000000000..18c3372395 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/_vspace_sequence.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/_vspace_sequence.rst:4 +msgid "box.space._vspace_sequence" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_vspace_sequence.rst:10 +msgid "``_vspace_sequence`` is the :ref:`system space view ` for :ref:`_space `." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/_vuser.pot b/locale/en/reference/reference_lua/box_space/_vuser.pot new file mode 100644 index 0000000000..efe858dc0b --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/_vuser.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/_vuser.rst:5 +msgid "box.space._vuser" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/_vuser.rst:11 +msgid "``_vuser`` is the :ref:`system space view ` for :ref:`_user `." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/alter.pot b/locale/en/reference/reference_lua/box_space/alter.pot new file mode 100644 index 0000000000..565311c862 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/alter.pot @@ -0,0 +1,65 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/alter.rst:5 +msgid "space_object:alter()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/alter.rst:11 +msgid "Since version :doc:`2.5.2 `. Alter an existing space. This method changes certain space parameters." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/alter.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/alter.rst:14 +msgid "the space options such as ``field_count``, ``user``, ``format``, ``name``, and other. The full list of these options with descriptions parameters is provided in :doc:`/reference/reference_lua/box_schema/space_create`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/alter.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/alter.rst:19 +msgid "nothing in case of success; an error when fails" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/alter.rst:21 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/alter.rst:23 +msgid "tarantool> s = box.schema.create_space('tester')\n" +"---\n" +"...\n" +"tarantool> format = {{name = 'field1', type = 'unsigned'}}\n" +"---\n" +"...\n" +"tarantool> s:alter({name = 'tester1', format = format})\n" +"---\n" +"...\n" +"tarantool> s.name\n" +"---\n" +"- tester1\n" +"...\n" +"tarantool> s:format()\n" +"---\n" +"- [{'name': 'field1', 'type': 'unsigned'}]\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/auto_increment.pot b/locale/en/reference/reference_lua/box_space/auto_increment.pot new file mode 100644 index 0000000000..3b4ca9f592 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/auto_increment.pot @@ -0,0 +1,88 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/auto_increment.rst:5 +msgid "space_object:auto_increment()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/auto_increment.rst:11 +msgid "Insert a new tuple using an auto-increment primary key. The space specified by space_object must have an :ref:`'unsigned' or 'integer' or 'number' ` primary key index of type ``TREE``. The primary-key field will be incremented before the insert." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/auto_increment.rst:17 +msgid "Since version 1.7.5 this method is deprecated – it is better to use a :ref:`sequence `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/auto_increment.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/auto_increment.rst:20 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/auto_increment.rst:22 +msgid "tuple's fields, other than the primary-key field" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/auto_increment.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/auto_increment.rst:25 +msgid "the inserted tuple." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/auto_increment.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/auto_increment.rst:26 +msgid "tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/auto_increment.rst:28 +msgid "**Complexity factors:** Index size, Index type, Number of indexes accessed, :ref:`WAL settings `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/auto_increment.rst:31 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/auto_increment.rst:33 +msgid "index has wrong type;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/auto_increment.rst:34 +msgid "primary-key indexed field is not a number." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/auto_increment.rst:36 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/auto_increment.rst:38 +msgid "tarantool> box.space.tester:auto_increment{'Fld#1', 'Fld#2'}\n" +"---\n" +"- [1, 'Fld#1', 'Fld#2']\n" +"...\n" +"tarantool> box.space.tester:auto_increment{'Fld#3'}\n" +"---\n" +"- [2, 'Fld#3']\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/before_replace.pot b/locale/en/reference/reference_lua/box_space/before_replace.pot new file mode 100644 index 0000000000..c3a40252d4 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/before_replace.pot @@ -0,0 +1,121 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:5 +msgid "space_object:before_replace()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:11 +msgid "Create a \"replace :ref:`trigger `\". The ``trigger-function`` will be executed whenever a ``replace()`` or ``insert()`` or ``update()`` or ``upsert()`` or ``delete()`` happens to a tuple in ````." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:16 +msgid "function which will become the trigger function; for the trigger function's optional parameters see the description of :doc:`on_replace `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:21 +msgid "existing trigger function which will be replaced by ``trigger-function``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:24 +msgid "nil or function pointer" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:26 +msgid "If the parameters are ``(nil, old-trigger-function)``, then the old trigger is deleted." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:29 +msgid "If both parameters are omitted, then the response is a list of existing trigger functions." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:31 +msgid "If it is necessary to know whether the trigger activation happened due to replication or on a specific connection type, the function can refer to :doc:`/reference/reference_lua/box_session/type`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:35 +msgid "Details about trigger characteristics are in the :ref:`triggers ` section." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:38 +msgid "See also :doc:`/reference/reference_lua/box_space/on_replace`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:40 +msgid "Administrators can make replace triggers with ``on_replace()``, or make triggers with ``before_replace()``. If they make both types, then all ``before_replace`` triggers are executed before all ``on_replace`` triggers. The functions for both ``on_replace`` and ``before_replace`` triggers can make changes to the database, but only the functions for ``before_replace`` triggers can change the tuple that is being replaced." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:49 +msgid "Since a ``before_replace`` trigger function has the extra capability of making a change to the old tuple, it also can have extra overhead, to fetch the old tuple before making the change. Therefore an ``on_replace`` trigger is better if there is no need to change the old tuple. However, this only applies for the memtx engine -- for the vinyl engine, the fetch will happen for either kind of trigger. (With memtx the tuple data is stored along with the index key so no extra search is necessary; with vinyl that is not the case so the extra search is necessary.)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:61 +msgid "Where the extra capability is not needed, ``on_replace`` should be used instead of ``before_replace``. Usually ``before_replace`` is used only for certain replication scenarios -- it is useful for conflict resolution." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:66 +msgid "The value that a ``before_replace`` trigger function can return affects what will happen after the return. Specifically:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:69 +msgid "if there is no return value, then execution proceeds, inserting|replacing the new value;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:71 +msgid "if the value is nil, then the tuple will be deleted;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:72 +msgid "if the value is the same as the old parameter, then no ``on_replace`` function will be called and the data change will be skipped. The return value will be absent." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:76 +msgid "if the value is the same as the new parameter, then it's as if the ``before_replace`` function wasn't called;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:78 +msgid "if the value is some other tuple, then it is used for insert/replace." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:80 +msgid "However, if a trigger function returns an old tuple, or if a trigger function calls :doc:`run_triggers(false) `, that will not affect other triggers that are activated for the same insert | update | replace request." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:86 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:88 +msgid "The following are ``before_replace`` functions that have no return value, or that return nil, or the same as the old parameter, or the same as the new parameter, or something else." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/before_replace.rst:92 +msgid "function f1 (old, new) return end\n" +"function f2 (old, new) return nil end\n" +"function f3 (old, new) return old end\n" +"function f4 (old, new) return new end\n" +"function f5 (old, new) return box.tuple.new({new[1],'b'}) end" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/bsize.pot b/locale/en/reference/reference_lua/box_space/bsize.pot new file mode 100644 index 0000000000..e063bd71be --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/bsize.pot @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/bsize.rst:5 +msgid "space_object:bsize()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/bsize.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/bsize.rst:11 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/bsize.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/bsize.rst:14 +msgid "Number of bytes in the space. This number, which is stored in Tarantool's internal memory, represents the total number of bytes in all tuples, not including index keys. For a measure of index size, see :doc:`/reference/reference_lua/box_index/bsize`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/bsize.rst:20 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/bsize.rst:22 +msgid "tarantool> box.space.tester:bsize()\n" +"---\n" +"- 22\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/count.pot b/locale/en/reference/reference_lua/box_space/count.pot new file mode 100644 index 0000000000..d7fc82b34e --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/count.pot @@ -0,0 +1,68 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/count.rst:5 +msgid "space_object:count()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/count.rst:11 +msgid "Return the number of tuples. If compared with :doc:`len() `, this method works slower because ``count()`` scans the entire space to count the tuples." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/count.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/count.rst:16 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/count.rst:18 +msgid "primary-key field values, must be passed as a Lua table if key is multi-part" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/count.rst:20 +msgid "comparison method" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/count.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/count.rst:22 +msgid "Number of tuples." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/count.rst:24 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/count.rst:26 +msgid ":errcode:`ER_TRANSACTION_CONFLICT` if a transaction conflict is detected in the :ref:`MVCC transaction mode `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/count.rst:29 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/count.rst:31 +msgid "tarantool> box.space.tester:count(2, {iterator='GE'})\n" +"---\n" +"- 1\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/create_check_constraint.pot b/locale/en/reference/reference_lua/box_space/create_check_constraint.pot new file mode 100644 index 0000000000..fe42066042 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/create_check_constraint.pot @@ -0,0 +1,112 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:5 +msgid "box.space.create_check_constraint()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:9 +msgid "This function was removed in :doc:`2.11.0 `. The check constraint mechanism is replaced with the new tuple constraints. Learn more about tuple constraints in :ref:`Constraints `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:18 +msgid "Create a check constraint. A check constraint is a requirement that must be met when a tuple is inserted or updated in a space. Check constraints created with ``space_object:create_check_constraint`` have the same effect as check constraints created with an SQL CHECK() clause in a :ref:`CREATE TABLE statement `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:25 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:27 +msgid "name of check constraint, which should conform to the :ref:`rules for object names `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:29 +msgid "SQL code of an expression which must return a boolean result" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:31 +msgid "check constraint object" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:32 +msgid "check_constraint_object" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:34 +msgid "The space must be formatted with :doc:`/reference/reference_lua/box_space/format` so that the expression can contain field names. The space must be empty. The space must not be a system space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:38 +msgid "The expression must return true or false and should be deterministic. The expression may be any SQL (not Lua) expression containing field names, built-in function names, literals, and operators. Not subqueries. If a field name contains lower case characters, it must be enclosed in \"double quotes\"." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:43 +msgid "Check constraints are checked before the request is performed, at the same time as Lua :doc:`before_replace triggers `. If there is more than one check constraint or before_replace trigger, then they are ordered according to time of creation. (This is a change from the earlier behavior of check constraints, which caused checking before the tuple was formed.)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:51 +msgid "Check constraints can be dropped with :samp:`{space_object}.ck_constraint.{check_constraint_name}:drop()`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:53 +msgid "Check constraints can be disabled with :samp:`{space_object}.ck_constraint.{check_constraint_name}:enable(false)` or :samp:`{check_constraint_object}:enable(false)`. Check constraints can be enabled with :samp:`{space_object}.ck_constraint.{check_constraint_name}:enable(true)` or :samp:`{check_constraint_object}:enable(true)`. By default a check constraint is 'enabled' which means that the check is performed whenever the request is performed, but can be changed to 'disabled' which means that the check is not performed." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:61 +msgid "During the recovery process, for example when the Tarantool server is starting, the check is not performed unless :ref:`force_recovery ` is specified." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:66 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:68 +msgid "box.schema.space.create('t')\n" +"box.space.t:format({{name = 'f1', type = 'unsigned'},\n" +" {name = 'f2', type = 'string'},\n" +" {name = 'f3', type = 'string'}})\n" +"box.space.t:create_index('i')\n" +"box.space.t:create_check_constraint('c1', [[\"f2\" > 'A']])\n" +"box.space.t:create_check_constraint('c2',\n" +" [[\"f2\"=UPPER(\"f3\") AND NOT \"f2\" LIKE '__']])\n" +"-- This insert will fail, constraint c1 expression returns false\n" +"box.space.t:insert{1, 'A', 'A'}\n" +"-- This insert will fail, constraint c2 expression returns false\n" +"box.space.t:insert{1, 'B', 'c'}\n" +"-- This insert will succeed, both constraint expressions return true\n" +"box.space.t:insert{1, 'B', 'b'}\n" +"-- This update will fail, constraint c2 expression returns false\n" +"box.space.t:update(1, {{'=', 2, 'xx'}, {'=', 3, 'xx'}})" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_check_constraint.rst:87 +msgid "A list of check constraints is in :doc:`/reference/reference_lua/box_space/_ck_constraint`." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/create_index.pot b/locale/en/reference/reference_lua/box_space/create_index.pot new file mode 100644 index 0000000000..5f68ed4b0a --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/create_index.pot @@ -0,0 +1,816 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:4 +msgid "space_object:create_index()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:11 +msgid "Create an :ref:`index `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:13 +msgid "It is mandatory to create an index for a space before trying to insert tuples into it or select tuples from it. The first created index will be used as the primary-key index, so it must be unique." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:17 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:19 +msgid "name of index, which should conform to the :ref:`rules for object names `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:21 +msgid "index options (see :ref:`index_opts `)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:23 +msgid "index object" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:24 +msgid "index_object" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:26 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:28 +msgid "too many parts" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:29 +msgid "index '...' already exists" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:30 +msgid "primary key must be unique" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:32 +msgid "Building or rebuilding a large index will cause occasional :ref:`yields ` so that other requests will not be blocked. If the other requests cause an illegal situation such as a duplicate key in a unique index, building or rebuilding such index will fail." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:39 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:94 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:121 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:323 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:352 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:586 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:663 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:41 +msgid "-- Create a space --\n" +"bands = box.schema.space.create('bands')\n" +"\n" +"-- Specify field names and types --\n" +"box.space.bands:format({\n" +" { name = 'id', type = 'unsigned' },\n" +" { name = 'band_name', type = 'string' },\n" +" { name = 'year', type = 'unsigned' }\n" +"})\n" +"\n" +"-- Create a primary index --\n" +"box.space.bands:create_index('primary', { parts = { 'id' } })\n" +"\n" +"-- Create a unique secondary index --\n" +"box.space.bands:create_index('band', { parts = { 'band_name' } })\n" +"\n" +"-- Create a non-unique secondary index --\n" +"box.space.bands:create_index('year', { parts = { { 'year' } }, unique = false })\n" +"\n" +"-- Create a multi-part index --\n" +"box.space.bands:create_index('year_band', { parts = { { 'year' }, { 'band_name' } } })\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:51 +msgid "index_opts" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:56 +msgid "Index options that include the index name, type, identifiers of key fields, and so on. These options are passed to the :ref:`space_object.create_index() ` method." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:61 +msgid "These options are also passed to :doc:`/reference/reference_lua/box_index/alter`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:67 +msgid "The :ref:`index type `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:69 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:172 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:193 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:307 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:320 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:396 +msgid "Type: string" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:70 +msgid "Default: ``TREE``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:71 +msgid "Possible values: ``TREE``, ``HASH``, ``RTREE``, ``BITSET``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:78 +msgid "A unique numeric identifier of the index, which is generated automatically." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:80 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:162 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:219 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:231 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:243 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:255 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:267 +msgid "Type: number" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:81 +msgid "Default: last index's ID + 1" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:88 +msgid "Specify whether an index may be unique. When ``true``, the index cannot contain the same key value twice." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:91 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:108 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:207 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:348 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:385 +msgid "Type: boolean" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:92 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:208 +msgid "Default: ``true``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:96 +msgid "-- Create a non-unique secondary index --\n" +"box.space.bands:create_index('year', { parts = { { 'year' } }, unique = false })\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:106 +msgid "Specify whether to swallow an error on an attempt to create an index with a duplicated name." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:109 +msgid "Default: ``false``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:116 +msgid "Specify the index's key parts." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:118 +msgid "Type: a table of :ref:`key_part ` values" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:119 +msgid "Default: ``{1, ‘unsigned’}``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:123 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:442 +msgid "-- Create a primary index --\n" +"box.space.bands:create_index('primary', { parts = { 'id' } })\n" +"\n" +"-- Create a unique secondary index --\n" +"box.space.bands:create_index('band', { parts = { 'band_name' } })\n" +"\n" +"-- Create a non-unique secondary index --\n" +"box.space.bands:create_index('year', { parts = { { 'year' } }, unique = false })\n" +"\n" +"-- Create a multi-part index --\n" +"box.space.bands:create_index('year_band', { parts = { { 'year' }, { 'band_name' } } })\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:132 +msgid "**Alternative way to declare index parts**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:134 +msgid "Before version :doc:`2.7.1 `, if an index consisted of a single part and had some options like ``is_nullable`` or ``collation`` and its definition was written as" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:138 +msgid "my_space:create_index('one_part_idx', {parts = {1, 'unsigned', is_nullable=true}})" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:142 +msgid "(with the only brackets) then options were ignored by Tarantool." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:144 +msgid "Since version :doc:`2.7.1 ` it is allowed to omit extra braces in an index definition and use both ways:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:147 +msgid "-- with extra braces\n" +"my_space:create_index('one_part_idx', {parts = {{1, 'unsigned', is_nullable=true}}})\n" +"\n" +"-- without extra braces\n" +"my_space:create_index('one_part_idx', {parts = {1, 'unsigned', is_nullable=true}})" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:160 +msgid "The RTREE index dimension." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:163 +msgid "Default: 2" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:170 +msgid "The RTREE index distance type." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:173 +msgid "Default: ``euclid``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:174 +msgid "Possible values: ``euclid``, ``manhattan``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:181 +msgid "Create a generator for indexes using a sequence object. Learn more from :ref:`specifying a sequence in create_index() `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:184 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:294 +msgid "Type: string or number" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:191 +msgid "Specify the identifier of the :ref:`functional index ` function." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:200 +msgid "**Since:** :doc:`2.6.1 `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:202 +msgid "Specify whether hint optimization is enabled for the TREE index:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:204 +msgid "If ``true``, the index works faster." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:205 +msgid "If ``false``, the index size is reduced by half." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:215 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:227 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:239 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:251 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:263 +msgid "**Vinyl only**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:217 +msgid "Specify the bloom filter's false positive rate." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:220 +msgid "Default: :ref:`vinyl_bloom_fpr `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:229 +msgid "Specify the size of a page used for read and write disk operations." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:232 +msgid "Default: :ref:`vinyl_page_size `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:241 +msgid "Specify the default maximum range size (in bytes) for a vinyl index." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:244 +msgid "Default: :ref:`vinyl_range_size `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:253 +msgid "Specify the maximum number of runs per level in the LSM tree." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:256 +msgid "Default: :ref:`vinyl_run_count_per_level `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:265 +msgid "Specify the ratio between the sizes of different levels in the LSM tree." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:268 +msgid "Default: :ref:`vinyl_run_size_ratio `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:277 +msgid "key_part" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:281 +msgid "A descriptor of a single part in a multipart key. A table of parts is passed to the :ref:`index_opts.parts ` option." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:288 +msgid "Specify the field number or name." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:292 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:440 +msgid "To create a key part by a field name, you need to specify :ref:`space_object:format() ` first." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:296 +msgid "**Examples:** :ref:`Creating an index using field names and numbers `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:303 +msgid "Specify the field type. If the field type is specified in :ref:`space_object:format() `, ``key_part.type`` inherits this value." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:308 +msgid "Default: ``scalar``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:309 +msgid "Possible values: listed in :ref:`Indexed field types `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:316 +msgid "Specify the :ref:`collation ` used to compare field values. If the field collation is specified in :ref:`space_object:format() `, ``key_part.collation`` inherits this value." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:321 +msgid "Possible values: listed in the :ref:`box.space._collation ` system space" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:325 +msgid "-- Create a space --\n" +"box.schema.space.create('tester')\n" +"\n" +"-- Use the 'unicode' collation --\n" +"box.space.tester:create_index('unicode', { parts = { { field = 1,\n" +" type = 'string',\n" +" collation = 'unicode' } } })\n" +"\n" +"-- Use the 'unicode_ci' collation --\n" +"box.space.tester:create_index('unicode_ci', { parts = { { field = 1,\n" +" type = 'string',\n" +" collation = 'unicode_ci' } } })\n" +"\n" +"-- Insert test data --\n" +"box.space.tester:insert { 'ЕЛЕ' }\n" +"box.space.tester:insert { 'елейный' }\n" +"box.space.tester:insert { 'ёлка' }\n" +"\n" +"-- Returns nil --\n" +"select_unicode = box.space.tester.index.unicode:select({ 'ЁлКа' })\n" +"-- Returns 'ёлка' --\n" +"select_unicode_ci = box.space.tester.index.unicode_ci:select({ 'ЁлКа' })\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:334 +msgid "Specify whether ``nil`` (or its equivalent such as ``msgpack.NULL``) can be used as a field value. If the ``is_nullable`` option is specified in :ref:`space_object:format() `, ``key_part.is_nullable`` inherits this value." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:338 +msgid "You can set this option to ``true`` if:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:340 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:376 +msgid "the index type is TREE" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:341 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:377 +msgid "the index is not the primary index" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:343 +msgid "It is also legal to insert nothing at all when using trailing nullable fields. Within indexes, such null values are always treated as equal to other null values and are always treated as less than non-null values. Nulls may appear multiple times even in a unique index." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:349 +#: ../../doc/reference/reference_lua/box_space/create_index.rst:386 +msgid "Default: false" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:354 +msgid "box.space.tester:create_index('I', {unique = true, parts = {{field = 2, type = 'number', is_nullable = true}}})" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:360 +msgid "It is legal to create multiple indexes for the same field with different ``is_nullable`` values or to call :doc:`/reference/reference_lua/box_space/format` with a different ``is_nullable`` value from what is used for an index. When there is a contradiction, the rule is: null is illegal unless ``is_nullable=true`` for every index and for the space format." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:371 +msgid "**Since:** :doc:`2.8.2 `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:373 +msgid "Specify whether an index can skip tuples with null at this key part. You can set this option to ``true`` if:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:379 +msgid "If ``exclude_null`` is set to ``true``, ``is_nullable`` is set to ``true`` automatically. Note that this option can be changed dynamically. In this case, the index is rebuilt." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:383 +msgid "Such indexes do not store filtered tuples at all, so indexing can be done faster." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:394 +msgid "Specify the path string for a map field." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:398 +msgid "See the examples below:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:400 +msgid ":ref:`Creating an index using the path option for map fields `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:401 +msgid ":ref:`Creating a multikey index using the path option with [*] `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:427 +msgid "Examples" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:432 +msgid "Creating an index using field names and numbers" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:435 +msgid "``create_index()`` can use field names or field numbers to define key parts." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:438 +msgid "**Example 1 (field names):**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:447 +msgid "**Example 2 (field numbers):**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:449 +msgid "-- Create a primary index --\n" +"box.space.bands:create_index('primary', { parts = { 1 } })\n" +"\n" +"-- Create a unique secondary index --\n" +"box.space.bands:create_index('band', { parts = { 2 } })\n" +"\n" +"-- Create a non-unique secondary index --\n" +"box.space.bands:create_index('year', { parts = { { 3 } }, unique = false })\n" +"\n" +"-- Create a multi-part index --\n" +"box.space.bands:create_index('year_band', { parts = { 3, 2 } })\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:459 +msgid "Creating an index using the path option for map fields (JSON-path indexes)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:461 +msgid "To create an index for a field that is a map (a path string and a scalar value), specify the path string during index creation, like this:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:512 +msgid ":extsamp:`parts = {{*{field-number}*}, {*{'data-type'}*}, path = {*{'path-name'}*}}`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:469 +msgid "The index type must be TREE or HASH and the contents of the field must always be maps with the same path." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:472 +msgid "**Example 1 -- The simplest use of path:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:474 +msgid "box.schema.space.create('space1')\n" +"box.space.space1:create_index('primary', { parts = { { field = 1,\n" +" type = 'scalar',\n" +" path = 'age' } } })\n" +"box.space.space1:insert({ { age = 44 } })\n" +"box.space.space1:select(44)\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:479 +msgid "**Example 2 -- path plus format() plus JSON syntax to add clarity:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:481 +msgid "box.schema.space.create('space2')\n" +"box.space.space2:format({ { 'id', 'unsigned' }, { 'data', 'map' } })\n" +"box.space.space2:create_index('info', { parts = { { 'data.full_name[\"firstname\"]', 'str' },\n" +" { 'data.full_name[\"surname\"]', 'str' } } })\n" +"box.space.space2:insert({ 1, { full_name = { firstname = 'John', surname = 'Doe' } } })\n" +"box.space.space2:select { 'John' }\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:491 +msgid "Creating a multikey index using the path option with [*]" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:493 +msgid "The string in a path option can contain ``[*]`` which is called **an array index placeholder**. Indexes defined with this are useful for JSON documents that all have the same structure." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:497 +msgid "For example, when creating an index on field#2 for a string document that will start with ``{'data': [{'name': '...'}, {'name': '...'}]``, the parts section in the ``create_index`` request could look like:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:501 +msgid "parts = {{field = 2, type = 'str', path = 'data[*].name'}}" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:505 +msgid "Then tuples containing names can be retrieved quickly with ``index_object:select({key-value})``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:508 +msgid "A single field can have multiple keys, as in this example which retrieves the same tuple twice because there are two keys 'A' and 'B' which both match the request:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:512 +msgid "my_space = box.schema.space.create('json_documents')\n" +"my_space:create_index('primary')\n" +"multikey_index = my_space:create_index('multikey', {parts = {{field = 2, type = 'str', path = 'data[*].name'}}})\n" +"my_space:insert({1,\n" +" {data = {{name = 'A'},\n" +" {name = 'B'}},\n" +" extra_field = 1}})\n" +"multikey_index:select({''}, {iterator = 'GE'})" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:523 +msgid "The result of the select request looks like this:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:525 +msgid "tarantool> multikey_index:select({''},{iterator='GE'})\n" +"---\n" +"- - [1, {'data': [{'name': 'A'}, {'name': 'B'}], 'extra_field': 1}]\n" +"- [1, {'data': [{'name': 'A'}, {'name': 'B'}], 'extra_field': 1}]\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:533 +msgid "The following restrictions exist:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:535 +msgid "``[*]`` must be alone or must be at the end of a name in the path." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:536 +msgid "``[*]`` must not appear twice in the path." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:537 +msgid "If an index has a path with ``x[*]``, then no other index can have a path with x.component." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:539 +msgid "``[*]`` must not appear in the path of a primary key." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:540 +msgid "If an index has ``unique=true`` and has a path with ``[*]``, then duplicate keys from different tuples are disallowed, but duplicate keys for the same tuple are allowed." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:543 +msgid "The field's value must have the same structure as in the path definition, or be nil (nil is not indexed)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:545 +msgid "In a space with multikey indexes, any tuple cannot contain :ref:`more than ~8,000 elements ` indexed that way." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:551 +msgid "Creating a functional index" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:553 +msgid "Functional indexes are indexes that call a user-defined function for forming the index key, rather than depending entirely on the Tarantool default formation. Functional indexes are useful for condensing or truncating or reversing or any other way that users want to customize the index." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:558 +msgid "There are several recommendations for building functional indexes:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:560 +msgid "The function definition must expect a tuple, which has the contents of fields at the time a data-change request happens, and must return a tuple, which has the contents that will be put in the index." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:564 +msgid "The ``create_index`` definition must include the specification of all key parts, and the custom function must return a table that has the same number of key parts with the same types." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:568 +msgid "The space must have a memtx engine." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:570 +msgid "The function must be persistent and deterministic (see :ref:`Creating a function with body `)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:573 +msgid "The key parts must not depend on JSON paths." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:575 +msgid "The function must access key-part values by index, not by field name." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:577 +msgid "Functional indexes must not be primary-key indexes." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:579 +msgid "Functional indexes cannot be altered and the function cannot be changed if it is used for an index, so the only way to change them is to drop the index and create it again." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:583 +msgid "Only :ref:`sandboxed ` functions are suitable for functional indexes." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:588 +msgid "A function could make a key using only the first letter of a string field." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:590 +msgid "Create a space. The space needs a primary-key field, which is not the field that we will use for the functional index:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:593 +msgid "box.schema.space.create('tester')\n" +"box.space.tester:create_index('i', { parts = { { field = 1, type = 'string' } } })\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:599 +msgid "Create a function. The function expects a tuple. In this example, it will work on tuple[2] because the key source is field number 2 in what we will insert. Use ``string.sub()`` from the ``string`` module to get the first character:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:603 +msgid "function_code = [[function(tuple) return {string.sub(tuple[2],1,1)} end]]\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:608 +msgid "Make the function persistent using the ``box.schema.func.create`` function:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:610 +msgid "box.schema.func.create('my_func',\n" +" { body = function_code, is_deterministic = true, is_sandboxed = true })\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:615 +msgid "Create a functional index. Specify the fields whose values will be passed to the function. Specify the function:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:618 +msgid "box.space.tester:create_index('func_index', { parts = { { field = 1, type = 'string' } },\n" +" func = 'my_func' })\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:623 +msgid "Insert a few tuples. Select using only the first letter, it will work because that is the key. Or, select using the same function as was used for insertion:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:627 +msgid "box.space.tester:insert({ 'a', 'wombat' })\n" +"box.space.tester:insert({ 'b', 'rabbit' })\n" +"box.space.tester.index.func_index:select('w')\n" +"box.space.tester.index.func_index:select(box.func.my_func:call({ { 'tester', 'wombat' } }))\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:633 +msgid "The results of the two ``select`` requests will look like this:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:635 +msgid "tarantool> box.space.tester.index.func_index:select('w')\n" +"---\n" +"- - ['a', 'wombat']\n" +"...\n" +"tarantool> box.space.tester.index.func_index:select(box.func.my_func:call({{'tester','wombat'}}));\n" +"---\n" +"- - ['a', 'wombat']\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:646 +msgid "Here is the full code of the example:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:648 +msgid "box.schema.space.create('tester')\n" +"box.space.tester:create_index('i', { parts = { { field = 1, type = 'string' } } })\n" +"function_code = [[function(tuple) return {string.sub(tuple[2],1,1)} end]]\n" +"box.schema.func.create('my_func',\n" +" { body = function_code, is_deterministic = true, is_sandboxed = true })\n" +"box.space.tester:create_index('func_index', { parts = { { field = 1, type = 'string' } },\n" +" func = 'my_func' })\n" +"box.space.tester:insert({ 'a', 'wombat' })\n" +"box.space.tester:insert({ 'b', 'rabbit' })\n" +"box.space.tester.index.func_index:select('w')\n" +"box.space.tester.index.func_index:select(box.func.my_func:call({ { 'tester', 'wombat' } }))\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:656 +msgid "Functions for functional indexes can return **multiple keys**. Such functions are called \"multikey\" functions." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:659 +msgid "To create a multikey function, the options of ``box.schema.func.create()`` must include ``is_multikey = true``. The return value must be a table of tuples. If a multikey function returns N tuples, then N keys will be added to the index." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/create_index.rst:665 +msgid "tester = box.schema.space.create('withdata')\n" +"tester:format({ { name = 'name', type = 'string' },\n" +" { name = 'address', type = 'string' } })\n" +"name_index = tester:create_index('name', { parts = { { field = 1, type = 'string' } } })\n" +"function_code = [[function(tuple)\n" +" local address = string.split(tuple[2])\n" +" local ret = {}\n" +" for _, v in pairs(address) do\n" +" table.insert(ret, {utf8.upper(v)})\n" +" end\n" +" return ret\n" +" end]]\n" +"box.schema.func.create('address',\n" +" { body = function_code,\n" +" is_deterministic = true,\n" +" is_sandboxed = true,\n" +" is_multikey = true })\n" +"addr_index = tester:create_index('addr', { unique = false,\n" +" func = 'address',\n" +" parts = { { field = 1, type = 'string',\n" +" collation = 'unicode_ci' } } })\n" +"tester:insert({ \"James\", \"SIS Building Lambeth London UK\" })\n" +"tester:insert({ \"Sherlock\", \"221B Baker St Marylebone London NW1 6XE UK\" })\n" +"addr_index:select('Uk')\n" +"" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/delete.pot b/locale/en/reference/reference_lua/box_space/delete.pot new file mode 100644 index 0000000000..7a98df0b4b --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/delete.pot @@ -0,0 +1,92 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/delete.rst:5 +msgid "space_object:delete()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/delete.rst:11 +msgid "Delete a tuple identified by the primary key." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/delete.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/delete.rst:13 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/delete.rst:15 +msgid "primary-key field values, must be passed as a Lua table if key is multi-part" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/delete.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/delete.rst:18 +msgid "the deleted tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/delete.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/delete.rst:19 +msgid "tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/delete.rst:21 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/delete.rst:23 +msgid ":errcode:`ER_TRANSACTION_CONFLICT` if a transaction conflict is detected in the :ref:`MVCC transaction mode `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/delete.rst:26 +msgid "**Complexity factors:** Index size, Index type" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/delete.rst:28 +msgid "**Note regarding storage engine:** vinyl will return ``nil``, rather than the deleted tuple." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/delete.rst:31 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/delete.rst:33 +msgid "tarantool> box.space.tester:delete(1)\n" +"---\n" +"- [1, 'My first tuple']\n" +"...\n" +"tarantool> box.space.tester:delete(1)\n" +"---\n" +"...\n" +"tarantool> box.space.tester:delete('a')\n" +"---\n" +"- error: 'Supplied key type of part 0 does not match index part type:\n" +" expected unsigned'\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/delete.rst:48 +msgid "For more usage scenarios and typical errors see :ref:`Example: using data operations ` further in this section." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/drop.pot b/locale/en/reference/reference_lua/box_space/drop.pot new file mode 100644 index 0000000000..3668409327 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/drop.pot @@ -0,0 +1,57 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/drop.rst:5 +msgid "space_object:drop()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/drop.rst:11 +msgid "Drop a space. The method is performed in background and doesn't block consequent requests." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/drop.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/drop.rst:14 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/drop.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/drop.rst:17 +msgid "nil" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/drop.rst:19 +msgid "**Possible errors:** ``space_object`` does not exist." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/drop.rst:21 +msgid "**Complexity factors:** Index size, Index type, Number of indexes accessed, WAL settings." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/drop.rst:24 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/drop.rst:26 +msgid "box.space.space_that_does_not_exist:drop()" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/enabled.pot b/locale/en/reference/reference_lua/box_space/enabled.pot new file mode 100644 index 0000000000..93aecb2188 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/enabled.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/enabled.rst:5 +msgid "space_object:enabled" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/enabled.rst:11 +msgid "Whether or not this space is enabled. The value is ``false`` if the space has no index." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/field_count.pot b/locale/en/reference/reference_lua/box_space/field_count.pot new file mode 100644 index 0000000000..d952fbe3cd --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/field_count.pot @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/field_count.rst:5 +msgid "space_object:field_count" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/field_count.rst:11 +msgid "The required field count for all tuples in this space. The field_count can be set initially with:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/field_count.rst:14 +msgid "box.schema.space.create(..., {\n" +" ... ,\n" +" field_count = *field_count_value* ,\n" +" ...\n" +"})" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/field_count.rst:22 +msgid "The default value is ``0``, which means there is no required field count." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/field_count.rst:24 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/field_count.rst:26 +msgid "tarantool> box.space.tester.field_count\n" +"---\n" +"- 0\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/format.pot b/locale/en/reference/reference_lua/box_space/format.pot new file mode 100644 index 0000000000..665be6ab90 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/format.pot @@ -0,0 +1,282 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/format.rst:5 +msgid "space_object:format()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:11 +msgid "Declare field names and :ref:`types `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:13 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:15 +msgid "a list of field names and types" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:17 +msgid "``nil``, unless format-clause is omitted" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:19 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:21 +msgid "``space_object`` does not exist" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:22 +msgid "field names are duplicated" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:23 +msgid "type is not legal" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:27 +msgid "If you need to make a schema migration, see section :ref:`Migrations `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:29 +msgid "Ordinarily Tarantool allows unnamed untyped fields. But with ``format`` users can, for example, document that the Nth field is the surname field and must contain strings. It is also possible to specify a format clause in :doc:`box.schema.space.create() `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:35 +msgid "The format clause contains, for each field, a definition within braces: ``{name='...',type='...'[,is_nullable=...]}``, where:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:38 +msgid "The ``name`` value may be any string, provided that two fields do not have the same name." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:40 +msgid "The ``type`` value may be any of allowed types: any | unsigned | string | integer | number | varbinary | boolean | double | decimal | uuid | array | map | scalar, but for creating an index use only :ref:`indexed fields `;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:44 +msgid "(Optional) The ``is_nullable`` boolean value specifies whether ``nil`` can be used as a field value. See also: :ref:`key_part.is_nullable `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:46 +msgid "(Optional) The ``collation`` string value specifies the :ref:`collation ` used to compare field values. See also: :ref:`key_part.collation `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:48 +msgid "(Optional) The ``constraint`` table specifies the :ref:`constraints ` that the field value must satisfy." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:49 +msgid "(Optional) The ``foreign_key`` table specifies the :ref:`foreign keys ` for the field." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:51 +msgid "It is not legal for tuples to contain values that have the wrong type. The example below will cause an error:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:54 +msgid "--This example will cause an error.\n" +"box.space.tester:format({{' ',type='number'}})\n" +"box.space.tester:insert{'string-which-is-not-a-number'}" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:60 +msgid "It is not legal for tuples to contain null values if ``is_nullable=false``, which is the default. The example below will cause an error:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:63 +msgid "--This example will cause an error.\n" +"box.space.tester:format({{' ',type='number',is_nullable=false}})\n" +"box.space.tester:insert{nil,2}" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:70 +msgid "It is legal for tuples to have more fields than are described by a format clause. The way to constrain the number of fields is to specify a space's :doc:`field_count ` member." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:74 +msgid "It is legal for tuples to have fewer fields than are described by a format clause, if the omitted trailing fields are described with ``is_nullable=true``. For example, the request below will not cause a format-related error:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:78 +msgid "box.space.tester:format({{'a',type='number'},{'b',type='number',is_nullable=true}})\n" +"box.space.tester:insert{2}" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:84 +msgid "It is legal to use ``format`` on a space that already has a format, thus replacing any previous definitions, provided that there is no conflict with existing data or index definitions." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:88 +msgid "It is legal to use ``format`` to change the ``is_nullable`` flag. The example below will not cause an error -- and will not cause rebuilding of the space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:92 +msgid "box.space.tester:format({{' ',type='scalar',is_nullable=false}})\n" +"box.space.tester:format({{' ',type='scalar',is_nullable=true}})" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:97 +msgid "But going the other way and changing ``is_nullable`` from ``true`` to ``false`` might cause rebuilding and might cause an error if there are existing tuples with nulls." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:102 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:104 +msgid "box.space.tester:format({{name='surname',type='string'},{name='IDX',type='array'}})\n" +"box.space.tester:format({{name='surname',type='string',is_nullable=true}})" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:110 +msgid "There are legal variations of the format clause:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:112 +msgid "omitting both 'name=' and 'type='," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:113 +msgid "omitting 'type=' alone," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:114 +msgid "adding extra braces." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:116 +msgid "The following examples show all the variations, first for one field named 'x', second for two fields named 'x' and 'y'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:119 +msgid "box.space.tester:format({{name='x',type='scalar'}})\n" +"box.space.tester:format({{name='x',type='scalar'},{name='y',type='unsigned'}})\n" +"\n" +"box.space.tester:format({{'x'}})\n" +"box.space.tester:format({{'x'},{'y'}})\n" +"\n" +"-- types\n" +"box.space.tester:format({{name='x'}})\n" +"box.space.tester:format({{name='x'},{name='y'}})\n" +"\n" +"box.space.tester:format({{'x',type='scalar'}})\n" +"box.space.tester:format({{'x',type='scalar'},{'y',type='unsigned'}})\n" +"\n" +"box.space.tester:format({{'x','scalar'}})\n" +"box.space.tester:format({{'x','scalar'},{'y','unsigned'}})" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:137 +msgid "The following example shows how to create a space, format it with all possible types, and insert into it." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:140 +msgid "tarantool> box.schema.space.create('t')\n" +"---\n" +"- engine: memtx\n" +" before_replace: 'function: 0x4019c488'\n" +" on_replace: 'function: 0x4019c460'\n" +" ck_constraint: []\n" +" field_count: 0\n" +" temporary: false\n" +" index: []\n" +" is_local: false\n" +" enabled: false\n" +" name: t\n" +" id: 534\n" +"- created\n" +"...\n" +"tarantool> ffi = require('ffi')\n" +"---\n" +"...\n" +"tarantool> decimal = require('decimal')\n" +"---\n" +"...\n" +"tarantool> uuid = require('uuid')\n" +"---\n" +"...\n" +"tarantool> box.space.t:format({{name = '1', type = 'any'},\n" +" > {name = '2', type = 'unsigned'},\n" +" > {name = '3', type = 'string'},\n" +" > {name = '4', type = 'number'},\n" +" > {name = '5', type = 'double'},\n" +" > {name = '6', type = 'integer'},\n" +" > {name = '7', type = 'boolean'},\n" +" > {name = '8', type = 'decimal'},\n" +" > {name = '9', type = 'uuid'},\n" +" > {name = 'a', type = 'scalar'},\n" +" > {name = 'b', type = 'array'},\n" +" > {name = 'c', type = 'map'}})\n" +"---\n" +"...\n" +"tarantool> box.space.t:create_index('i',{parts={2, type = 'unsigned'}})\n" +"---\n" +"- unique: true\n" +" parts:\n" +" - type: unsigned\n" +" is_nullable: false\n" +" fieldno: 2\n" +" id: 0\n" +" space_id: 534\n" +" type: TREE\n" +" name: i\n" +"...\n" +"tarantool> box.space.t:insert{{'a'}, -- any\n" +" > 1, -- unsigned\n" +" > 'W?', -- string\n" +" > 5.5, -- number\n" +" > ffi.cast('double', 1), -- double\n" +" > -0, -- integer\n" +" > true, -- boolean\n" +" > decimal.new(1.2), -- decimal\n" +" > uuid.new(), -- uuid\n" +" > true, -- scalar\n" +" > {{'a'}}, -- array\n" +" > {val=1}} -- map\n" +"---\n" +"- [['a'], 1, 'W?', 5.5, 1, 0, true, 1.2, 1f41e7b8-3191-483d-b46e-1aa6a4b14557, true, [['a']], {'val': 1}]\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:208 +msgid "Names specified with the format clause can be used in :doc:`/reference/reference_lua/box_space/get` and in :doc:`/reference/reference_lua/box_space/create_index` and in :doc:`/reference/reference_lua/box_tuple/field_name` and in :doc:`/reference/reference_lua/box_tuple/field_path`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:214 +msgid "If the format clause is omitted, then the returned value is the table that was used in a previous :samp:`{space_object}:format({format-clause})` invocation. For example, after ``box.space.tester:format({{'x','scalar'}})``, ``box.space.tester:format()`` will return ``[{'name': 'x', 'type': 'scalar'}]``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:219 +msgid "Formatting or reformatting a large space will cause occasional :ref:`yields ` so that other requests will not be blocked. If the other requests cause an illegal situation such as a field value of the wrong type, the formatting or reformatting will fail." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/format.rst:226 +msgid "**Note regarding storage engine:** vinyl supports formatting of non-empty spaces. Primary index definition cannot be formatted." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/frommap.pot b/locale/en/reference/reference_lua/box_space/frommap.pot new file mode 100644 index 0000000000..5a23331cce --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/frommap.pot @@ -0,0 +1,87 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/frommap.rst:5 +msgid "space_object:frommap()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/frommap.rst:11 +msgid "Convert a map to a tuple instance or to a table. The map must consist of \"field name = value\" pairs. The field names and the value types must match names and types stated previously for the space, via :doc:`/reference/reference_lua/box_space/format`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/frommap.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/frommap.rst:17 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/frommap.rst:19 +msgid "a series of \"field = value\" pairs, in any order." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/frommap.rst:20 +msgid "the only legal option is ``{table = true|false}``; |br| if the option is omitted or if ``{table = false}``, then return type will be 'cdata' (i.e. tuple); |br| if ``{table = true}``, then return type will be 'table'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/frommap.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/frommap.rst:25 +msgid "a tuple instance or table." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/frommap.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/frommap.rst:26 +msgid "tuple or table" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/frommap.rst:28 +msgid "**Possible errors:** ``space_object`` does not exist or has no format; \"unknown field\"." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/frommap.rst:30 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/frommap.rst:32 +msgid "-- Create a format with two fields named 'a' and 'b'.\n" +"-- Create a space with that format.\n" +"-- Create a tuple based on a map consistent with that space.\n" +"-- Create a table based on a map consistent with that space.\n" +"tarantool> format1 = {{name='a',type='unsigned'},{name='b',type='scalar'}}\n" +"---\n" +"...\n" +"tarantool> s = box.schema.create_space('test', {format = format1})\n" +"---\n" +"...\n" +"tarantool> s:frommap({b = 'x', a = 123456})\n" +"---\n" +"- [123456, 'x']\n" +"...\n" +"tarantool> s:frommap({b = 'x', a = 123456}, {table = true})\n" +"---\n" +"- - 123456\n" +" - x\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/get.pot b/locale/en/reference/reference_lua/box_space/get.pot new file mode 100644 index 0000000000..ca2cf817a5 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/get.pot @@ -0,0 +1,103 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/get.rst:5 +msgid "space_object:get()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:11 +msgid "Search for a tuple in the given space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:13 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:15 +msgid "value to be matched against the index key, which may be multi-part." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:18 +msgid "the tuple whose index key matches ``key``, or ``nil``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:19 +msgid "tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:21 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:23 +msgid "``space_object`` does not exist." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:24 +msgid ":errcode:`ER_TRANSACTION_CONFLICT` if a transaction conflict is detected in the :ref:`MVCC transaction mode `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:27 +msgid "**Complexity factors:** Index size, Index type, Number of indexes accessed, WAL settings." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:30 +msgid "The ``box.space...select`` function returns a set of tuples as a Lua table; the ``box.space...get`` function returns at most a single tuple. And it is possible to get the first tuple in a space by appending ``[1]``. Therefore ``box.space.tester:get{1}`` has the same effect as ``box.space.tester:select{1}[1]``, if exactly one tuple is found." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:36 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:38 +msgid "box.space.tester:get{1}" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:44 +msgid "**Using field names instead of field numbers:** `get()` can use field names described by the optional :doc:`/reference/reference_lua/box_space/format` clause. This is true because the object returned by ``get()`` can be used with most of the features described in the :doc:`/reference/reference_lua/box_tuple` description, including :doc:`/reference/reference_lua/box_tuple/field_name`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:50 +msgid "For example, we can format the `tester` space with a field named `x` and use the name `x` in the index definition:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:53 +msgid "box.space.tester:format({{name='x',type='scalar'}})\n" +"box.space.tester:create_index('I',{parts={'x'}})" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:58 +msgid "Then, if ``get`` or ``select`` retrieves a single tuple, we can reference the field 'x' in the tuple by its name:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/get.rst:61 +msgid "box.space.tester:get{1}['x']\n" +"box.space.tester:select{1}[1]['x']" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/id.pot b/locale/en/reference/reference_lua/box_space/id.pot new file mode 100644 index 0000000000..da4a89258e --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/id.pot @@ -0,0 +1,36 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/id.rst:5 +msgid "space_object.id" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/id.rst:11 +msgid "Ordinal space number. Spaces can be referenced by either name or number. Thus, if space ``tester`` has ``id = 800``, then ``box.space.tester:insert{0}`` and ``box.space[800]:insert{0}`` are equivalent requests." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/id.rst:16 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/id.rst:18 +msgid "tarantool> box.space.tester.id\n" +"---\n" +"- 512\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/index_data.pot b/locale/en/reference/reference_lua/box_space/index_data.pot new file mode 100644 index 0000000000..b769b82fc2 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/index_data.pot @@ -0,0 +1,56 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/index_data.rst:5 +msgid "space_object.index" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/index_data.rst:11 +msgid "A container for all defined indexes. There is a Lua object of type :doc:`box.index ` with methods to search tuples and iterate over them in predefined order." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/index_data.rst:15 +msgid "To reset, use :ref:`box.stat.reset() `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/index_data.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/index_data.rst:17 +msgid "table" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/index_data.rst:19 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/index_data.rst:21 +msgid "-- checking the number of indexes for space 'tester'\n" +"tarantool> local counter=0; for i=0,#box.space.tester.index do\n" +" if box.space.tester.index[i]~=nil then counter=counter+1 end\n" +" end; print(counter)\n" +"1\n" +"---\n" +"...\n" +"-- checking the type of index 'primary'\n" +"tarantool> box.space.tester.index.primary.type\n" +"---\n" +"- TREE\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/insert.pot b/locale/en/reference/reference_lua/box_space/insert.pot new file mode 100644 index 0000000000..be8e230602 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/insert.pot @@ -0,0 +1,80 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/insert.rst:5 +msgid "space_object:insert()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/insert.rst:11 +msgid "Insert a tuple into a space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/insert.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/insert.rst:13 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/insert.rst:15 +msgid "tuple to be inserted." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/insert.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/insert.rst:17 +msgid "the inserted tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/insert.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/insert.rst:18 +msgid "tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/insert.rst:20 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/insert.rst:22 +msgid ":errcode:`ER_TUPLE_FOUND` if a tuple with the same unique-key value already exists." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/insert.rst:24 +msgid ":errcode:`ER_TRANSACTION_CONFLICT` if a transaction conflict is detected in the :ref:`MVCC transaction mode `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/insert.rst:27 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/insert.rst:29 +msgid "tarantool> box.space.tester:insert{5000,'tuple number five thousand'}\n" +"---\n" +"- [5000, 'tuple number five thousand']\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/insert.rst:36 +msgid "For more usage scenarios and typical errors see :ref:`Example: using data operations ` further in this section." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/len.pot b/locale/en/reference/reference_lua/box_space/len.pot new file mode 100644 index 0000000000..f65c1ab409 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/len.pot @@ -0,0 +1,64 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/len.rst:5 +msgid "space_object:len()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/len.rst:11 +msgid "Return the number of tuples in the space. If compared with :doc:`count() `, this method works faster because ``len()`` does not scan the entire space to count the tuples." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/len.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/len.rst:16 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/len.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/len.rst:19 +msgid "Number of tuples in the space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/len.rst:21 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/len.rst:23 +msgid ":errcode:`ER_TRANSACTION_CONFLICT` if a transaction conflict is detected in the :ref:`MVCC transaction mode `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/len.rst:26 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/len.rst:28 +msgid "tarantool> box.space.tester:len()\n" +"---\n" +"- 2\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/len.rst:35 +msgid "**Note regarding storage engine:** vinyl supports ``len()`` but the result may be approximate. If an exact result is necessary then use :doc:`count() ` or :doc:`pairs():length() `." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/on_replace.pot b/locale/en/reference/reference_lua/box_space/on_replace.pot new file mode 100644 index 0000000000..b2dff7734f --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/on_replace.pot @@ -0,0 +1,165 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:5 +msgid "space_object:on_replace()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:11 +msgid "Create a \"replace :ref:`trigger `\". The ``trigger-function`` will be executed whenever a ``replace()`` or ``insert()`` or ``update()`` or ``upsert()`` or ``delete()`` happens to a tuple in ````." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:16 +msgid "function which will become the trigger function; see Example 2 below for details about trigger function parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:20 +msgid "existing trigger function which will be replaced by ``trigger-function``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:23 +msgid "nil or function pointer" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:25 +msgid "If the parameters are ``(nil, old-trigger-function)``, then the old trigger is deleted." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:28 +msgid "If both parameters are omitted, then the response is a list of existing trigger functions." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:31 +msgid "If it is necessary to know whether the trigger activation happened due to replication or on a specific connection type, the function can refer to :doc:`/reference/reference_lua/box_session/type`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:35 +msgid "Details about trigger characteristics are in the :ref:`triggers ` section." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:38 +msgid "See also :doc:`/reference/reference_lua/box_space/before_replace`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:40 +msgid "**Example 1:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:42 +msgid "tarantool> x = 0\n" +" > function f ()\n" +" > x = x + 1\n" +" > end\n" +"tarantool> box.space.my_space_name:on_replace(f)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:50 +msgid "**Example 2:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:52 +msgid "The ``trigger-function`` can have up to four parameters:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:54 +msgid "(tuple) old value which has the contents before the request started," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:55 +msgid "(tuple) new value which has the contents after the request ended," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:56 +msgid "(string) space name," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:57 +msgid "(string) type of request which is ``INSERT``, ``DELETE``, ``UPDATE``, or ``REPLACE``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:60 +msgid "For example, the following code causes ``nil`` and ``INSERT`` to be printed when the insert request is processed and causes ``[1, 'Hi']`` and ``DELETE`` to be printed when the delete request is processed:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:65 +msgid "box.schema.space.create('space_1')\n" +"box.space.space_1:create_index('space_1_index',{})\n" +"function on_replace_function (old, new, s, op) print(old) print(op) end\n" +"box.space.space_1:on_replace(on_replace_function)\n" +"box.space.space_1:insert{1,'Hi'}\n" +"box.space.space_1:delete{1}" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:74 +msgid "**Example 3:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:76 +msgid "The following series of requests will create a space, create an index, create a function which increments a counter, create a trigger, do two inserts, drop the space, and display the counter value - which is 2, because the function is executed once after each insert." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:81 +msgid "tarantool> s = box.schema.space.create('space53')\n" +"tarantool> s:create_index('primary', {parts = {{field = 1, type = 'unsigned'}}})\n" +"tarantool> function replace_trigger()\n" +" > replace_counter = replace_counter + 1\n" +" > end\n" +"tarantool> s:on_replace(replace_trigger)\n" +"tarantool> replace_counter = 0\n" +"tarantool> t = s:insert{1, 'First replace'}\n" +"tarantool> t = s:insert{2, 'Second replace'}\n" +"tarantool> s:drop()\n" +"tarantool> replace_counter" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:97 +msgid "As everything executed inside triggers is already in a transaction, you shouldn't use in trigger-functions for ``on_replace`` and ``before_replace``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:101 +msgid "transactions," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:102 +msgid "yield-operations (:ref:`explicit ` or not)," +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:103 +msgid "actions that are not allowed to be used in transactions (see :ref:`rule #2 `)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:108 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/on_replace.rst:110 +msgid "tarantool> box.space.test:on_replace(fiber.yield)\n" +"tarantool> box.space.test:replace{1, 2, 3}\n" +"2020-02-02 21:22:03.073 [73185] main/102/init.lua txn.c:532 E> ER_TRANSACTION_YIELD: Transaction has been aborted by a fiber yield\n" +"---\n" +"- error: Transaction has been aborted by a fiber yield\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/pairs.pot b/locale/en/reference/reference_lua/box_space/pairs.pot new file mode 100644 index 0000000000..0b5a43d351 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/pairs.pot @@ -0,0 +1,144 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/pairs.rst:5 +msgid "space_object:pairs()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/pairs.rst:11 +msgid "Search for a tuple or a set of tuples in the given space, and allow iterating over one tuple at a time. To search by the specific index, use the :ref:`box_index-pairs` method." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/pairs.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/pairs.rst:15 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/pairs.rst:17 +msgid "value to be matched against the index key, which may be multi-part" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/pairs.rst:19 +msgid "the :ref:`iterator type `. The default iterator type is 'EQ'" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/pairs.rst:20 +msgid "a tuple or the position of a tuple (:ref:`tuple_pos `) after which ``pairs`` starts the search. You can pass an empty string or :ref:`box.NULL ` to this option to start the search from the first tuple." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/pairs.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/pairs.rst:22 +msgid "The `iterator `_, which can be used in a ``for/end`` loop or with `totable() `_." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/pairs.rst:26 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/pairs.rst:28 +msgid "no such space" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/pairs.rst:29 +msgid "wrong type" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/pairs.rst:30 +msgid ":errcode:`ER_TRANSACTION_CONFLICT` if a transaction conflict is detected in the :ref:`MVCC transaction mode `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/pairs.rst:32 +msgid "iterator position is invalid" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/pairs.rst:35 +msgid "**Complexity factors:** Index size, Index type." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/pairs.rst:37 +msgid "For information about iterators' internal structures, see the `\"Lua Functional library\" `_ documentation." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/pairs.rst:42 +msgid "**Examples:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/pairs.rst:44 +msgid "Below are few examples of using ``pairs`` with different parameters. To try out these examples, you need to bootstrap a Tarantool instance as described in :ref:`Using data operations `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/pairs.rst:48 +msgid "-- Insert test data --\n" +"tarantool> bands:insert{1, 'Roxette', 1986}\n" +" bands:insert{2, 'Scorpions', 1965}\n" +" bands:insert{3, 'Ace of Base', 1987}\n" +" bands:insert{4, 'The Beatles', 1960}\n" +" bands:insert{5, 'Pink Floyd', 1965}\n" +" bands:insert{6, 'The Rolling Stones', 1962}\n" +" bands:insert{7, 'The Doors', 1965}\n" +" bands:insert{8, 'Nirvana', 1987}\n" +" bands:insert{9, 'Led Zeppelin', 1968}\n" +" bands:insert{10, 'Queen', 1970}\n" +"---\n" +"...\n" +"\n" +"-- Select all tuples by the primary index --\n" +"tarantool> for _, tuple in bands:pairs() do\n" +" print(tuple)\n" +" end\n" +"[1, 'Roxette', 1986]\n" +"[2, 'Scorpions', 1965]\n" +"[3, 'Ace of Base', 1987]\n" +"[4, 'The Beatles', 1960]\n" +"[5, 'Pink Floyd', 1965]\n" +"[6, 'The Rolling Stones', 1962]\n" +"[7, 'The Doors', 1965]\n" +"[8, 'Nirvana', 1987]\n" +"[9, 'Led Zeppelin', 1968]\n" +"[10, 'Queen', 1970]\n" +"---\n" +"...\n" +"\n" +"-- Select all tuples whose primary key values are between 3 and 6 --\n" +"tarantool> for _, tuple in bands:pairs(3, {iterator = \"GE\"}) do\n" +" if (tuple[1] > 6) then break end\n" +" print(tuple)\n" +" end\n" +"[3, 'Ace of Base', 1987]\n" +"[4, 'The Beatles', 1960]\n" +"[5, 'Pink Floyd', 1965]\n" +"[6, 'The Rolling Stones', 1962]\n" +"---\n" +"...\n" +"\n" +"-- Select all tuples after the specified tuple --\n" +"tarantool> for _, tuple in bands:pairs({}, {after={7, 'The Doors', 1965}}) do\n" +" print(tuple)\n" +" end\n" +"[8, 'Nirvana', 1987]\n" +"[9, 'Led Zeppelin', 1968]\n" +"[10, 'Queen', 1970]\n" +"---\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/put.pot b/locale/en/reference/reference_lua/box_space/put.pot new file mode 100644 index 0000000000..92952c41ef --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/put.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/put.rst:5 +msgid "space_object:put()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/put.rst:7 +msgid "See :doc:`/reference/reference_lua/box_space/replace`." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/rename.pot b/locale/en/reference/reference_lua/box_space/rename.pot new file mode 100644 index 0000000000..4a8a7f4832 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/rename.pot @@ -0,0 +1,62 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/rename.rst:5 +msgid "space_object:rename()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/rename.rst:11 +msgid "Rename a space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/rename.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/rename.rst:13 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/rename.rst:15 +msgid "new name for space" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/rename.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/rename.rst:17 +msgid "nil" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/rename.rst:19 +msgid "**Possible errors:** ``space_object`` does not exist." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/rename.rst:21 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/rename.rst:23 +msgid "tarantool> box.space.space55:rename('space56')\n" +"---\n" +"...\n" +"tarantool> box.space.space56:rename('space55')\n" +"---\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/replace.pot b/locale/en/reference/reference_lua/box_space/replace.pot new file mode 100644 index 0000000000..57b30bbe68 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/replace.pot @@ -0,0 +1,81 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/replace.rst:5 +msgid "space_object:replace() / put()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/replace.rst:12 +msgid "Insert a tuple into a space. If a tuple with the same primary key already exists, ``box.space...:replace()`` replaces the existing tuple with a new one. The syntax variants ``box.space...:replace()`` and ``box.space...:put()`` have the same effect; the latter is sometimes used to show that the effect is the converse of ``box.space...:get()``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/replace.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/replace.rst:18 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/replace.rst:20 +msgid "tuple to be inserted" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/replace.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/replace.rst:22 +msgid "the inserted tuple." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/replace.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/replace.rst:23 +msgid "tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/replace.rst:25 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/replace.rst:27 +msgid ":errcode:`ER_TUPLE_FOUND` if a different tuple with the same unique-key value already exists. (This will only happen if there is a unique secondary index.)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/replace.rst:29 +msgid ":errcode:`ER_TRANSACTION_CONFLICT` if a transaction conflict is detected in the :ref:`MVCC transaction mode `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/replace.rst:32 +msgid "**Complexity factors:** Index size, Index type, Number of indexes accessed, WAL settings." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/replace.rst:35 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/replace.rst:37 +msgid "box.space.tester:replace{5000, 'tuple number five thousand'}" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/replace.rst:41 +msgid "For more usage scenarios and typical errors see :ref:`Example: using data operations ` further in this section." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/run_triggers.pot b/locale/en/reference/reference_lua/box_space/run_triggers.pot new file mode 100644 index 0000000000..ec28144922 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/run_triggers.pot @@ -0,0 +1,49 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/run_triggers.rst:5 +msgid "space_object:run_triggers()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/run_triggers.rst:11 +msgid "At the time that a :ref:`trigger ` is defined, it is automatically enabled - that is, it will be executed. :doc:`Replace ` triggers can be disabled with :samp:`box.space.{space-name}:run_triggers(false)` and re-enabled with :samp:`box.space.{space-name}:run_triggers(true)`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/run_triggers.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/run_triggers.rst:17 +msgid "nil" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/run_triggers.rst:19 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/run_triggers.rst:21 +msgid "The following series of requests will associate an existing function named `F` with an existing space named `T`, associate the function a second time with the same space (so it will be called twice), disable all triggers of `T`, and delete each trigger by replacing with ``nil``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/run_triggers.rst:26 +msgid "tarantool> box.space.T:on_replace(F)\n" +"tarantool> box.space.T:on_replace(F)\n" +"tarantool> box.space.T:run_triggers(false)\n" +"tarantool> box.space.T:on_replace(nil, F)\n" +"tarantool> box.space.T:on_replace(nil, F)" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/select.pot b/locale/en/reference/reference_lua/box_space/select.pot new file mode 100644 index 0000000000..6f2ba1b6d8 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/select.pot @@ -0,0 +1,187 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/select.rst:5 +msgid "space_object:select()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:11 +msgid "Search for a tuple or a set of tuples in the given space by the primary key. To search by the specific index, use the :doc:`/reference/reference_lua/box_index/select` method." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:16 +msgid "Note that this method doesn't yield. For details, see :ref:`Cooperative multitasking `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:18 +msgid "an :ref:`object reference `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:20 +msgid "a value to be matched against the index key, which may be multi-part." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:22 +msgid "none, any, or all of the same options that :doc:`/reference/reference_lua/box_index/select` allows: * ``options.iterator`` -- the :ref:`iterator type `. The default iterator type is 'EQ'. * ``options.limit`` -- the maximum number of tuples. * ``options.offset`` -- the number of tuples to skip. * ``options.after`` -- a tuple or the position of a tuple (:ref:`tuple_pos `) after which ``select`` starts the search. You can pass an empty string or :ref:`box.NULL ` to this option to start the search from the first tuple. * ``options.fetch_pos`` -- if **true**, the ``select`` method returns the position of the last selected tuple as the second value. .. NOTE:: The ``after`` and ``fetch_pos`` options are supported for the ``TREE`` :ref:`index ` only." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:22 +msgid "none, any, or all of the same options that :doc:`/reference/reference_lua/box_index/select` allows:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:26 +msgid "``options.iterator`` -- the :ref:`iterator type `. The default iterator type is 'EQ'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:27 +msgid "``options.limit`` -- the maximum number of tuples." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:28 +msgid "``options.offset`` -- the number of tuples to skip." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:29 +msgid "``options.after`` -- a tuple or the position of a tuple (:ref:`tuple_pos `) after which ``select`` starts the search. You can pass an empty string or :ref:`box.NULL ` to this option to start the search from the first tuple." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:30 +msgid "``options.fetch_pos`` -- if **true**, the ``select`` method returns the position of the last selected tuple as the second value." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:34 +msgid "The ``after`` and ``fetch_pos`` options are supported for the ``TREE`` :ref:`index ` only." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:38 +msgid "This function might return one or two values:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:40 +msgid "The tuples whose primary-key fields are equal to the fields of the passed key. If the number of passed fields is less than the number of fields in the primary key, then only the passed fields are compared, so ``select{1,2}`` matches a tuple whose primary key is ``{1,2,3}``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:45 +msgid "(Optionally) If ``options.fetch_pos`` is set to **true**, returns a base64-encoded string representing the position of the last selected tuple as the second value. If no tuples are fetched, returns ``nil``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:50 +msgid "array of tuples" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:51 +msgid "(Optionally) string" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:54 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:56 +msgid "no such space" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:57 +msgid "wrong type" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:58 +msgid ":errcode:`ER_TRANSACTION_CONFLICT` if a transaction conflict is detected in the :ref:`MVCC transaction mode `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:60 +msgid "iterator position is invalid" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:63 +msgid "**Complexity factors:** Index size, Index type." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:65 +msgid "**Examples:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:67 +msgid "Below are few examples of using ``select`` with different parameters. To try out these examples, you need to bootstrap a Tarantool instance as described in :ref:`Using data operations `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:71 +msgid "-- Insert test data --\n" +"tarantool> bands:insert{1, 'Roxette', 1986}\n" +" bands:insert{2, 'Scorpions', 1965}\n" +" bands:insert{3, 'Ace of Base', 1987}\n" +" bands:insert{4, 'The Beatles', 1960}\n" +" bands:insert{5, 'Pink Floyd', 1965}\n" +" bands:insert{6, 'The Rolling Stones', 1962}\n" +" bands:insert{7, 'The Doors', 1965}\n" +" bands:insert{8, 'Nirvana', 1987}\n" +" bands:insert{9, 'Led Zeppelin', 1968}\n" +" bands:insert{10, 'Queen', 1970}\n" +"---\n" +"...\n" +"\n" +"-- Select a tuple by the specified primary key --\n" +"tarantool> bands:select(4)\n" +"---\n" +"- - [4, 'The Beatles', 1960]\n" +"...\n" +"\n" +"-- Select maximum 3 tuples with the primary key value greater than 3 --\n" +"tarantool> bands:select({3}, {iterator='GT', limit = 3})\n" +"---\n" +"- - [4, 'The Beatles', 1960]\n" +" - [5, 'Pink Floyd', 1965]\n" +" - [6, 'The Rolling Stones', 1962]\n" +"...\n" +"\n" +"-- Select maximum 3 tuples after the specified tuple --\n" +"tarantool> bands:select({}, {after = {4, 'The Beatles', 1960}, limit = 3})\n" +"---\n" +"- - [5, 'Pink Floyd', 1965]\n" +" - [6, 'The Rolling Stones', 1962]\n" +" - [7, 'The Doors', 1965]\n" +"...\n" +"\n" +"-- Select first 3 tuples and fetch a last tuple's position --\n" +"tarantool> result, position = bands:select({}, {limit = 3, fetch_pos = true})\n" +"---\n" +"...\n" +"-- Then, pass this position as the 'after' parameter --\n" +"tarantool> bands:select({}, {limit = 3, after = position})\n" +"---\n" +"- - [4, 'The Beatles', 1960]\n" +" - [5, 'Pink Floyd', 1965]\n" +" - [6, 'The Rolling Stones', 1962]\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/select.rst:123 +msgid "You can get a field from a tuple both by the field number and field name. See example: :ref:`using field names instead of field numbers `." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/system_views.pot b/locale/en/reference/reference_lua/box_space/system_views.pot new file mode 100644 index 0000000000..99b6267885 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/system_views.pot @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:4 +msgid "System space views" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:6 +msgid "A system space view, also called a 'sysview', is a restricted read-only copy of a system space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:8 +msgid "The system space views and the system spaces that they are associated with are: |br| ``_vcollation``, a view of :ref:`_collation `, |br| ``_vfunc``, a view of :ref:`_func `, |br| ``_vindex``, a view of :ref:`_index `, |br| ``_vpriv``, a view of :ref:`_priv `, |br| ``_vsequence``, a view of :ref:`_sequence `, |br| ``_vspace``, a view of :ref:`_space `, |br| ``_vspace_sequence``, a view of :ref:`_space_sequence `, |br| ``_vuser``, a view of :ref:`_user `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:18 +msgid "The structure of a system space view's tuples is identical to the structure of the associated space's tuples. However, the privileges for a system space view are usually different. By default, ordinary users do not have any privileges for most system spaces, but have a 'read' privilege for system space views." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:23 +msgid "Typically this is the default situation: |br| * :ref:`The 'public' role ` has 'read' privilege on all system space views because that is the situation when the database is first created. |br| * All users have the 'public' role, because it is granted to them automatically during :ref:`box.schema.user.create() `. |br| * The system space view will contain the tuples in the associated system space, if and only if the user has a privilege for the object named in the tuple. |br| Unless administrators change the privileges, the effect is that non-administrator users cannot access the system space, but they can access the system space view, which shows only the objects that they can access." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:34 +msgid "For example, typically, the 'admin' user can do anything with ``_space`` and ``_vspace`` looks the same as ``_space``. But the 'guest' user can only read ``_vspace``, and ``_vspace`` contains fewer tuples than ``_space``. Therefore in most installations the 'guest' user should select from ``_vspace`` to get a list of spaces." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:39 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:41 +msgid "This example shows the difference between ``_vuser`` and ``_user``. We have explained that: If the user has the full set of privileges (like 'admin'), the contents of ``_vuser`` match the contents of ``_user``. If the user has limited access, ``_vuser`` contains only tuples accessible to this user." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:47 +msgid "To see how ``_vuser`` works, :ref:`connect to a Tarantool database remotely ` via ``net.box`` and select all tuples from the ``_user`` space, both when the 'guest' user *is* and *is not* allowed to read from the database." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:53 +msgid "First, start Tarantool and grant read, write and execute privileges to the ``guest`` user:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:56 +msgid "tarantool> box.cfg{listen = 3301}\n" +"---\n" +"...\n" +"tarantool> box.schema.user.grant('guest', 'read,write,execute', 'universe')\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:65 +msgid "Switch to the other terminal, connect to the Tarantool instance and select all tuples from the ``_user`` space:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:68 +msgid "tarantool> conn = require('net.box').connect(3301)\n" +"---\n" +"...\n" +"tarantool> conn.space._user:select{}\n" +"---\n" +"- - [0, 1, 'guest', 'user', {}]\n" +" - [1, 1, 'admin', 'user', {}]\n" +" - [2, 1, 'public', 'role', {}]\n" +" - [3, 1, 'replication', 'role', {}]\n" +" - [31, 1, 'super', 'role', {}]\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:82 +msgid "This result contains the same set of users as if you made the request from your Tarantool instance as 'admin'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:85 +msgid "Switch to the first terminal and revoke the read privileges from the 'guest' user:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:87 +msgid "tarantool> box.schema.user.revoke('guest', 'read', 'universe')\n" +"---\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:93 +msgid "Switch to the other terminal, stop the session (to stop ``tarantool`` type Ctrl+C or Ctrl+D), start again, connect again, and repeat the ``conn.space._user:select{}`` request. The access is denied:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:97 +msgid "tarantool> conn.space._user:select{}\n" +"---\n" +"- error: Read access to space '_user' is denied for user 'guest'\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:104 +msgid "However, if you select from ``_vuser`` instead, the users' data available for the 'guest' user is displayed:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/system_views.rst:107 +msgid "tarantool> conn.space._vuser:select{}\n" +"---\n" +"- - [0, 1, 'guest', 'user', {}]\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/truncate.pot b/locale/en/reference/reference_lua/box_space/truncate.pot new file mode 100644 index 0000000000..095becb4e4 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/truncate.pot @@ -0,0 +1,67 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/truncate.rst:5 +msgid "space_object:truncate()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/truncate.rst:11 +msgid "Deletes all tuples. The method is performed in background and doesn't block consequent requests." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/truncate.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/truncate.rst:14 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/truncate.rst:17 +msgid "**Complexity factors:** Index size, Index type, Number of tuples accessed." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/truncate.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/truncate.rst:19 +msgid "nil" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/truncate.rst:21 +msgid "The ``truncate`` method can only be called by the user who created the space, or from within a ``setuid`` function created by the user who created the space. Read more about `setuid` functions in the reference for :doc:`/reference/reference_lua/box_schema/func_create`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/truncate.rst:29 +msgid "Do not call this method within a transaction in Tarantool older than :tarantool-release:`2.10.0`. See :tarantool-issue:`6123` for details." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/truncate.rst:32 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/truncate.rst:34 +msgid "tarantool> box.space.tester:truncate()\n" +"---\n" +"...\n" +"tarantool> box.space.tester:len()\n" +"---\n" +"- 0\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/update.pot b/locale/en/reference/reference_lua/box_space/update.pot new file mode 100644 index 0000000000..46018d5468 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/update.pot @@ -0,0 +1,205 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/update.rst:5 +msgid "space_object:update()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:11 +msgid "Update a tuple." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:13 +msgid "The ``update`` function supports operations on fields — assignment, arithmetic (if the field is numeric), cutting and pasting fragments of a field, deleting or inserting a field. Multiple operations can be combined in a single update request, and in this case they are performed atomically and sequentially. Each operation requires specification of a field identifier, which is usually a number. When multiple operations are present, the field number for each operation is assumed to be relative to the most recent state of the tuple, that is, as if all previous operations in a multi-operation update have already been applied. In other words, it is always safe to merge multiple ``update`` invocations into a single invocation, with no change in semantics." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:25 +msgid "Possible operators are:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:27 +msgid "``+`` for addition. values must be numeric, e.g. unsigned or decimal" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:28 +msgid "``-`` for subtraction. values must be numeric" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:29 +msgid "``&`` for bitwise AND. values must be unsigned numeric" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:30 +msgid "``|`` for bitwise OR. values must be unsigned numeric" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:31 +msgid "``^`` for bitwise :abbr:`XOR(exclusive OR)`. values must be unsigned numeric" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:33 +msgid "``:`` for string splice." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:34 +msgid "``!`` for insertion of a new field." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:35 +msgid "``#`` for deletion." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:36 +msgid "``=`` for assignment." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:38 +msgid "Possible field_identifiers are:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:40 +msgid "Positive field number. The first field is 1, the second field is 2, and so on." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:42 +msgid "Negative field number. The last field is -1, the second-last field is -2, and so on. In other words: (#tuple + negative field number + 1)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:44 +msgid "Name. If the space was formatted with :doc:`/reference/reference_lua/box_space/format`, then this can be a string for the field 'name'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:48 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:50 +msgid "primary-key field values, must be passed as a Lua table if key is multi-part" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:52 +msgid "operation type represented in string" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:53 +msgid "what field the operation will apply to." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:54 +msgid "what value will be applied" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:56 +msgid "the updated tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:57 +msgid "nil if the key is not found" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:58 +msgid "tuple or nil" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:60 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:62 +msgid "It is illegal to modify a primary key field." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:63 +msgid ":errcode:`ER_TRANSACTION_CONFLICT` if a transaction conflict is detected in the :ref:`MVCC transaction mode `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:66 +msgid "**Complexity factors:** Index size, Index type, number of indexes accessed, WAL settings." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:69 +msgid "Thus, in the instruction:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:71 +msgid "s:update(44, {{'+', 1, 55 }, {'=', 3, 'x'}})" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:75 +msgid "the primary-key value is ``44``, the operators are ``'+'`` and ``'='`` meaning *add a value to a field and then assign a value to a field*, the first affected field is field ``1`` and the value which will be added to it is ``55``, the second affected field is field ``3`` and the value which will be assigned to it is ``'x'``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:81 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:83 +msgid "Assume that initially there is a space named ``tester`` with a primary-key index whose type is ``unsigned``. There is one tuple, with ``field[1]`` = ``999`` and ``field[2]`` = ``'A'``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:87 +msgid "In the update: |br| ``box.space.tester:update(999, {{'=', 2, 'B'}})`` |br| The first argument is ``tester``, that is, the affected space is ``tester``. The second argument is ``999``, that is, the affected tuple is identified by primary key value = 999. The third argument is ``=``, that is, there is one operation — *assignment to a field*. The fourth argument is ``2``, that is, the affected field is ``field[2]``. The fifth argument is ``'B'``, that is, ``field[2]`` contents change to ``'B'``. Therefore, after this update, ``field[1]`` = ``999`` and ``field[2]`` = ``'B'``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:98 +msgid "In the update: |br| ``box.space.tester:update({999}, {{'=', 2, 'B'}})`` |br| the arguments are the same, except that the key is passed as a Lua table (inside braces). This is unnecessary when the primary key has only one field, but would be necessary if the primary key had more than one field. Therefore, after this update, ``field[1]`` = ``999`` and ``field[2]`` = ``'B'`` (no change)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:105 +msgid "In the update: |br| ``box.space.tester:update({999}, {{'=', 3, 1}})`` |br| the arguments are the same, except that the fourth argument is ``3``, that is, the affected field is ``field[3]``. It is okay that, until now, ``field[3]`` has not existed. It gets added. Therefore, after this update, ``field[1]`` = ``999``, ``field[2]`` = ``'B'``, ``field[3]`` = ``1``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:112 +msgid "In the update: |br| ``box.space.tester:update({999}, {{'+', 3, 1}})`` |br| the arguments are the same, except that the third argument is ``'+'``, that is, the operation is addition rather than assignment. Since ``field[3]`` previously contained ``1``, this means we're adding ``1`` to ``1``. Therefore, after this update, ``field[1]`` = ``999``, ``field[2]`` = ``'B'``, ``field[3]`` = ``2``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:120 +msgid "In the update: |br| ``box.space.tester:update({999}, {{'|', 3, 1}, {'=', 2, 'C'}})`` |br| the idea is to modify two fields at once. The formats are ``'|'`` and ``=``, that is, there are two operations, OR and assignment. The fourth and fifth arguments mean that ``field[3]`` gets OR'ed with ``1``. The seventh and eighth arguments mean that ``field[2]`` gets assigned ``'C'``. Therefore, after this update, ``field[1]`` = ``999``, ``field[2]`` = ``'C'``, ``field[3]`` = ``3``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:129 +msgid "In the update: |br| ``box.space.tester:update({999}, {{'#', 2, 1}, {'-', 2, 3}})`` |br| The idea is to delete ``field[2]``, then subtract ``3`` from ``field[3]``. But after the delete, there is a renumbering, so ``field[3]`` becomes ``field[2]`` before we subtract ``3`` from it, and that's why the seventh argument is ``2``, not ``3``. Therefore, after this update, ``field[1]`` = ``999``, ``field[2]`` = ``0``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:137 +msgid "In the update: |br| ``box.space.tester:update({999}, {{'=', 2, 'XYZ'}})`` |br| we're making a long string so that splice will work in the next example. Therefore, after this update, ``field[1]`` = ``999``, ``field[2]`` = ``'XYZ'``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:142 +msgid "In the update: |br| ``box.space.tester:update({999}, {{':', 2, 2, 1, '!!'}})`` |br| The third argument is ``':'``, that is, this is the example of splice. The fourth argument is ``2`` because the change will occur in ``field[2]``. The fifth argument is 2 because deletion will begin with the second byte. The sixth argument is 1 because the number of bytes to delete is 1. The seventh argument is ``'!!'``, because ``'!!'`` is to be added at this position. Therefore, after this update, ``field[1]`` = ``999``, ``field[2]`` = ``'X!!Z'``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:151 +msgid "For more usage scenarios and typical errors see :ref:`Example: using data operations ` further in this section." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/update.rst:155 +msgid "Since Tarantool 2.3 a tuple can also be updated via :ref:`JSON paths`." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/upsert.pot b/locale/en/reference/reference_lua/box_space/upsert.pot new file mode 100644 index 0000000000..c20cd19790 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/upsert.pot @@ -0,0 +1,93 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/upsert.rst:5 +msgid "space_object:upsert()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/upsert.rst:11 +msgid "Update or insert a tuple." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/upsert.rst:13 +msgid "If there is an existing tuple which matches the key fields of ``tuple``, then the request has the same effect as :doc:`/reference/reference_lua/box_space/update` and the ``{{operator, field_identifier, value}, ...}`` parameter is used. If there is no existing tuple which matches the key fields of ``tuple``, then the request has the same effect as :doc:`/reference/reference_lua/box_space/insert` and the ``{tuple}`` parameter is used. However, unlike ``insert`` or ``update``, ``upsert`` will not read a tuple and perform error checks before returning -- this is a design feature which enhances throughput but requires more caution on the part of the user." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/upsert.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/upsert.rst:25 +msgid "an :ref:`object reference `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/upsert.rst:27 +msgid "default tuple to be inserted, if analogue isn't found" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/upsert.rst:29 +msgid "operation type represented in string" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/upsert.rst:30 +msgid "what field the operation will apply to" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/upsert.rst:31 +msgid "what value will be applied" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/upsert.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/upsert.rst:33 +msgid "null" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/upsert.rst:35 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/upsert.rst:37 +msgid "It is illegal to modify a primary-key field." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/upsert.rst:38 +msgid "It is illegal to use upsert with a space that has a unique secondary index." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/upsert.rst:40 +msgid ":errcode:`ER_TRANSACTION_CONFLICT` if a transaction conflict is detected in the :ref:`MVCC transaction mode `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/upsert.rst:43 +msgid "**Complexity factors:** Index size, Index type, number of indexes accessed, WAL settings." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/upsert.rst:46 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/upsert.rst:48 +msgid "box.space.tester:upsert({12,'c'}, {{'=', 3, 'a'}, {'=', 4, 'b'}})" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/upsert.rst:52 +msgid "For more usage scenarios and typical errors see :ref:`Example: using data operations ` further in this section." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_space/user_defined.pot b/locale/en/reference/reference_lua/box_space/user_defined.pot new file mode 100644 index 0000000000..a9f6349b35 --- /dev/null +++ b/locale/en/reference/reference_lua/box_space/user_defined.pot @@ -0,0 +1,60 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_space/user_defined.rst:5 +msgid "space_object extensions" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/user_defined.rst:7 +msgid "You can extend ``space_object`` with custom functions as follows:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/user_defined.rst:9 +msgid "Create a Lua function." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/user_defined.rst:10 +msgid "Add the function name to a predefined global variable ``box.schema.space_mt``, which has the ``table`` type. Adding to ``box.schema.space_mt`` makes the function available for all spaces." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/user_defined.rst:11 +msgid "Call the function on the ``space_object``: ``space_object:function-name([parameters])``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/user_defined.rst:13 +msgid "Alternatively, you can make a user-defined function available for only one space by calling ``getmetatable(space_object)`` and then adding the function name to the meta table." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/user_defined.rst:17 +msgid "See also: :doc:`/reference/reference_lua/box_index/user_defined`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/user_defined.rst:19 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_space/user_defined.rst:21 +msgid "-- Visible to any space, no parameters.\n" +"-- After these requests, the value of global_variable will be 6.\n" +"box.schema.space.create('t')\n" +"box.space.t:create_index('i')\n" +"global_variable = 5\n" +"function f(space_arg) global_variable = global_variable + 1 end\n" +"box.schema.space_mt.counter = f\n" +"box.space.t:counter()" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_sql.pot b/locale/en/reference/reference_lua/box_sql.pot new file mode 100644 index 0000000000..5aca1ef2c0 --- /dev/null +++ b/locale/en/reference/reference_lua/box_sql.pot @@ -0,0 +1,77 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_sql.rst:5 +msgid "Functions for SQL" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql.rst:7 +msgid "The ``box`` module contains some functions related to SQL:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql.rst:9 +msgid "``box.schema.func.create`` -- for making Lua functions callable from SQL statements. See :ref:`Calling Lua routines from SQL ` in the :ref:`SQL Plus Lua ` section." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql.rst:13 +msgid "``box.execute`` -- for making SQL statements callable from Lua functions. See the :ref:`SQL user guide `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql.rst:16 +msgid "``box.prepare`` and ``box.unprepare``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql.rst:18 +msgid "Some SQL statements are illustrated in the :ref:`SQL tutorial `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql.rst:20 +msgid "Below is a list of all SQL functions and members." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql.rst:31 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql.rst:32 +msgid "Use" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql.rst:34 +msgid ":doc:`./box_sql/execute`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql.rst:35 +msgid "Make Lua functions callable from SQL statements. See :ref:`Calling Lua routines from SQL ` in the :ref:`SQL Plus Lua ` section" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql.rst:39 +msgid ":doc:`./box_sql/prepare`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql.rst:40 +msgid "Make SQL statements callable from Lua functions. See the :ref:`SQL user guide `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql.rst:43 +msgid ":doc:`./box_sql/prepared_table`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql.rst:44 +msgid "Methods for prepared SQL statement" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_sql/execute.pot b/locale/en/reference/reference_lua/box_sql/execute.pot new file mode 100644 index 0000000000..9343c5c95a --- /dev/null +++ b/locale/en/reference/reference_lua/box_sql/execute.pot @@ -0,0 +1,187 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:5 +msgid "box.execute()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:9 +msgid "Execute the SQL statement contained in the ``sql-statement`` parameter." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:11 +msgid "statement, which should conform to :ref:`the rules for SQL grammar `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:13 +msgid "optional table for placeholders in the statement" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:15 +msgid "depends on statement" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:19 +msgid "There are two ways to pass extra parameters to ``box.execute()``:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:21 +msgid "The first way, which is the preferred way, is to put placeholders in the string, and pass a second argument, an ``extra-parameters`` table. A placeholder is either a question mark \"?\", or a colon \":\" followed by a name. An extra parameter is any Lua expression." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:26 +msgid "If placeholders are question marks, then they are replaced by ``extra-parameters`` values in corresponding positions. That is, the first ``?`` is replaced by the first extra parameter, the second ``?`` is replaced by the second extra parameter, and so on." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:31 +msgid "If placeholders are ``:names``, then they are replaced by ``extra-parameters`` values with corresponding names." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:34 +msgid "For example, this request that contains literal values ``1`` and ``'x'``:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:36 +msgid "box.execute([[INSERT INTO tt VALUES (1, 'x');]]);" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:40 +msgid "... is the same as the request below containing two question-mark placeholders (``?`` and ``?``) and a two-element ``extra-parameters`` table:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:43 +msgid "x = {1,'x'}\n" +"box.execute([[INSERT INTO tt VALUES (?, ?);]], x);" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:48 +msgid "... and is the same as this request containing two ``:name`` placeholders (``:a`` and ``:b``) and a two-element ``extra-parameters`` table with elements named \"a\" and \"b\":" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:52 +msgid "box.execute([[INSERT INTO tt VALUES (:a, :b);]], {{[':a']=1},{[':b']='x'}})" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:57 +msgid "The second way is to concatenate strings. For example, the Lua script below inserts 10 rows with different primary-key values into table ``t``:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:61 +msgid "for i=1,10,1 do\n" +" box.execute(\"insert into t values (\" .. i .. \")\")\n" +"end" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:67 +msgid "When creating SQL statements based on user input, application developers should beware of `SQL injection `_." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:70 +msgid "Since ``box.execute()`` is an invocation of a Lua function, it either causes an error message or returns a value." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:73 +msgid "For some statements the returned value contains a field named ``rowcount``, for example:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:75 +msgid "tarantool> box.execute([[CREATE TABLE table1 (column1 INT PRIMARY key, column2 VARCHAR(10));]])\n" +"---\n" +"- rowcount: 1\n" +"...\n" +"tarantool> box.execute([[INSERT INTO table1 VALUES (55,'Hello SQL world!');]])\n" +"---\n" +"- rowcount: 1\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:86 +msgid "For statements that cause generation of values for PRIMARY KEY AUTOINCREMENT columns, there is a field named ``autoincrement_id``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:91 +msgid "For SELECT or PRAGMA statements, the returned value is a *result set*, containing a field named ``metadata`` (a table with column names and Tarantool/NoSQL type names) and a field named ``rows`` (a table with the contents of each row)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:96 +msgid "For example, for a statement ``SELECT \"x\" FROM t WHERE \"x\"=5;`` where ``\"x\"`` is an INTEGER column and there is one row, a display on the Tarantool client might look like this:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:100 +msgid "tarantool> box.execute([[SELECT \"x\" FROM t WHERE \"x\"=5;]])\n" +"---\n" +"- metadata:\n" +" - name: x\n" +" type: integer\n" +" rows:\n" +" - [5]\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:111 +msgid "For a look at raw format of SELECT results, see :ref:`Binary protocol -- responses for SQL `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:114 +msgid "The order of components within a map is not guaranteed." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:118 +msgid "If ``sql_full_metadata`` in the :ref:`_session_settings ` system table is TRUE, then result set metadata may include these things in addition to ``name`` and ``type``:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:123 +msgid "``collation`` (present only if COLLATE clause is specified for a STRING) = :ref:`\"Collation\" `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:125 +msgid "``is_nullable`` (present only if the :ref:`select list ` specified a base table column and nothing else) = false if column was defined as :ref:`NOT NULL `, otherwise true. If this is not present, that implies that nullability is unknown." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:129 +msgid "``is_autoincrement`` (present only if the select list specified a base table column and nothing else) = true if column was defined as :ref:`PRIMARY KEY AUTOINCREMENT `, otherwise false." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:133 +msgid "``span`` (always present) = the original expression in a select list, which often is the same as ``name`` if the select list specifies a column name and nothing else, but otherwise differs, for example, after ``SELECT x+55 AS x FROM t;`` the ``name`` is X and the ``span`` is x+55. If ``span`` and ``name`` are the same then the content is MP_NIL." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:139 +msgid "Alternative: if you are using the Tarantool server as a client, you can switch languages as follows:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:142 +msgid "\\set language sql\n" +"\\set delimiter ;" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:147 +msgid "Afterwards, you can enter any SQL statement directly without needing ``box.execute()``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/execute.rst:150 +msgid "There is also an ``execute()`` function available in :ref:`module net.box `. For example, you can execute ``conn:execute(sql-statement])`` after ``conn = net_box.connect(url-string)``." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_sql/prepare.pot b/locale/en/reference/reference_lua/box_sql/prepare.pot new file mode 100644 index 0000000000..a05d1a2c05 --- /dev/null +++ b/locale/en/reference/reference_lua/box_sql/prepare.pot @@ -0,0 +1,93 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_sql/prepare.rst:5 +msgid "box.prepare()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepare.rst:9 +msgid "Prepare the SQL statement contained in the sql-statement parameter. The syntax and requirements for ``box.prepare`` are the same as for :doc:`/reference/reference_lua/box_sql/execute`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepare.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepare.rst:13 +msgid "statement, which should conform to :ref:`the rules for SQL grammar `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepare.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepare.rst:16 +msgid "prepared_table, with id and methods and metadata" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepare.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepare.rst:17 +msgid "table" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepare.rst:19 +msgid "``box.prepare`` compiles an SQL statement into byte code and saves the byte code in a cache. Since compiling takes a significant amount of time, preparing a statement will enhance performance if the statement is executed many times." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepare.rst:23 +msgid "If ``box.prepare`` succeeds, prepared_table contains:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepare.rst:25 +msgid "``stmt_id``: integer -- an identifier generated by a hash of the statement string" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepare.rst:26 +msgid "``execute``: function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepare.rst:27 +msgid "``params``: map [name : string, type : string] -- parameter descriptions" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepare.rst:28 +msgid "``unprepare``: function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepare.rst:29 +msgid "``metadata``: map [name : string, type : string] (This is present only for SELECT or PRAGMA statements and has the same contents as the :ref:`result set metadata ` for ``box.execute``)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepare.rst:32 +msgid "``param_count``: integer -- number of parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepare.rst:34 +msgid "This can be used by :ref:`prepared_table:execute() ` and by :ref:`prepared_table:unprepare() `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepare.rst:37 +msgid "The prepared statement cache (which is also called the prepared statement holder) is \"shared\", that is, there is one cache for all sessions. However, session X cannot execute a statement prepared by session Y. |br| For monitoring the cache, see :ref:`box.info().sql `. |br| For changing the cache, see :ref:`(Configuration reference) sql_cache_size `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepare.rst:43 +msgid "Prepared statements will \"expire\" (become invalid) if any database object is dropped or created or altered -- even if the object is not mentioned in the SQL statement, even if the create or drop or alter is rolled back, even if the create or drop or alter is done in a different session." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_sql/prepared_table.pot b/locale/en/reference/reference_lua/box_sql/prepared_table.pot new file mode 100644 index 0000000000..4c1ecaa810 --- /dev/null +++ b/locale/en/reference/reference_lua/box_sql/prepared_table.pot @@ -0,0 +1,74 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_sql/prepared_table.rst:4 +msgid "object prepared_table" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepared_table.rst:12 +msgid "Execute a statement that has been prepared with :doc:`/reference/reference_lua/box_sql/prepare`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepared_table.rst:15 +#: ../../doc/reference/reference_lua/box_sql/prepared_table.rst:58 +msgid "Parameter ``prepared_table`` should be the result from ``box.prepare()``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepared_table.rst:17 +msgid "Parameter ``extra-parameters`` should be an optional table to match :ref:`placeholders or named parameters ` in the statement." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepared_table.rst:21 +msgid "There are two ways to execute: with the method or with the statement id. That is, :samp:`{prepared_table}:execute()` and :samp:`box.execute({prepared_table}.stmt_id)` do the same thing." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepared_table.rst:25 +msgid "Example: here is a test. This function inserts a million rows in a table using a prepared INSERT statement." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepared_table.rst:28 +msgid "function f()\n" +" local p, start_time\n" +" box.execute([[DROP TABLE IF EXISTS t;]])\n" +" box.execute([[CREATE TABLE t (s1 INTEGER PRIMARY KEY);]])\n" +" start_time = os.time()\n" +" p = box.prepare([[INSERT INTO t VALUES (?);]])\n" +" for i=1,1000000 do p:execute({i}) end\n" +" p:unprepare()\n" +" end_time = os.time()\n" +" box.execute([[COMMIT;]])\n" +" print(end_time - start_time) -- elapsed time\n" +"end\n" +"f()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepared_table.rst:44 +msgid "Take note of the elapsed time. Now change the line with the loop to: |br| ``for i=1,1000000 do box.execute([[INSERT INTO t VALUES (?);]], {i}) end`` |br| Run the function again, and take note of the elapsed time again. The function which executes the prepared statement will be about 15% faster, though of course this will vary depending on Tarantool version and environment." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepared_table.rst:55 +msgid "Undo the result of an earlier :doc:`/reference/reference_lua/box_sql/prepare` request. This is equivalent to standard-SQL DEALLOCATE PREPARE." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepared_table.rst:60 +msgid "There are two ways to unprepare: with the method or with the statement id. That is, :samp:`{prepared_table}:unprepare()` and :samp:`box.unprepare({prepared_table}.stmt_id)` do the same thing." +msgstr "" + +#: ../../doc/reference/reference_lua/box_sql/prepared_table.rst:64 +msgid "Tarantool strongly recommends using ``unprepare`` as soon as the immediate objective (executing a prepared statement multiple times) is done, or whenever a prepared statement expires. There is no automatic eviction policy, although automatic ``unprepare`` will happen when the session disconnects (the session's prepared statements will be removed from the prepared-statement cache)." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_stat.pot b/locale/en/reference/reference_lua/box_stat.pot new file mode 100644 index 0000000000..74d35eb6e0 --- /dev/null +++ b/locale/en/reference/reference_lua/box_stat.pot @@ -0,0 +1,69 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_stat.rst:5 +msgid "Submodule box.stat" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat.rst:7 +msgid "The ``box.stat`` submodule provides access to request and network statistics." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat.rst:9 +msgid "Below is a list of all ``box.stat`` functions." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat.rst:20 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat.rst:21 +msgid "Use" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat.rst:23 +msgid ":doc:`./box_stat/stat`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat.rst:24 +msgid "Show request statistics" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat.rst:26 +msgid ":doc:`./box_stat/net`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat.rst:27 +msgid "Show network activity" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat.rst:29 +msgid ":doc:`./box_stat/vinyl`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat.rst:30 +msgid "Show vinyl-storage-engine activity" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat.rst:32 +msgid ":doc:`./box_stat/reset`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat.rst:33 +msgid "Reset the statistics" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_stat/net.pot b/locale/en/reference/reference_lua/box_stat/net.pot new file mode 100644 index 0000000000..a2396144ae --- /dev/null +++ b/locale/en/reference/reference_lua/box_stat/net.pot @@ -0,0 +1,239 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:4 +msgid "box.stat.net()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:10 +msgid "Shows network activity: the number of bytes sent and received, the number of connections, streams, and requests (current, average, and total)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:0 +#: ../../doc/reference/reference_lua/box_stat/net.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:14 +msgid "in the tables that ``box.stat.net()`` returns:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:16 +msgid "``SENT.rps`` and ``RECEIVED.rps`` -- average number of bytes sent/received per second in the last 5 seconds" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:18 +msgid "``SENT.total`` and ``RECEIVED.total`` -- total number of bytes sent/received since the server started" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:20 +msgid "``CONNECTIONS.current`` -- number of open connections" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:21 +msgid "``CONNECTIONS.rps`` -- average number of connections opened per second in the last 5 seconds" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:22 +msgid "``CONNECTIONS.total`` -- total number of connections opened since the server started" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:23 +msgid "``REQUESTS.current`` -- number of requests in progress, which can be limited by :ref:`box.cfg.net_msg_max `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:25 +msgid "``REQUESTS.rps`` -- average number of requests processed per second in the last 5 seconds" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:26 +msgid "``REQUESTS.total`` -- total number of requests processed since the server started" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:27 +msgid "``REQUESTS_IN_PROGRESS.current`` -- number of requests being currently processed by the :ref:`TX thread `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:28 +msgid "``REQUESTS_IN_PROGRESS.rps`` -- average number of requests processed by the TX thread per second in the last 5 seconds" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:29 +msgid "``REQUESTS_IN_PROGRESS.total`` -- total number of requests processed by the TX thread since the server started" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:30 +msgid "``STREAMS.current`` -- number of active :ref:`streams `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:31 +msgid "``STREAMS.rps`` -- average number of streams opened per second in the last 5 seconds" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:32 +msgid "``STREAMS.total`` -- total number of streams opened since the server started" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:33 +msgid "``REQUESTS_IN_STREAM_QUEUE.current`` -- number of requests waiting in stream queues" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:34 +msgid "``REQUESTS_IN_STREAM_QUEUE.rps`` -- average number of requests in stream queues per second in the last 5 seconds" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:35 +msgid "``REQUESTS_IN_STREAM_QUEUE.total`` -- total number of requests placed in stream queues since the server started" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:38 +#: ../../doc/reference/reference_lua/box_stat/net.rst:87 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:40 +msgid "tarantool> box.stat.net() -- 5 tables\n" +"---\n" +"- CONNECTIONS:\n" +" current: 1\n" +" rps: 0\n" +" total: 1\n" +" REQUESTS:\n" +" current: 0\n" +" rps: 0\n" +" total: 8\n" +" REQUESTS_IN_PROGRESS:\n" +" current: 0\n" +" rps: 0\n" +" total: 7\n" +" SENT:\n" +" total: 19579\n" +" rps: 0\n" +" REQUESTS_IN_STREAM_QUEUE:\n" +" current: 0\n" +" rps: 0\n" +" total: 0\n" +" STREAMS:\n" +" current: 0\n" +" rps: 0\n" +" total: 0\n" +" RECEIVED:\n" +" total: 197\n" +" rps\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:77 +msgid "Shows network activity per :ref:`network thread `: the number of bytes sent and received, the number of connections, streams, and requests (current, average, and total)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:81 +msgid "When called with an index (``box.stat.net.thread[1]``), shows network statistics for a single network thread." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:84 +msgid "Same network activity metrics as :ref:`box.stat.net() ` for each network thread" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:89 +msgid "tarantool> box.stat.net.thread() -- iproto_threads = 2\n" +"- - CONNECTIONS:\n" +" current: 0\n" +" rps: 0\n" +" total: 0\n" +" REQUESTS:\n" +" current: 0\n" +" rps: 0\n" +" total: 0\n" +" REQUESTS_IN_PROGRESS:\n" +" current: 0\n" +" rps: 0\n" +" total: 0\n" +" SENT:\n" +" total: 0\n" +" rps: 0\n" +" REQUESTS_IN_STREAM_QUEUE:\n" +" current: 0\n" +" rps: 0\n" +" total: 0\n" +" STREAMS:\n" +" current: 0\n" +" rps: 0\n" +" total: 0\n" +" RECEIVED:\n" +" total: 0\n" +" rps: 0\n" +" - CONNECTIONS:\n" +" current: 1\n" +" rps: 0\n" +" total: 1\n" +" REQUESTS:\n" +" current: 0\n" +" rps: 0\n" +" total: 8\n" +" REQUESTS_IN_PROGRESS:\n" +" current: 0\n" +" rps: 0\n" +" total: 7\n" +" SENT:\n" +" total: 19579\n" +" rps: 0\n" +" REQUESTS_IN_STREAM_QUEUE:\n" +" current: 0\n" +" rps: 0\n" +" total: 0\n" +" STREAMS:\n" +" current: 0\n" +" rps: 0\n" +" total: 0\n" +" RECEIVED:\n" +" total: 197\n" +" rps: 0\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/net.rst:146 +msgid "tarantool> box.stat.net.thread[1] -- first network thread\n" +"- - CONNECTIONS:\n" +" current: 1\n" +" rps: 0\n" +" total: 1\n" +" REQUESTS:\n" +" current: 0\n" +" rps: 0\n" +" total: 8\n" +" REQUESTS_IN_PROGRESS:\n" +" current: 0\n" +" rps: 0\n" +" total: 7\n" +" SENT:\n" +" total: 19579\n" +" rps: 0\n" +" REQUESTS_IN_STREAM_QUEUE:\n" +" current: 0\n" +" rps: 0\n" +" total: 0\n" +" STREAMS:\n" +" current: 0\n" +" rps: 0\n" +" total: 0\n" +" RECEIVED:\n" +" total: 197\n" +" rps: 0\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_stat/reset.pot b/locale/en/reference/reference_lua/box_stat/reset.pot new file mode 100644 index 0000000000..bcf1db66d1 --- /dev/null +++ b/locale/en/reference/reference_lua/box_stat/reset.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_stat/reset.rst:4 +msgid "box.stat.reset()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/reset.rst:10 +msgid "Resets the statistics of ``box.stat()``, ``box.stat.net()``, ``box.stat.vinyl()``, and :ref:`box.space.index `." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_stat/stat.pot b/locale/en/reference/reference_lua/box_stat/stat.pot new file mode 100644 index 0000000000..7d2f78e80d --- /dev/null +++ b/locale/en/reference/reference_lua/box_stat/stat.pot @@ -0,0 +1,106 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_stat/stat.rst:2 +msgid "box.stat()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/stat.rst:8 +msgid "Shows the total number of requests since startup and the average number of requests per second, broken down by request type." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/stat.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/stat.rst:12 +msgid "in the tables that ``box.stat()`` returns:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/stat.rst:14 +msgid "``total``: total number of requests processed per second since the server started" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/stat.rst:15 +msgid "``rps``: average number of requests per second in the last 5 seconds." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/stat.rst:17 +msgid "``ERROR`` is the count of requests that resulted in an error." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/stat.rst:19 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/stat.rst:21 +msgid "tarantool> box.stat() -- return 15 tables\n" +"---\n" +"- DELETE:\n" +" total: 0\n" +" rps: 0\n" +" COMMIT:\n" +" total: 0\n" +" rps: 0\n" +" SELECT:\n" +" total: 12\n" +" rps: 0\n" +" ROLLBACK:\n" +" total: 0\n" +" rps: 0\n" +" INSERT:\n" +" total: 6\n" +" rps: 0\n" +" EVAL:\n" +" total: 0\n" +" rps: 0\n" +" ERROR:\n" +" total: 0\n" +" rps: 0\n" +" CALL:\n" +" total: 0\n" +" rps: 0\n" +" BEGIN:\n" +" total: 0\n" +" rps: 0\n" +" PREPARE:\n" +" total: 0\n" +" rps: 0\n" +" REPLACE:\n" +" total: 0\n" +" rps: 0\n" +" UPSERT:\n" +" total: 0\n" +" rps: 0\n" +" AUTH:\n" +" total: 0\n" +" rps: 0\n" +" EXECUTE:\n" +" total: 0\n" +" rps: 0\n" +" UPDATE:\n" +" total: 2\n" +" rps: 0\n" +"...\n" +"\n" +"tarantool> box.stat().DELETE -- total + requests per second from one table\n" +"---\n" +"- total: 0\n" +" rps: 0\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_stat/vinyl.pot b/locale/en/reference/reference_lua/box_stat/vinyl.pot new file mode 100644 index 0000000000..705f0b3455 --- /dev/null +++ b/locale/en/reference/reference_lua/box_stat/vinyl.pot @@ -0,0 +1,176 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:4 +msgid "box.stat.vinyl()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:10 +msgid "Shows vinyl-storage-engine activity, for example ``box.stat.vinyl().tx`` has the number of commits and rollbacks." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:13 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:15 +msgid "tarantool> box.stat.vinyl().tx.commit -- one item of the vinyl table\n" +"---\n" +"- 1047632\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:25 +msgid "box.stat.vinyl().regulator" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:26 +msgid "The vinyl regulator decides when to take or delay actions for disk IO, grouping activity in batches so that it is consistent and efficient. The regulator is invoked by the vinyl scheduler, once per second, and updates related variables whenever it is invoked." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:32 +msgid "``box.stat.vinyl().regulator.dump_bandwidth`` is the estimated average rate at which dumps are done. Initially this will appear as 10485760 (10 megabytes per second). Only significant dumps (larger than one megabyte) are used for estimating." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:37 +msgid "``box.stat.vinyl().regulator.dump_watermark`` is the point when dumping must occur. The value is slightly smaller than the amount of memory that is allocated for vinyl trees, which is the :ref:`vinyl_memory ` parameter." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:43 +msgid "``box.stat.vinyl().regulator.write_rate`` is the actual average rate at which recent writes to disk are done. Averaging is done over a 5-second time window, so if there has been no activity for 5 seconds then ``regulator.write_rate = 0``. The ``write_rate`` may be slowed when a dump is in progress or when the user has set :ref:`snap_io_rate_limit `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:51 +msgid "``box.stat.vinyl().regulator.rate_limit`` is the write rate limit, in bytes per second, imposed on transactions by the regulator based on the observed dump/compaction performance." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:55 +msgid "``box.stat.vinyl().regulator.blocked_writers`` is the number of fibers currently blocked waiting for vinyl :ref:`L0 memory ` quota." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:63 +msgid "box.stat.vinyl().disk" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:64 +msgid "Since vinyl is an on-disk storage engine (unlike memtx which is an in-memory storage engine), it can handle large databases -- but if a database is larger than the amount of memory that is allocated for vinyl, then there will be more disk activity." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:70 +msgid "``box.stat.vinyl().disk.data`` and ``box.stat.vinyl().disk.index`` are the amount of data that has gone into files in a subdirectory of :ref:`vinyl_dir `, with names like ``{lsn}.run`` and ``{lsn}.index``. The size of the run will be related to the output of ``scheduler.dump_*``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:77 +msgid "``box.stat.vinyl().disk.data_compacted`` Sum size of data stored at the last LSM tree level, in bytes, without taking disk compression into account. It can be thought of as the size of disk space that the user data would occupy if there were no compression, indexing, or space increase caused by the LSM tree design." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:86 +msgid "box.stat.vinyl().memory" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:87 +msgid "Although the vinyl storage engine is not \"in-memory\", Tarantool does need to have memory for write buffers and for caches:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:90 +msgid "``box.stat.vinyl().memory.tuple_cache`` is the number of bytes that are being used for tuples (data)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:92 +msgid "``box.stat.vinyl().memory.tx`` is transactional memory. This will usually be 0." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:94 +msgid "``box.stat.vinyl().memory.level0`` is the \"level0\" memory area, sometimes abbreviated \"L0\", which is the area that vinyl can use for in-memory storage of an LSM tree." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:98 +msgid "Therefore we can say that \"L0 is becoming full\" when the amount in ``memory.level0`` is close to the maximum, which is :ref:`regulator.dump_watermark `. We can expect that \"L0 = 0\" immediately after a dump. ``box.stat.vinyl().memory.page_index`` and ``box.stat.vinyl().memory.bloom_filter`` have the current amount being used for index-related structures. The size is a function of the number and size of keys, plus :ref:`vinyl_page_size `, plus :ref:`vinyl_bloom_fpr `. This is not a count of bloom filter \"hits\" (the number of reads that could be avoided because the bloom filter predicts their presence in a run file) -- that statistic can be found with :doc:`/reference/reference_lua/box_index/stat`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:116 +msgid "box.stat.vinyl().tx" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:117 +msgid "This is about requests that affect transactional activity (\"tx\" is used here as an abbreviation for \"transaction\"):" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:120 +msgid "``box.stat.vinyl().tx.conflict`` counts conflicts that caused a transaction to roll back." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:122 +msgid "``box.stat.vinyl().tx.commit`` is the count of commits (successful transaction ends). It includes implicit commits, for example any insert causes a commit unless it is within a begin-end block." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:126 +msgid "``box.stat.vinyl().tx.rollback`` is the count of rollbacks (unsuccessful transaction ends). This is not merely a count of explicit :doc:`/reference/reference_lua/box_txn_management/rollback` requests -- it includes requests that ended in errors. For example, after an attempted insert request that causes a \"Duplicate key exists in unique index\" error, ``tx.rollback`` is incremented." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:134 +msgid "``box.stat.vinyl().tx.statements`` will usually be 0." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:136 +msgid "``box.stat.vinyl().tx.transactions`` is the number of transactions that are currently running." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:138 +msgid "``box.stat.vinyl().tx.gap_locks`` is the number of gap locks that are outstanding during execution of a request. For a low-level description of Tarantool's implementation of gap locking, see `Gap locks in Vinyl transaction manager `_." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:142 +msgid "``box.stat.vinyl().tx.read_views`` shows whether a transaction has entered a read-only state to avoid conflict temporarily. This will usually be 0." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:147 +msgid "box.stat.vinyl().scheduler" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:148 +msgid "This primarily has counters related to tasks that the scheduler has arranged for dumping or compaction: (most of these items are reset to 0 when the server restarts or when :ref:`box.stat.reset() ` occurs):" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:153 +msgid "``box.stat.vinyl().scheduler.compaction_*`` is the amount of data from recent changes that has been :doc:`compacted `. This is divided into ``scheduler.compaction_input`` (the amount that is being compacted), ``scheduler.compaction_queue`` (the amount that is waiting to be compacted), ``scheduler.compaction_time`` (total time spent by all worker threads performing compaction, in seconds), and ``scheduler.compaction_output`` (the amount that has been compacted, which is presumably smaller than ``scheduler.compaction_input``)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:163 +msgid "``box.stat.vinyl().scheduler.tasks_*`` is about dump/compaction tasks, in three categories, ``scheduler.tasks_inprogress`` (currently running), ``scheduler.tasks_completed`` (successfully completed) ``scheduler.tasks_failed`` (aborted due to errors)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:169 +msgid "``box.stat.vinyl().scheduler.dump_*`` has the amount of data from recent changes that has been dumped, including ``dump_time`` (total time spent by all worker threads performing dumps, in seconds), and ``dump_count`` (the count of completed dumps), ``dump_input`` and ``dump_output``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:175 +msgid "A \"dump\" is explained in section :ref:`Storing data with vinyl `:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:177 +msgid "Sooner or later the number of elements in an LSM tree exceeds the L0 size and that is when L0 gets written to a file on disk (called a 'run') and then cleared for storing new elements. This operation is called a 'dump'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:181 +msgid "Thus it can be predicted that a dump will occur if the size of L0 (which is :ref:`memory.level0 `) is approaching the maximum (which is :ref:`regulator.dump_watermark `) and a dump is not already in progress. In fact Tarantool will try to arrange a dump before this hard limit is reached." +msgstr "" + +#: ../../doc/reference/reference_lua/box_stat/vinyl.rst:191 +msgid "A dump will also occur during a :doc:`snapshot ` operation." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_tuple.pot b/locale/en/reference/reference_lua/box_tuple.pot new file mode 100644 index 0000000000..925eb7749c --- /dev/null +++ b/locale/en/reference/reference_lua/box_tuple.pot @@ -0,0 +1,213 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_tuple.rst:5 +msgid "Submodule box.tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:7 +msgid "The ``box.tuple`` submodule provides read-only access for the ``tuple`` userdata type. It allows, for a single :ref:`tuple `: selective retrieval of the field contents, retrieval of information about size, iteration over all the fields, and conversion to a `Lua table `_." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:12 +msgid "Below is a list of all ``box.tuple`` functions." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:23 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:24 +msgid "Use" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:26 +msgid ":doc:`./box_tuple/new`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:27 +msgid "Create a tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:29 +msgid ":doc:`./box_tuple/is`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:30 +msgid "Check whether a given object is a tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:32 +msgid ":doc:`./box_tuple/count_fields`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:33 +msgid "Count tuple fields" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:35 +msgid ":doc:`./box_tuple/bsize`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:36 +msgid "Get count of bytes in a tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:38 +msgid ":doc:`./box_tuple/field_number`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:39 +msgid "Get a tuple's field by specifying a number" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:41 +msgid ":doc:`./box_tuple/field_name`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:42 +msgid "Get a tuple's field by specifying a name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:44 +msgid ":doc:`./box_tuple/field_path`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:45 +msgid "Get a tuple's fields or parts by specifying a path" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:47 +msgid ":doc:`./box_tuple/find`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:48 +msgid "Get the number of the first field/all fields matching the search value" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:50 +msgid ":doc:`./box_tuple/next`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:51 +msgid "Get the next field value from tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:53 +msgid ":doc:`./box_tuple/pairs`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:54 +msgid "Prepare for iterating" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:56 +msgid ":doc:`./box_tuple/totable`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:57 +msgid "Get a tuple's fields as a table" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:59 +msgid ":doc:`./box_tuple/tomap`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:60 +msgid "Get a tuple's fields as a table along with key:value pairs" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:62 +msgid ":doc:`./box_tuple/transform`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:63 +msgid "Remove (and replace) a tuple's fields" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:65 +msgid ":doc:`./box_tuple/unpack`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:66 +msgid "Get a tuple's fields" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:68 +msgid ":doc:`./box_tuple/update`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:69 +msgid "Update a tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:71 +msgid ":doc:`./box_tuple/upsert`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:72 +msgid "Update a tuple ignoring errors" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:96 +msgid "How to convert tuples to/from Lua tables" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:98 +msgid "This function will illustrate how to convert tuples to/from Lua tables and lists of scalars:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:101 +msgid "tuple = box.tuple.new({scalar1, scalar2, ... scalar_n}) -- scalars to tuple\n" +"lua_table = {tuple:unpack()} -- tuple to Lua table\n" +"lua_table = tuple:totable() -- tuple to Lua table\n" +"scalar1, scalar2, ... scalar_n = tuple:unpack() -- tuple to scalars\n" +"tuple = box.tuple.new(lua_table) -- Lua table to tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:109 +msgid "Then it will find the field that contains 'b', remove that field from the tuple, and display how many bytes remain in the tuple. The function uses Tarantool ``box.tuple`` functions ``new()``, ``unpack()``, ``find()``, ``transform()``, ``bsize()``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:114 +msgid "function example()\n" +" local tuple1, tuple2, lua_table_1, scalar1, scalar2, scalar3, field_number\n" +" local luatable1 = {}\n" +" tuple1 = box.tuple.new({'a', 'b', 'c'})\n" +" luatable1 = tuple1:totable()\n" +" scalar1, scalar2, scalar3 = tuple1:unpack()\n" +" tuple2 = box.tuple.new(luatable1[1],luatable1[2],luatable1[3])\n" +" field_number = tuple2:find('b')\n" +" tuple2 = tuple2:transform(field_number, 1)\n" +" return 'tuple2 = ' , tuple2 , ' # of bytes = ' , tuple2:bsize()\n" +"end" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:128 +msgid "... And here is what happens when one invokes the function:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple.rst:130 +msgid "tarantool> example()\n" +"---\n" +"- tuple2 =\n" +"- ['a', 'c']\n" +"- ' # of bytes = '\n" +"- 5\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_tuple/bsize.pot b/locale/en/reference/reference_lua/box_tuple/bsize.pot new file mode 100644 index 0000000000..6f752ccc16 --- /dev/null +++ b/locale/en/reference/reference_lua/box_tuple/bsize.pot @@ -0,0 +1,59 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_tuple/bsize.rst:6 +msgid "box.tuple.bsize()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/bsize.rst:12 +msgid "If ``t`` is a tuple instance, ``t:bsize()`` will return the number of bytes in the tuple. With both the memtx storage engine and the vinyl storage engine the default maximum is one megabyte (:ref:`memtx_max_tuple_size ` or :ref:`vinyl_max_tuple_size `). Every field has one or more \"length\" bytes preceding the actual contents, so ``bsize()`` returns a value which is slightly greater than the sum of the lengths of the contents." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/bsize.rst:21 +msgid "The value does not include the size of \"struct tuple\" (for the current size of this structure look in the `tuple.h `_ file in Tarantool's source code)." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/bsize.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/bsize.rst:26 +msgid "number of bytes" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/bsize.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/bsize.rst:27 +msgid "number" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/bsize.rst:29 +msgid "In the following example, a tuple named ``t`` is created which has three fields, and for each field it takes one byte to store the length and three bytes to store the contents, and then there is one more byte to store a count of the number of fields, so ``bsize()`` returns ``3*(1+3)+1``. This is the same as the size of the string that :ref:`msgpack.encode({'aaa','bbb','ccc'}) ` would return." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/bsize.rst:37 +msgid "tarantool> t = box.tuple.new{'aaa', 'bbb', 'ccc'}\n" +"---\n" +"...\n" +"tarantool> t:bsize()\n" +"---\n" +"- 13\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_tuple/count_fields.pot b/locale/en/reference/reference_lua/box_tuple/count_fields.pot new file mode 100644 index 0000000000..8085127443 --- /dev/null +++ b/locale/en/reference/reference_lua/box_tuple/count_fields.pot @@ -0,0 +1,47 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_tuple/count_fields.rst:6 +msgid "#tuple_object" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/count_fields.rst:12 +msgid "The ``#`` operator in Lua means \"return count of components\". So, if ``t`` is a tuple instance, ``#t`` will return the number of fields." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/count_fields.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/count_fields.rst:15 +msgid "number" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/count_fields.rst:17 +msgid "In the following example, a tuple named ``t`` is created and then the number of fields in ``t`` is returned." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/count_fields.rst:20 +msgid "tarantool> t = box.tuple.new{'Fld#1', 'Fld#2', 'Fld#3', 'Fld#4'}\n" +"---\n" +"...\n" +"tarantool> #t\n" +"---\n" +"- 4\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_tuple/field_name.pot b/locale/en/reference/reference_lua/box_tuple/field_name.pot new file mode 100644 index 0000000000..d2ba07e75c --- /dev/null +++ b/locale/en/reference/reference_lua/box_tuple/field_name.pot @@ -0,0 +1,74 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_tuple/field_name.rst:6 +msgid "tuple_object[field-name]" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_name.rst:12 +msgid "If ``t`` is a tuple instance, ``t['field-name']`` will return the field named 'field-name' in the tuple. Fields have names if the tuple has been retrieved from a space that has an associated :ref:`format `. :samp:`t[{lua-variable-name}]` will do the same thing if ``lua-variable-name`` contains ``'field-name'``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_name.rst:18 +msgid "There is a variation which the `Lua manual `_ calls \"syntactic sugar\": use ``t.field-name`` as an equivalent of ``t['field-name']``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_name.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_name.rst:23 +msgid "field value." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_name.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_name.rst:24 +msgid "lua-value" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_name.rst:26 +msgid "In the following example, a tuple named ``t`` is returned from ``replace`` and then the second field in ``t`` named 'field2' is returned." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_name.rst:29 +msgid "tarantool> format = {}\n" +"---\n" +"...\n" +"tarantool> format[1] = {name = 'field1', type = 'unsigned'}\n" +"---\n" +"...\n" +"tarantool> format[2] = {name = 'field2', type = 'string'}\n" +"---\n" +"...\n" +"tarantool> s = box.schema.space.create('test', {format = format})\n" +"---\n" +"...\n" +"tarantool> pk = s:create_index('pk')\n" +"---\n" +"...\n" +"tarantool> t = s:replace{1, 'Я'}\n" +"---\n" +"...\n" +"tarantool> t['field2']\n" +"---\n" +"- Я\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_tuple/field_number.pot b/locale/en/reference/reference_lua/box_tuple/field_number.pot new file mode 100644 index 0000000000..51ea39a0b0 --- /dev/null +++ b/locale/en/reference/reference_lua/box_tuple/field_number.pot @@ -0,0 +1,55 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_tuple/field_number.rst:6 +msgid "tuple_object[field-number]" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_number.rst:12 +msgid "If ``t`` is a tuple instance, ``t[field-number]`` will return the field numbered field-number in the tuple. The first field is ``t[1]``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_number.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_number.rst:15 +msgid "field value." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_number.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_number.rst:16 +msgid "lua-value" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_number.rst:18 +msgid "In the following example, a tuple named ``t`` is created and then the second field in ``t`` is returned." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_number.rst:21 +msgid "tarantool> t = box.tuple.new{'Fld#1', 'Fld#2', 'Fld#3', 'Fld#4'}\n" +"---\n" +"...\n" +"tarantool> t[2]\n" +"---\n" +"- Fld#2\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_tuple/field_path.pot b/locale/en/reference/reference_lua/box_tuple/field_path.pot new file mode 100644 index 0000000000..627f56d33a --- /dev/null +++ b/locale/en/reference/reference_lua/box_tuple/field_path.pot @@ -0,0 +1,69 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_tuple/field_path.rst:6 +msgid "tuple_object[field-path]" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_path.rst:12 +msgid "If ``t`` is a tuple instance, ``t['path']`` will return the field or subset of fields that are in ``path``. ``path`` must be a well formed JSON specification. ``path`` may contain field names if the tuple has been retrieved from a space that has an associated :ref:`format `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_path.rst:17 +msgid "To prevent ambiguity, Tarantool first tries to interpret the request as :doc:`/reference/reference_lua/box_tuple/field_number` or :doc:`/reference/reference_lua/box_tuple/field_name`. If and only if that fails, Tarantool tries to interpret the request as ``tuple_object[field-path]``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_path.rst:23 +msgid "The path must be a well formed JSON specification, but it may be preceded by '.'. The '.' is a signal that the path acts as a suffix for the tuple." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_path.rst:27 +msgid "The advantage of specifying a path is that Tarantool will use it to search through a tuple body and get only the tuple part, or parts, that are actually necessary." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_path.rst:31 +msgid "In the following example, a tuple named ``t`` is returned from ``replace`` and then only the relevant part (in this case, matching a name) of a relevant field is returned. Namely: the second field, its third item, the value following 'key='." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/field_path.rst:36 +msgid "tarantool> format = {}\n" +"---\n" +"...\n" +"tarantool> format[1] = {name = 'field1', type = 'unsigned'}\n" +"---\n" +"...\n" +"tarantool> format[2] = {name = 'field2', type = 'array'}\n" +"---\n" +"...\n" +"tarantool> s = box.schema.space.create('test', {format = format})\n" +"---\n" +"...\n" +"tarantool> pk = s:create_index('pk')\n" +"---\n" +"...\n" +"tarantool> field2_value = {1, \"ABC\", {key=\"Hello\", value=\"world\"}}\n" +"---\n" +"...\n" +"tarantool> t = s:replace{1, field2_value}\n" +"---\n" +"...\n" +"tarantool> t[\"[2][3]['key']\"]\n" +"---\n" +"- Hello\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_tuple/find.pot b/locale/en/reference/reference_lua/box_tuple/find.pot new file mode 100644 index 0000000000..0a65547a01 --- /dev/null +++ b/locale/en/reference/reference_lua/box_tuple/find.pot @@ -0,0 +1,64 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_tuple/find.rst:6 +msgid "tuple_object:find(), tuple_object:findall()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/find.rst:13 +msgid "If ``t`` is a tuple instance, ``t:find(search-value)`` will return the number of the first field in ``t`` that matches the search value, and ``t:findall(search-value [, search-value ...])`` will return numbers of all fields in ``t`` that match the search value. Optionally one can put a numeric argument ``field-number`` before the search-value to indicate “start searching at field number ``field-number``.”" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/find.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/find.rst:20 +msgid "the number of the field in the tuple." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/find.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/find.rst:21 +msgid "number" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/find.rst:23 +msgid "In the following example, a tuple named ``t`` is created and then: the number of the first field in ``t`` which matches 'a' is returned, then the numbers of all the fields in ``t`` which match 'a' are returned, then the numbers of all the fields in t which match 'a' and are at or after the second field are returned." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/find.rst:29 +msgid "tarantool> t = box.tuple.new{'a', 'b', 'c', 'a'}\n" +"---\n" +"...\n" +"tarantool> t:find('a')\n" +"---\n" +"- 1\n" +"...\n" +"tarantool> t:findall('a')\n" +"---\n" +"- 1\n" +"- 4\n" +"...\n" +"tarantool> t:findall(2, 'a')\n" +"---\n" +"- 4\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_tuple/is.pot b/locale/en/reference/reference_lua/box_tuple/is.pot new file mode 100644 index 0000000000..ecc52b65ac --- /dev/null +++ b/locale/en/reference/reference_lua/box_tuple/is.pot @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_tuple/is.rst:6 +msgid "box.tuple.is()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/is.rst:12 +msgid "Since versions :doc:`2.2.3 `, :doc:`2.3.2 `, and :doc:`2.4.1 `. A function to check whether a given object is a tuple cdata object. Never raises nor returns an error." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/is.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/is.rst:17 +msgid "true or false" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/is.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/is.rst:18 +msgid "boolean" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_tuple/new.pot b/locale/en/reference/reference_lua/box_tuple/new.pot new file mode 100644 index 0000000000..dcbb3b7982 --- /dev/null +++ b/locale/en/reference/reference_lua/box_tuple/new.pot @@ -0,0 +1,74 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_tuple/new.rst:5 +msgid "box.tuple.new()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/new.rst:11 +msgid "Construct a new tuple from either a scalar or a Lua table. Alternatively, one can get new tuples from Tarantool's :ref:`select ` or :ref:`insert ` or :ref:`replace ` or :ref:`update ` requests, which can be regarded as statements that do ``new()`` implicitly." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/new.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/new.rst:18 +msgid "the value that will become the tuple contents." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/new.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/new.rst:20 +msgid "a new tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/new.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/new.rst:21 +msgid "tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/new.rst:23 +msgid "In the following example, ``x`` will be a new table object containing one tuple and ``t`` will be a new tuple object. Saying ``t`` returns the entire tuple ``t``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/new.rst:27 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/new.rst:29 +msgid "tarantool> x = box.space.tester:insert{\n" +" > 33,\n" +" > tonumber('1'),\n" +" > tonumber64('2')\n" +" > }:totable()\n" +"---\n" +"...\n" +"tarantool> t = box.tuple.new{'abc', 'def', 'ghi', 'abc'}\n" +"---\n" +"...\n" +"tarantool> t\n" +"---\n" +"- ['abc', 'def', 'ghi', 'abc']\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_tuple/next.pot b/locale/en/reference/reference_lua/box_tuple/next.pot new file mode 100644 index 0000000000..02c9fc8e84 --- /dev/null +++ b/locale/en/reference/reference_lua/box_tuple/next.pot @@ -0,0 +1,79 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_tuple/next.rst:6 +msgid "tuple_object:next()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/next.rst:12 +msgid "An analogue of the Lua ``next()`` function, but for a tuple object. When called without arguments, ``tuple:next()`` returns the first field from a tuple. Otherwise, it returns the field next to the indicated position." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/next.rst:16 +msgid "However ``tuple:next()`` is not really efficient, and it is better to use :doc:`tuple:pairs()/ipairs() `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/next.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/next.rst:20 +msgid "field number and field value" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/next.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/next.rst:21 +msgid "number and field type" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/next.rst:23 +msgid "tarantool> tuple = box.tuple.new({5, 4, 3, 2, 0})\n" +"---\n" +"...\n" +"\n" +"tarantool> tuple:next()\n" +"---\n" +"- 1\n" +"- 5\n" +"...\n" +"\n" +"tarantool> tuple:next(1)\n" +"---\n" +"- 2\n" +"- 4\n" +"...\n" +"\n" +"tarantool> ctx, field = tuple:next()\n" +"---\n" +"...\n" +"\n" +"tarantool> while field do\n" +" > print(field)\n" +" > ctx, field = tuple:next(ctx)\n" +" > end\n" +"5\n" +"4\n" +"3\n" +"2\n" +"0\n" +"---\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_tuple/pairs.pot b/locale/en/reference/reference_lua/box_tuple/pairs.pot new file mode 100644 index 0000000000..eb33ddaa4e --- /dev/null +++ b/locale/en/reference/reference_lua/box_tuple/pairs.pot @@ -0,0 +1,67 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_tuple/pairs.rst:6 +msgid "tuple_object:pairs(), tuple_object:ipairs()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/pairs.rst:13 +msgid "In Lua, `lua-table-value:pairs() `_ is a method which returns: ``function``, ``lua-table-value``, ``nil``. Tarantool has extended this so that ``tuple-value:pairs()`` returns: ``function``, ``tuple-value``, ``nil``. It is useful for Lua iterators, because Lua iterators traverse a value's components until an end marker is reached." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/pairs.rst:20 +msgid "``tuple_object:ipairs()`` is the same as ``pairs()``, because tuple fields are always integers." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/pairs.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/pairs.rst:23 +msgid "function, tuple-value, nil" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/pairs.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/pairs.rst:24 +msgid "function, lua-value, nil" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/pairs.rst:26 +msgid "In the following example, a tuple named ``t`` is created and then all its fields are selected using a Lua for-end loop." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/pairs.rst:29 +msgid "tarantool> t = box.tuple.new{'Fld#1', 'Fld#2', 'Fld#3', 'Fld#4', 'Fld#5'}\n" +"---\n" +"...\n" +"tarantool> tmp = ''\n" +"---\n" +"...\n" +"tarantool> for k, v in t:pairs() do\n" +" > tmp = tmp .. v\n" +" > end\n" +"---\n" +"...\n" +"tarantool> tmp\n" +"---\n" +"- Fld#1Fld#2Fld#3Fld#4Fld#5\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_tuple/tomap.pot b/locale/en/reference/reference_lua/box_tuple/tomap.pot new file mode 100644 index 0000000000..8fb0df3fbf --- /dev/null +++ b/locale/en/reference/reference_lua/box_tuple/tomap.pot @@ -0,0 +1,98 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_tuple/tomap.rst:6 +msgid "tuple_object:tomap()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/tomap.rst:12 +msgid "A `Lua table `_ can have indexed values, also called key:value pairs. For example, here:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/tomap.rst:16 +msgid "a = {}; a['field1'] = 10; a['field2'] = 20" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/tomap.rst:20 +msgid "``a`` is a table with \"field1: 10\" and \"field2: 20\"." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/tomap.rst:22 +msgid "The :doc:`/reference/reference_lua/box_tuple/totable` function only returns a table containing the values. But the ``tuple_object:tomap()`` function returns a table containing not only the values, but also the key:value pairs." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/tomap.rst:27 +msgid "This only works if the tuple comes from a space that has been formatted with a :ref:`format clause `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/tomap.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/tomap.rst:30 +msgid "the only possible option is ``names_only``. If ``names_only`` is false or omitted (default), then all the fields will appear twice, first with numeric headings and second with name headings. If ``names_only`` is true, then all the fields will appear only once, with name headings." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/tomap.rst:30 +msgid "the only possible option is ``names_only``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/tomap.rst:32 +msgid "If ``names_only`` is false or omitted (default), then all the fields will appear twice, first with numeric headings and second with name headings." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/tomap.rst:37 +msgid "If ``names_only`` is true, then all the fields will appear only once, with name headings." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/tomap.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/tomap.rst:41 +msgid "field-number:value pair(s) and key:value pair(s) from the tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/tomap.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/tomap.rst:42 +msgid "lua-table" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/tomap.rst:44 +msgid "In the following example, a tuple named ``t1`` is returned from a space that has been formatted, then tables named ``t1map1`` and ``t1map2`` are produced from ``t1``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/tomap.rst:48 +msgid "format = {{'field1', 'unsigned'}, {'field2', 'unsigned'}}\n" +"s = box.schema.space.create('test', {format = format})\n" +"s:create_index('pk',{parts={1,'unsigned',2,'unsigned'}})\n" +"t1 = s:insert{10, 20}\n" +"t1map = t1:tomap()\n" +"t1map_names_only = t1:tomap({names_only=true})" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/tomap.rst:57 +msgid "``t1map`` will contain \"1: 10\", \"2: 20\", \"field1: 10\", \"field2: 20\"." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/tomap.rst:59 +msgid "``t1map_names_only`` will contain \"field1: 10\", \"field2: 20\"." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_tuple/totable.pot b/locale/en/reference/reference_lua/box_tuple/totable.pot new file mode 100644 index 0000000000..2a11e0fcf0 --- /dev/null +++ b/locale/en/reference/reference_lua/box_tuple/totable.pot @@ -0,0 +1,59 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_tuple/totable.rst:6 +msgid "tuple_object:totable()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/totable.rst:12 +msgid "If ``t`` is a tuple instance, ``t:totable()`` will return all fields, ``t:totable(1)`` will return all fields starting with field number 1, ``t:totable(1,5)`` will return all fields between field number 1 and field number 5." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/totable.rst:16 +msgid "It is preferable to use ``t:totable()`` rather than ``t:unpack()``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/totable.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/totable.rst:18 +msgid "field(s) from the tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/totable.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/totable.rst:19 +msgid "lua-table" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/totable.rst:21 +msgid "In the following example, a tuple named ``t`` is created, then all its fields are selected, then the result is returned." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/totable.rst:24 +msgid "tarantool> t = box.tuple.new{'Fld#1', 'Fld#2', 'Fld#3', 'Fld#4', 'Fld#5'}\n" +"---\n" +"...\n" +"tarantool> t:totable()\n" +"---\n" +"- ['Fld#1', 'Fld#2', 'Fld#3', 'Fld#4', 'Fld#5']\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_tuple/transform.pot b/locale/en/reference/reference_lua/box_tuple/transform.pot new file mode 100644 index 0000000000..a8c79d3d07 --- /dev/null +++ b/locale/en/reference/reference_lua/box_tuple/transform.pot @@ -0,0 +1,64 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_tuple/transform.rst:6 +msgid "tuple_object:transform()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/transform.rst:12 +msgid "If ``t`` is a tuple instance, :samp:`t:transform({start-field-number},{fields-to-remove})` will return a tuple where, starting from field ``start-field-number``, a number of fields (``fields-to-remove``) are removed. Optionally one can add more arguments after ``fields-to-remove`` to indicate new values that will replace what was removed." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/transform.rst:19 +msgid "If the original tuple comes from a space that has been formatted with a :ref:`format clause `, the formatting will not be preserved for the result tuple." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/transform.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/transform.rst:23 +msgid "base 1, may be negative" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/transform.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/transform.rst:26 +#: ../../doc/reference/reference_lua/box_tuple/transform.rst:27 +msgid "tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/transform.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/transform.rst:29 +msgid "In the following example, a tuple named ``t`` is created and then, starting from the second field, two fields are removed but one new one is added, then the result is returned." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/transform.rst:33 +msgid "tarantool> t = box.tuple.new{'Fld#1', 'Fld#2', 'Fld#3', 'Fld#4', 'Fld#5'}\n" +"---\n" +"...\n" +"tarantool> t:transform(2, 2, 'x')\n" +"---\n" +"- ['Fld#1', 'x', 'Fld#4', 'Fld#5']\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_tuple/unpack.pot b/locale/en/reference/reference_lua/box_tuple/unpack.pot new file mode 100644 index 0000000000..2f342a2f4b --- /dev/null +++ b/locale/en/reference/reference_lua/box_tuple/unpack.pot @@ -0,0 +1,59 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_tuple/unpack.rst:6 +msgid "tuple_object:unpack()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/unpack.rst:12 +msgid "If ``t`` is a tuple instance, ``t:unpack()`` will return all fields, ``t:unpack(1)`` will return all fields starting with field number 1, ``t:unpack(1,5)`` will return all fields between field number 1 and field number 5." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/unpack.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/unpack.rst:16 +msgid "field(s) from the tuple." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/unpack.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/unpack.rst:17 +msgid "lua-value(s)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/unpack.rst:19 +msgid "In the following example, a tuple named ``t`` is created and then all its fields are selected, then the result is returned." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/unpack.rst:22 +msgid "tarantool> t = box.tuple.new{'Fld#1', 'Fld#2', 'Fld#3', 'Fld#4', 'Fld#5'}\n" +"---\n" +"...\n" +"tarantool> t:unpack()\n" +"---\n" +"- Fld#1\n" +"- Fld#2\n" +"- Fld#3\n" +"- Fld#4\n" +"- Fld#5\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_tuple/update.pot b/locale/en/reference/reference_lua/box_tuple/update.pot new file mode 100644 index 0000000000..128529cd54 --- /dev/null +++ b/locale/en/reference/reference_lua/box_tuple/update.pot @@ -0,0 +1,87 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_tuple/update.rst:6 +msgid "tuple_object:update()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/update.rst:12 +msgid "Update a tuple." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/update.rst:14 +msgid "This function updates a tuple which is not in a space. Compare the function :extsamp:`box.space.{*{space-name}*}:update({*{key}*}, {{{*{format}*}, {*{field_no}*}, {*{value}*}}, ...})` which updates a tuple in a space." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/update.rst:18 +msgid "For details: see the description for ``operator``, ``field_no``, and ``value`` in the section :ref:`box.space.space-name:update{key, format, {field_number, value}...) `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/update.rst:22 +msgid "If the original tuple comes from a space that has been formatted with a :ref:`format clause `, the formatting will be preserved for the result tuple." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/update.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/update.rst:26 +msgid "operation type represented in string (e.g. '``=``' for 'assign new value')" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/update.rst:28 +msgid "what field the operation will apply to. The field number can be negative, meaning the position from the end of tuple. (#tuple + negative field number + 1)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/update.rst:32 +msgid "what value will be applied" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/update.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/update.rst:34 +msgid "new tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/update.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/update.rst:35 +msgid "tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/update.rst:37 +msgid "In the following example, a tuple named ``t`` is created and then its second field is updated to equal 'B'." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/update.rst:40 +msgid "tarantool> t = box.tuple.new{'Fld#1', 'Fld#2', 'Fld#3', 'Fld#4', 'Fld#5'}\n" +"---\n" +"...\n" +"tarantool> t:update({{'=', 2, 'B'}})\n" +"---\n" +"- ['Fld#1', 'B', 'Fld#3', 'Fld#4', 'Fld#5']\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/update.rst:50 +msgid "Since Tarantool 2.3 a tuple can also be updated via :ref:`JSON paths`." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_tuple/upsert.pot b/locale/en/reference/reference_lua/box_tuple/upsert.pot new file mode 100644 index 0000000000..eda8ffb84e --- /dev/null +++ b/locale/en/reference/reference_lua/box_tuple/upsert.pot @@ -0,0 +1,96 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_tuple/upsert.rst:6 +msgid "tuple_object:upsert()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/upsert.rst:12 +msgid "The same as ``tuple_object:update()``, but ignores errors. In case of an error the tuple is left intact, but an error message is printed. Only client errors are ignored, such as a bad field type, or wrong field index/name. System errors, such as OOM, are not ignored and raised just like with a normal ``update()``. Note that only bad operations are ignored. All correct operations are applied." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/upsert.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/upsert.rst:20 +msgid "operation type represented as a string (e.g. '``=``' for 'assign new value')" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/upsert.rst:22 +msgid "the field to which the operation will be applied. The field number can be negative, meaning the position from the end of tuple. (#tuple + negative field number + 1)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/upsert.rst:26 +msgid "the value which will be applied" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/upsert.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/upsert.rst:28 +msgid "new tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/upsert.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/upsert.rst:29 +msgid "tuple" +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/upsert.rst:31 +msgid "See the following example where one operation is applied, and one is not." +msgstr "" + +#: ../../doc/reference/reference_lua/box_tuple/upsert.rst:33 +msgid "tarantool> t = box.tuple.new({1, 2, 3})\n" +"tarantool> t2 = t:upsert({{'=', 5, 100}})\n" +"UPSERT operation failed:\n" +"ER_NO_SUCH_FIELD_NO: Field 5 was not found in the tuple\n" +"---\n" +"...\n" +"\n" +"tarantool> t\n" +"---\n" +"- [1, 2, 3]\n" +"...\n" +"\n" +"tarantool> t2\n" +"---\n" +"- [1, 2, 3]\n" +"...\n" +"\n" +"tarantool> t2 = t:upsert({{'=', 5, 100}, {'+', 1, 3}})\n" +"UPSERT operation failed:\n" +"ER_NO_SUCH_FIELD_NO: Field 5 was not found in the tuple\n" +"---\n" +"...\n" +"\n" +"tarantool> t\n" +"---\n" +"- [1, 2, 3]\n" +"...\n" +"\n" +"tarantool> t2\n" +"---\n" +"- [4, 2, 3]\n" +"..." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_txn_management.pot b/locale/en/reference/reference_lua/box_txn_management.pot new file mode 100644 index 0000000000..a8d92ac807 --- /dev/null +++ b/locale/en/reference/reference_lua/box_txn_management.pot @@ -0,0 +1,137 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:5 +msgid "Functions for transaction management" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:7 +msgid "For general information and examples, see section :ref:`Transactions `." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:10 +msgid "Observe the following rules when working with transactions:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:12 +msgid "Rule #1" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:15 +msgid "The requests in a transaction must be sent to a server as a single block. It is not enough to enclose them between begin and commit or rollback. To ensure they are sent as a single block: put them in a function, or put them all on one line, or use a delimiter so that multi-line requests are handled together." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:21 +msgid "Rule #2" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:24 +msgid "All database operations in a transaction should use the same storage engine. It is not safe to access tuple sets that are defined with ``{engine='vinyl'}`` and also access tuple sets that are defined with ``{engine='memtx'}``, in the same transaction." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:29 +msgid "Rule #3" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:32 +msgid "Requests which cause changes to the data definition -- create, alter, drop, truncate -- are only allowed with Tarantool version 2.1 or later. Data-definition requests which change an index or change a format, such as :doc:`space_object:create_index() ` and :ref:`space_object:format() `, are not allowed inside transactions except as the first request after ``box.begin()``." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:43 +msgid "Below is a list of all functions for transaction management." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:54 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:55 +msgid "Use" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:57 +msgid ":doc:`./box_txn_management/begin`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:58 +msgid "Begin the transaction" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:60 +msgid ":doc:`./box_txn_management/commit`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:61 +msgid "End the transaction and save all changes" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:63 +msgid ":doc:`./box_txn_management/rollback`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:64 +msgid "End the transaction and discard all changes" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:66 +msgid ":doc:`./box_txn_management/savepoint`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:67 +msgid "Get a savepoint descriptor" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:69 +msgid ":doc:`./box_txn_management/rollback_to_savepoint`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:70 +msgid "Do not end the transaction and discard all changes made after a savepoint" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:73 +msgid ":doc:`./box_txn_management/atomic`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:74 +msgid "Execute a function, treating it as a transaction" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:76 +msgid ":doc:`./box_txn_management/on_commit`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:77 +msgid "Define a trigger that will be activated by ``box.commit``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:79 +msgid ":doc:`./box_txn_management/on_rollback`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:80 +msgid "Define a trigger that will be activated by ``box.rollback``" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:82 +msgid ":doc:`./box_txn_management/is_in_txn`" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management.rst:83 +msgid "State whether a transaction is in progress" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_txn_management/atomic.pot b/locale/en/reference/reference_lua/box_txn_management/atomic.pot new file mode 100644 index 0000000000..f9007b0dca --- /dev/null +++ b/locale/en/reference/reference_lua/box_txn_management/atomic.pot @@ -0,0 +1,109 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_txn_management/atomic.rst:5 +msgid "box.atomic()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/atomic.rst:9 +msgid "Execute a function, acting as if the function starts with an implicit :doc:`/reference/reference_lua/box_txn_management/begin` and ends with an implicit :doc:`/reference/reference_lua/box_txn_management/commit` if successful, or ends with an implicit :doc:`/reference/reference_lua/box_txn_management/rollback` if there is an error." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/atomic.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/atomic.rst:14 +msgid "(optional) transaction options: * ``txn_isolation`` -- the :ref:`transaction isolation level ` * ``timeout`` -- a timeout (in seconds), after which the transaction is rolled back" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/atomic.rst:14 +msgid "(optional) transaction options:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/atomic.rst:16 +msgid "``txn_isolation`` -- the :ref:`transaction isolation level `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/atomic.rst:17 +msgid "``timeout`` -- a timeout (in seconds), after which the transaction is rolled back" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/atomic.rst:19 +msgid "the function name" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/atomic.rst:21 +msgid "(optional) arguments passed to the function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/atomic.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/atomic.rst:23 +msgid "the result of the function passed to ``atomic()`` as an argument" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/atomic.rst:25 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/atomic.rst:27 +msgid "error and abort the transaction in case of a conflict." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/atomic.rst:28 +msgid "error and abort the transaction if the timeout is exceeded." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/atomic.rst:29 +msgid "error if the operation fails to write to disk." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/atomic.rst:30 +msgid "error if for some reason memory cannot be allocated." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/atomic.rst:33 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/atomic.rst:35 +msgid "-- Create an index with the specified sequence --\n" +"box.schema.sequence.create('id_sequence', { min = 1 })\n" +"box.space.bands:create_index('primary', { parts = { 'id' }, sequence = 'id_sequence' })\n" +"\n" +"-- Insert test data --\n" +"box.space.bands:insert { 1, 'Roxette', 1986 }\n" +"box.space.bands:insert { 2, 'Scorpions', 1965 }\n" +"box.space.bands:insert { 3, 'Ace of Base', 1987 }\n" +"\n" +"-- Define a function --\n" +"local function insert_band(band_name, year)\n" +" box.space.bands:insert { nil, band_name, year }\n" +"end\n" +"\n" +"-- Begin and commit the transaction implicitly --\n" +"box.atomic(insert_band, 'The Beatles', 1960)\n" +"\n" +"-- Begin the transaction with the specified isolation level --\n" +"box.atomic({ txn_isolation = 'read-committed' },\n" +" insert_band, 'The Rolling Stones', 1962)\n" +"" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_txn_management/begin.pot b/locale/en/reference/reference_lua/box_txn_management/begin.pot new file mode 100644 index 0000000000..c6a051c476 --- /dev/null +++ b/locale/en/reference/reference_lua/box_txn_management/begin.pot @@ -0,0 +1,85 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_txn_management/begin.rst:4 +msgid "box.begin()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/begin.rst:8 +msgid "Begin the transaction. Disable :ref:`implicit yields ` until the transaction ends. Signal that writes to the :ref:`write-ahead log ` will be deferred until the transaction ends. In effect the fiber which executes ``box.begin()`` is starting an \"active multi-request transaction\", blocking all other fibers." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/begin.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/begin.rst:15 +msgid "(optional) transaction options: * ``txn_isolation`` -- the :ref:`transaction isolation level ` * ``timeout`` -- a timeout (in seconds), after which the transaction is rolled back" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/begin.rst:15 +msgid "(optional) transaction options:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/begin.rst:17 +msgid "``txn_isolation`` -- the :ref:`transaction isolation level `" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/begin.rst:18 +msgid "``timeout`` -- a timeout (in seconds), after which the transaction is rolled back" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/begin.rst:20 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/begin.rst:22 +msgid "error if this operation is not permitted because there is already an active transaction." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/begin.rst:23 +msgid "error if for some reason memory cannot be allocated." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/begin.rst:24 +msgid "error and abort the transaction if the timeout is exceeded." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/begin.rst:26 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/begin.rst:28 +msgid "-- Insert test data --\n" +"box.space.bands:insert { 1, 'Roxette', 1986 }\n" +"box.space.bands:insert { 2, 'Scorpions', 1965 }\n" +"box.space.bands:insert { 3, 'Ace of Base', 1987 }\n" +"\n" +"-- Begin and commit the transaction explicitly --\n" +"box.begin()\n" +"box.space.bands:insert { 4, 'The Beatles', 1960 }\n" +"box.space.bands:replace { 1, 'Pink Floyd', 1965 }\n" +"box.commit()\n" +"\n" +"-- Begin the transaction with the specified isolation level --\n" +"box.begin({ txn_isolation = 'read-committed' })\n" +"box.space.bands:insert { 5, 'The Rolling Stones', 1962 }\n" +"box.space.bands:replace { 1, 'The Doors', 1965 }\n" +"box.commit()\n" +"" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_txn_management/commit.pot b/locale/en/reference/reference_lua/box_txn_management/commit.pot new file mode 100644 index 0000000000..ff892275c8 --- /dev/null +++ b/locale/en/reference/reference_lua/box_txn_management/commit.pot @@ -0,0 +1,65 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_txn_management/commit.rst:5 +msgid "box.commit()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/commit.rst:9 +msgid "End the transaction, and make all its data-change operations permanent." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/commit.rst:11 +msgid "**Possible errors:**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/commit.rst:13 +msgid "error and abort the transaction in case of a conflict." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/commit.rst:14 +msgid "error if the operation fails to write to disk." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/commit.rst:15 +msgid "error if for some reason memory cannot be allocated." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/commit.rst:17 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/commit.rst:19 +msgid "-- Insert test data --\n" +"box.space.bands:insert { 1, 'Roxette', 1986 }\n" +"box.space.bands:insert { 2, 'Scorpions', 1965 }\n" +"box.space.bands:insert { 3, 'Ace of Base', 1987 }\n" +"\n" +"-- Begin and commit the transaction explicitly --\n" +"box.begin()\n" +"box.space.bands:insert { 4, 'The Beatles', 1960 }\n" +"box.space.bands:replace { 1, 'Pink Floyd', 1965 }\n" +"box.commit()\n" +"\n" +"-- Begin the transaction with the specified isolation level --\n" +"box.begin({ txn_isolation = 'read-committed' })\n" +"box.space.bands:insert { 5, 'The Rolling Stones', 1962 }\n" +"box.space.bands:replace { 1, 'The Doors', 1965 }\n" +"box.commit()\n" +"" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_txn_management/is_in_txn.pot b/locale/en/reference/reference_lua/box_txn_management/is_in_txn.pot new file mode 100644 index 0000000000..62247b55b6 --- /dev/null +++ b/locale/en/reference/reference_lua/box_txn_management/is_in_txn.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_txn_management/is_in_txn.rst:5 +msgid "box.is_in_txn()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/is_in_txn.rst:9 +msgid "If a transaction is in progress (for example the user has called :doc:`/reference/reference_lua/box_txn_management/begin` and has not yet called either :doc:`/reference/reference_lua/box_txn_management/commit` or :doc:`/reference/reference_lua/box_txn_management/rollback`, return ``true``. Otherwise return ``false``." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_txn_management/on_commit.pot b/locale/en/reference/reference_lua/box_txn_management/on_commit.pot new file mode 100644 index 0000000000..d2ab517664 --- /dev/null +++ b/locale/en/reference/reference_lua/box_txn_management/on_commit.pot @@ -0,0 +1,164 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:5 +msgid "box.on_commit()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:9 +msgid "Define a trigger for execution when a transaction ends due to an event such as :doc:`/reference/reference_lua/box_txn_management/commit`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:12 +msgid "The trigger function may take an iterator parameter, as described in an example for this section." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:15 +msgid "The trigger function should not access any database spaces." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:17 +msgid "If the trigger execution fails and raises an error, the effect is severe and should be avoided -- use Lua's ``pcall()`` mechanism around code that might fail." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:21 +msgid "``box.on_commit()`` must be invoked within a transaction, and the trigger ceases to exist when the transaction ends." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:24 +msgid "function which will become the trigger function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:26 +msgid "existing trigger function which will be replaced by trigger-function" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:28 +msgid "nil or function pointer" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:30 +msgid "If the parameters are ``(nil, old-trigger-function)``, then the old trigger is deleted." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:33 +msgid "Details about trigger characteristics are in the :ref:`triggers ` section." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:36 +msgid "**Example 1**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:38 +msgid "-- Insert test data --\n" +"box.space.bands:insert { 1, 'Roxette', 1986 }\n" +"box.space.bands:insert { 2, 'Scorpions', 1965 }\n" +"box.space.bands:insert { 3, 'Ace of Base', 1987 }\n" +"\n" +"-- Define a function called on commit --\n" +"function print_commit_result()\n" +" print('Commit happened')\n" +"end\n" +"\n" +"-- Commit the transaction --\n" +"box.begin()\n" +"box.space.bands:insert { 4, 'The Beatles', 1960 }\n" +"box.on_commit(print_commit_result)\n" +"box.commit()\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:43 +msgid "**Example 2**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:45 +msgid "The function parameter can be an iterator. The iterator goes through the effects of every request that changed a space during the transaction." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:49 +msgid "The iterator has:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:51 +msgid "an ordinal request number" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:52 +msgid "the old value of the tuple before the request (``nil`` for an ``insert`` request)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:54 +msgid "the new value of the tuple after the request (``nil`` for a ``delete`` request)" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:56 +msgid "the ID of the space" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:58 +msgid "The example below displays the effects of two ``replace`` requests:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:60 +msgid "-- Insert test data --\n" +"box.space.bands:insert { 1, 'Roxette', 1986 }\n" +"box.space.bands:insert { 2, 'Scorpions', 1965 }\n" +"box.space.bands:insert { 3, 'Ace of Base', 1987 }\n" +"\n" +"-- Define a function called on commit --\n" +"function print_replace_details(iterator)\n" +" for request_number, old_tuple, new_tuple, space_id in iterator() do\n" +" print('request_number: ' .. tostring(request_number))\n" +" print('old_tuple: ' .. tostring(old_tuple))\n" +" print('new_tuple: ' .. tostring(new_tuple))\n" +" print('space_id: ' .. tostring(space_id))\n" +" end\n" +"end\n" +"\n" +"-- Commit the transaction --\n" +"box.begin()\n" +"box.space.bands:replace { 1, 'The Beatles', 1960 }\n" +"box.space.bands:replace { 2, 'The Rolling Stones', 1965 }\n" +"box.on_commit(print_replace_details)\n" +"box.commit()\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:65 +msgid "The output might look like this:" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_commit.rst:67 +msgid "request_number: 1\n" +"old_tuple: [1, 'Roxette', 1986]\n" +"new_tuple: [1, 'The Beatles', 1960]\n" +"space_id: 512\n" +"request_number: 2\n" +"old_tuple: [2, 'Scorpions', 1965]\n" +"new_tuple: [2, 'The Rolling Stones', 1965]\n" +"space_id: 512" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_txn_management/on_rollback.pot b/locale/en/reference/reference_lua/box_txn_management/on_rollback.pot new file mode 100644 index 0000000000..e52634f02f --- /dev/null +++ b/locale/en/reference/reference_lua/box_txn_management/on_rollback.pot @@ -0,0 +1,29 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_txn_management/on_rollback.rst:5 +msgid "box.on_rollback()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_rollback.rst:9 +msgid "Define a trigger for execution when a transaction ends due to an event such as :doc:`/reference/reference_lua/box_txn_management/rollback`." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/on_rollback.rst:12 +msgid "The parameters and warnings are exactly the same as for :doc:`/reference/reference_lua/box_txn_management/on_commit`." +msgstr "" diff --git a/locale/en/reference/reference_lua/box_txn_management/rollback.pot b/locale/en/reference/reference_lua/box_txn_management/rollback.pot new file mode 100644 index 0000000000..9eebfbef7e --- /dev/null +++ b/locale/en/reference/reference_lua/box_txn_management/rollback.pot @@ -0,0 +1,43 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_txn_management/rollback.rst:5 +msgid "box.rollback()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/rollback.rst:9 +msgid "End the transaction, but cancel all its data-change operations. An explicit call to functions outside ``box.space`` that always yield, such as :ref:`fiber.sleep() ` or :ref:`fiber.yield() `, will have the same effect." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/rollback.rst:14 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/rollback.rst:16 +msgid "-- Insert test data --\n" +"box.space.bands:insert { 1, 'Roxette', 1986 }\n" +"box.space.bands:insert { 2, 'Scorpions', 1965 }\n" +"box.space.bands:insert { 3, 'Ace of Base', 1987 }\n" +"\n" +"-- Rollback the transaction --\n" +"box.begin()\n" +"box.space.bands:insert { 4, 'The Beatles', 1960 }\n" +"box.space.bands:replace { 1, 'Pink Floyd', 1965 }\n" +"box.rollback()\n" +"" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_txn_management/rollback_to_savepoint.pot b/locale/en/reference/reference_lua/box_txn_management/rollback_to_savepoint.pot new file mode 100644 index 0000000000..5b5e6e0771 --- /dev/null +++ b/locale/en/reference/reference_lua/box_txn_management/rollback_to_savepoint.pot @@ -0,0 +1,57 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_txn_management/rollback_to_savepoint.rst:5 +msgid "box.rollback_to_savepoint()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/rollback_to_savepoint.rst:9 +msgid "Do not end the transaction, but cancel all its data-change and :ref:`box.savepoint() ` operations that were done after the specified savepoint." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/rollback_to_savepoint.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/rollback_to_savepoint.rst:13 +msgid "error if the savepoint cannot be set in absence of active transaction." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/rollback_to_savepoint.rst:16 +msgid "**Possible errors:** error if the savepoint does not exist." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/rollback_to_savepoint.rst:18 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/rollback_to_savepoint.rst:20 +msgid "-- Insert test data --\n" +"box.space.bands:insert { 1, 'Roxette', 1986 }\n" +"box.space.bands:insert { 2, 'Scorpions', 1965 }\n" +"box.space.bands:insert { 3, 'Ace of Base', 1987 }\n" +"\n" +"-- Rollback the transaction to a savepoint --\n" +"box.begin()\n" +"box.space.bands:insert { 4, 'The Beatles', 1960 }\n" +"save1 = box.savepoint()\n" +"box.space.bands:replace { 1, 'Pink Floyd', 1965 }\n" +"box.rollback_to_savepoint(save1)\n" +"box.commit()\n" +"" +msgstr "" diff --git a/locale/en/reference/reference_lua/box_txn_management/savepoint.pot b/locale/en/reference/reference_lua/box_txn_management/savepoint.pot new file mode 100644 index 0000000000..8508fa2859 --- /dev/null +++ b/locale/en/reference/reference_lua/box_txn_management/savepoint.pot @@ -0,0 +1,70 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/box_txn_management/savepoint.rst:5 +msgid "box.savepoint()" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/savepoint.rst:9 +msgid "Return a descriptor of a savepoint (type = table), which can be used later by :doc:`box.rollback_to_savepoint(savepoint) `. Savepoints can only be created while a transaction is active, and they are destroyed when a transaction ends." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/savepoint.rst:0 +#: ../../doc/reference/reference_lua/box_txn_management/savepoint.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/savepoint.rst:14 +msgid "savepoint table" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/savepoint.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/savepoint.rst:15 +msgid "Lua object" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/savepoint.rst:17 +msgid "error if the savepoint cannot be set in absence of active transaction." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/savepoint.rst:20 +msgid "**Possible errors:** error if for some reason memory cannot be allocated." +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/savepoint.rst:22 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/box_txn_management/savepoint.rst:24 +msgid "-- Insert test data --\n" +"box.space.bands:insert { 1, 'Roxette', 1986 }\n" +"box.space.bands:insert { 2, 'Scorpions', 1965 }\n" +"box.space.bands:insert { 3, 'Ace of Base', 1987 }\n" +"\n" +"-- Rollback the transaction to a savepoint --\n" +"box.begin()\n" +"box.space.bands:insert { 4, 'The Beatles', 1960 }\n" +"save1 = box.savepoint()\n" +"box.space.bands:replace { 1, 'Pink Floyd', 1965 }\n" +"box.rollback_to_savepoint(save1)\n" +"box.commit()\n" +"" +msgstr "" diff --git a/locale/en/reference/reference_lua/buffer.pot b/locale/en/reference/reference_lua/buffer.pot new file mode 100644 index 0000000000..6f446681ee --- /dev/null +++ b/locale/en/reference/reference_lua/buffer.pot @@ -0,0 +1,253 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/buffer.rst:5 +msgid "Module buffer" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:7 +msgid "The ``buffer`` module returns a dynamically resizable buffer which is solely for optional use by methods of the :ref:`net.box module ` or the :ref:`msgpack module `." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:11 +msgid "Ordinarily the ``net.box`` methods return a Lua table. If a ``buffer`` option is used, then the ``net.box`` methods return a :ref:`raw MsgPack string `. This saves time on the server, if the client application has its own routine for decoding raw MsgPack strings." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:19 +msgid "The buffer uses four pointers to manage its capacity:" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:21 +msgid "``buf`` -- a pointer to the beginning of the buffer" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:22 +msgid "``rpos`` -- a pointer to the beginning of the range; available for reading data (\"read position\")" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:23 +msgid "``wpos`` -- a pointer to the end of the range; available for reading data, and to the beginning of the range for writing new data (\"write position\")" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:25 +msgid "``epos`` -- a pointer to the end of the range; available for writing new data (\"end position\")" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:31 +msgid "Create a new buffer." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:33 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:35 +msgid "In this example we will show that using buffer allows you to keep the data in the format that you get from the server. So if you get the data only for sending it somewhere else, buffer fastens this a lot." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:39 +msgid "box.cfg{listen = 3301}\n" +"buffer = require('buffer')\n" +"net_box = require('net.box')\n" +"msgpack = require('msgpack')\n" +"\n" +"box.schema.space.create('tester')\n" +"box.space.tester:create_index('primary')\n" +"box.space.tester:insert({1, 'ABCDE', 12345})\n" +"\n" +"box.schema.user.create('usr1', {password = 'pwd1'})\n" +"box.schema.user.grant('usr1', 'read,write,execute', 'space', 'tester')\n" +"\n" +"ibuf = buffer.ibuf()\n" +"\n" +"conn = net_box.connect('usr1:pwd1@localhost:3301')\n" +"conn.space.tester:select({}, {buffer=ibuf})\n" +"\n" +"msgpack.decode_unchecked(ibuf.rpos)" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:60 +#: ../../doc/reference/reference_lua/buffer.rst:228 +msgid "The result of the final request looks like this:" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:62 +#: ../../doc/reference/reference_lua/buffer.rst:196 +msgid "tarantool> msgpack.decode_unchecked(ibuf.rpos)\n" +"---\n" +"- {48: [['ABCDE', 12345]]}\n" +"- 'cdata: 0x7f97ba10c041'\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:72 +msgid "Before Tarantool version 1.7.7, the function to use for this case is ``msgpack.ibuf_decode(ibuf.rpos)``. Starting with Tarantool version 1.7.7, ``ibuf_decode`` is deprecated." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:82 +msgid "Allocate ``size`` bytes for ``buffer_object``." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:0 +#: ../../doc/reference/reference_lua/buffer.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:84 +msgid "memory in bytes to allocate" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:0 +#: ../../doc/reference/reference_lua/buffer.rst:0 +#: ../../doc/reference/reference_lua/buffer.rst:0 +#: ../../doc/reference/reference_lua/buffer.rst:0 +#: ../../doc/reference/reference_lua/buffer.rst:0 +#: ../../doc/reference/reference_lua/buffer.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:85 +msgid "``wpos``" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:92 +msgid "Return the capacity of the ``buffer_object``." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:94 +msgid "``epos - buf``" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:101 +msgid "Check if ``size`` bytes are available for reading in ``buffer_object``." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:103 +msgid "memory in bytes to check" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:104 +msgid "``rpos``" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:111 +msgid "Return the size of the range occupied by data." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:113 +msgid "``rpos - buf``" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:120 +msgid "Read ``size`` bytes from buffer." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:127 +msgid "Clear the memory slots allocated by ``buffer_object``." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:129 +msgid "tarantool> ibuf:recycle()\n" +"---\n" +"...\n" +"tarantool> ibuf.buf, ibuf.rpos, ibuf.wpos, ibuf.epos\n" +"---\n" +"- 'cdata: NULL'\n" +"- 'cdata: NULL'\n" +"- 'cdata: NULL'\n" +"- 'cdata: NULL'\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:147 +msgid "Clear the memory slots used by ``buffer_object``. This method allows to keep the buffer but remove data from it. It is useful when you want to use the buffer further." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:151 +msgid "tarantool> ibuf:reset()\n" +"---\n" +"...\n" +"tarantool> ibuf.buf, ibuf.rpos, ibuf.wpos, ibuf.epos\n" +"---\n" +"- 'cdata: 0x010cc28030'\n" +"- 'cdata: 0x010cc28030'\n" +"- 'cdata: 0x010cc28030'\n" +"- 'cdata: 0x010cc2c000'\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:169 +msgid "Reserve memory for ``buffer_object``. Check if there is enough memory to write ``size`` bytes after ``wpos``. If not, ``epos`` shifts until ``size`` bytes will be available." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:177 +msgid "Return a range, available for reading data." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:179 +msgid "``wpos - rpos``" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:186 +msgid "Return a range for writing data." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:188 +msgid "``epos - wpos``" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:192 +msgid "**Module buffer and skip_header**" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:194 +msgid "The example in the previous section" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:204 +msgid "showed that, ordinarily, the response from net.box includes a header -- 48 (hexadecimal 30) that is the :ref:`key ` for IPROTO_DATA. But in some situations, for example when passing the buffer to a C function that expects a MsgPack byte array without a header, the header can be skipped. This is done by specifying ``skip_header=true`` as an option to :ref:`conn.space.space-name:select{...} ` or :ref:`conn.space.space-name:insert{...} ` or :ref:`conn.space.space-name:replace{...} ` or :ref:`conn.space.space-name:update{...} ` or :ref:`conn.space.space-name:upsert{...} ` or :ref:`conn.space.space-name:delete{...} `. The default is ``skip_header=false``." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:217 +msgid "Now here is the end of the same example, except that ``skip_header=true`` is used." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:219 +msgid "ibuf = buffer.ibuf()\n" +"\n" +"conn = net_box.connect('usr1:pwd1@localhost:3301')\n" +"conn.space.tester:select({}, {buffer=ibuf, skip_header=true})\n" +"\n" +"msgpack.decode_unchecked(ibuf.rpos)" +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:230 +msgid "tarantool> msgpack.decode_unchecked(ibuf.rpos)\n" +"---\n" +"- [['ABCDE', 12345]]\n" +"- 'cdata: 0x7f8fd102803f'\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:238 +msgid "Notice that the IPROTO_DATA header (48) is gone." +msgstr "" + +#: ../../doc/reference/reference_lua/buffer.rst:240 +msgid "The result is still inside an array, as is clear from the fact that it is shown inside square brackets. It is possible to skip the array header too, with :ref:`msgpack.decode_array_header() `." +msgstr "" diff --git a/locale/en/reference/reference_lua/checks.pot b/locale/en/reference/reference_lua/checks.pot new file mode 100644 index 0000000000..d298042448 --- /dev/null +++ b/locale/en/reference/reference_lua/checks.pot @@ -0,0 +1,828 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/checks.rst:4 +msgid "Module checks" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:6 +msgid "**Since:** :doc:`2.11.0 `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:8 +msgid "The ``checks`` module provides the ability to check the types of arguments passed to a Lua function. You need to call the :ref:`checks(type_1, ...) ` function inside the target Lua function and pass :ref:`one or more ` type qualifiers to check the corresponding argument types. There are two types of type qualifiers:" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:12 +msgid "A :ref:`string type qualifier ` checks whether a function's argument conforms to the specified type. Example: ``'string'``." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:13 +msgid "A :ref:`table type qualifier ` checks whether the values of a table passed as an argument conform to the specified types. Example: ``{ 'string', 'number' }``." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:17 +msgid "For earlier versions, you can install the ``checks`` module from the `Tarantool rocks repository `_." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:22 +msgid "Loading checks" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:24 +msgid "In Tarantool :doc:`2.11.0 ` and later versions, the :ref:`checks API ` is available in a script without loading the module." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:26 +msgid "For earlier versions, you need to install the ``checks`` module from the Tarantool rocks repository and load the module using the ``require()`` directive:" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:28 +msgid "local checks = require('checks')" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:36 +msgid "Number of arguments to check" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:38 +msgid "For each argument to check, you need to specify its own type qualifier in the :ref:`checks(type_1, ...) ` function." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:43 +msgid "One argument" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:45 +msgid "In the example below, the ``checks`` function accepts a ``string`` type qualifier to verify that only a string value can be passed to the ``greet`` function. Otherwise, an error is raised." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:48 +#: ../../doc/reference/reference_lua/checks.rst:109 +msgid "function greet(name)\n" +" checks('string')\n" +" return 'Hello, ' .. name\n" +"end\n" +"--[[\n" +"greet('John')\n" +"-- returns 'Hello, John'\n" +"\n" +"greet(123)\n" +"-- raises an error: bad argument #1 to nil (string expected, got number)\n" +"--]]\n" +"\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:57 +msgid "Multiple arguments" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:59 +msgid "To check the types of several arguments, you need to pass the corresponding type qualifiers to the ``checks`` function. In the example below, both arguments should be string values." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:62 +msgid "function greet_fullname(firstname, lastname)\n" +" checks('string', 'string')\n" +" return 'Hello, ' .. firstname .. ' ' .. lastname\n" +"end\n" +"--[[\n" +"greet_fullname('John', 'Smith')\n" +"-- returns 'Hello, John Smith'\n" +"\n" +"greet_fullname('John', 1)\n" +"-- raises an error: bad argument #2 to nil (string expected, got number)\n" +"--]]\n" +"\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:67 +#: ../../doc/reference/reference_lua/checks.rst:94 +msgid "To skip checking specific arguments, use the :ref:`? placeholder `." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:73 +msgid "Variable number of arguments" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:75 +msgid "You can check the types of explicitly specified arguments for functions that accept a variable number of arguments." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:77 +msgid "function extra_arguments_num(a, b, ...)\n" +" checks('string', 'number')\n" +" return select('#', ...)\n" +"end\n" +"--[[\n" +"extra_arguments_num('a', 2, 'c')\n" +"-- returns 1\n" +"\n" +"extra_arguments_num('a', 'b', 'c')\n" +"-- raises an error: bad argument #1 to nil (string expected, got number)\n" +"--]]\n" +"\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:87 +msgid "String type qualifier" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:89 +msgid "This section describes how to check a specific argument type using a string type qualifier:" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:91 +msgid "The :ref:`Supported types ` section describes all the types supported by the ``checks`` module." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:92 +msgid "If required, you can make a :ref:`union type ` to allow an argument to accept several types." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:93 +msgid "You can make any of the supported types :ref:`optional `." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:99 +msgid "Supported types" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:104 +msgid "Lua types" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:106 +msgid "A string type qualifier can accept any of the `Lua types `_, for example, ``string``, ``number``, ``table``, or ``nil``. In the example below, the ``checks`` function accepts ``string`` to validate that only a string value can be passed to the ``greet`` function." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:118 +msgid "Tarantool types" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:120 +msgid "You can use :ref:`Tarantool-specific types ` in a string qualifier. The example below shows how to check that a function argument is a decimal value." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:123 +msgid "local decimal = require('decimal')\n" +"function sqrt(value)\n" +" checks('decimal')\n" +" return decimal.sqrt(value)\n" +"end\n" +"--[[\n" +"sqrt(decimal.new(16))\n" +"-- returns 4\n" +"\n" +"sqrt(16)\n" +"-- raises an error: bad argument #1 to nil (decimal expected, got number)\n" +"--]]\n" +"\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:128 +msgid "This table lists all the checks available for Tarantool types:" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:136 +msgid "Check" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:137 +msgid "Description" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:138 +msgid "See also" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:140 +msgid "``checks('datetime')``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:141 +msgid "Check whether the specified value is :ref:`datetime_object `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:142 +msgid ":ref:`checkers.datetime(value) `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:144 +msgid "``checks('decimal')``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:145 +msgid "Check whether the specified value has the :ref:`decimal ` type" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:146 +msgid ":ref:`checkers.decimal(value) `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:148 +msgid "``checks('error')``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:149 +msgid "Check whether the specified value is :ref:`error_object `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:150 +msgid ":ref:`checkers.error(value) `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:152 +msgid "``checks('int64')``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:153 +msgid "Check whether the specified value is an ``int64`` value" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:154 +msgid ":ref:`checkers.int64(value) `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:156 +msgid "``checks('interval')``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:157 +msgid "Check whether the specified value is :ref:`interval_object `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:158 +msgid ":ref:`checkers.interval(value) `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:160 +msgid "``checks('tuple')``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:161 +msgid "Check whether the specified value is a :ref:`tuple `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:162 +msgid ":ref:`checkers.tuple(value) `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:164 +msgid "``checks('uint64')``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:165 +msgid "Check whether the specified value is a ``uint64`` value" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:166 +msgid ":ref:`checkers.uint64(value) `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:168 +msgid "``checks('uuid')``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:169 +msgid "Check whether the specified value is :ref:`uuid_object `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:170 +msgid ":ref:`checkers.uuid(value) `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:172 +msgid "``checks('uuid_bin')``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:173 +msgid "Check whether the specified value is :ref:`uuid ` represented by a 16-byte binary string" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:174 +msgid ":ref:`checkers.uuid_bin(value) `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:176 +msgid "``checks('uuid_str')``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:177 +msgid "Check whether the specified value is :ref:`uuid ` represented by a 36-byte hexadecimal string" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:178 +msgid ":ref:`checkers.uuid_str(value) `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:185 +msgid "Custom function" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:187 +msgid "A string type qualifier can accept the name of a custom function that performs arbitrary validations. To achieve this, create a function returning ``true`` if the value is valid and add this function to the :ref:`checkers ` table." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:190 +msgid "The example below shows how to use the ``positive`` function to check that an argument value is a positive number." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:192 +msgid "function checkers.positive(value)\n" +" return (type(value) == 'number') and (value > 0)\n" +"end\n" +"\n" +"function get_doubled_number(value)\n" +" checks('positive')\n" +" return value * 2\n" +"end\n" +"--[[\n" +"get_doubled_number(10)\n" +"-- returns 20\n" +"\n" +"get_doubled_number(-5)\n" +"-- raises an error: bad argument #1 to nil (positive expected, got number)\n" +"--]]\n" +"\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:201 +msgid "Metatable type" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:203 +msgid "A string qualifier can accept a value stored in the ``__type`` field of the argument `metatable `_." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:205 +msgid "local blue = setmetatable({ 0, 0, 255 }, { __type = 'color' })\n" +"function get_blue_value(color)\n" +" checks('color')\n" +" return color[3]\n" +"end\n" +"--[[\n" +"get_blue_value(blue)\n" +"-- returns 255\n" +"\n" +"get_blue_value({0, 0, 255})\n" +"-- raises an error: bad argument #1 to nil (color expected, got table)\n" +"--]]\n" +"\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:214 +msgid "Union types" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:216 +msgid "To allow an argument to accept several types (a union type), concatenate type names with a pipe (``|``). In the example below, the argument can be both a ``number`` and ``string`` value." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:219 +msgid "function get_argument_type(value)\n" +" checks('number|string')\n" +" return type(value)\n" +"end\n" +"--[[\n" +"get_argument_type(1)\n" +"-- returns 'number'\n" +"\n" +"get_argument_type('key1')\n" +"-- returns 'string'\n" +"\n" +"get_argument_type(true)\n" +"-- raises an error: bad argument #1 to nil (number|string expected, got boolean)\n" +"--]]\n" +"\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:229 +msgid "Optional types" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:231 +msgid "To make any of the supported types optional, prefix its name with a question mark (``?``). In the example below, the ``name`` argument is optional. This means that the ``greet`` function can accept ``string`` and ``nil`` values." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:235 +msgid "function greet(name)\n" +" checks('?string')\n" +" if name ~= nil then\n" +" return 'Hello, ' .. name\n" +" else\n" +" return 'Hello from Tarantool'\n" +" end\n" +"end\n" +"--[[\n" +"greet('John')\n" +"-- returns 'Hello, John'\n" +"\n" +"greet()\n" +"-- returns 'Hello from Tarantool'\n" +"\n" +"greet(123)\n" +"-- raises an error: bad argument #1 to nil (string expected, got number)\n" +"--]]\n" +"\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:240 +msgid "As for a specific type, you can make a :ref:`union type ` value optional: ``?number|string``." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:246 +msgid "Skipping argument checking" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:248 +msgid "You can skip checking of the specified arguments using the question mark (``?``) placeholder. In this case, the argument can be any type." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:251 +msgid "function greet_fullname_any(firstname, lastname)\n" +" checks('string', '?')\n" +" return 'Hello, ' .. firstname .. ' ' .. tostring(lastname)\n" +"end\n" +"--[[\n" +"greet_fullname_any('John', 'Doe')\n" +"-- returns 'Hello, John Doe'\n" +"\n" +"greet_fullname_any('John', 1)\n" +"-- returns 'Hello, John 1'\n" +"--]]\n" +"\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:262 +msgid "Table type qualifier" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:264 +msgid "A table type qualifier checks whether the values of a table passed as an argument conform to the specified types. In this case, the following checks are made:" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:267 +msgid "The argument is checked to conform to the ``?table`` type, and its content is validated." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:268 +msgid "Table values are validated against the specified :ref:`string type qualifiers `." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:269 +msgid "Table keys missing in ``checks`` are validated against the ``nil`` type." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:271 +msgid "The code below checks that the first and second table values have the ``string`` and ``number`` types." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:273 +msgid "function configure_connection(options)\n" +" checks({ 'string', 'number' })\n" +" local ip_address = options[1] or '127.0.0.1'\n" +" local port = options[2] or 3301\n" +" return ip_address .. ':' .. port\n" +"end\n" +"--[[\n" +"configure_connection({'0.0.0.0', 3303})\n" +"-- returns '0.0.0.0:3303'\n" +"\n" +"configure_connection({'0.0.0.0', '3303'})\n" +"-- raises an error: bad argument options[2] to nil (number expected, got string)\n" +"--]]\n" +"\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:278 +msgid "In the next example, the same checks are made for the specified keys." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:280 +msgid "function configure_connection_opts(options)\n" +" checks({ ip_address = 'string', port = 'number' })\n" +" local ip_address = options.ip_address or '127.0.0.1'\n" +" local port = options.port or 3301\n" +" return ip_address .. ':' .. port\n" +"end\n" +"--[[\n" +"configure_connection_opts({ip_address = '0.0.0.0', port = 3303})\n" +"-- returns '0.0.0.0:3303'\n" +"\n" +"configure_connection_opts({ip_address = '0.0.0.0', port = '3303'})\n" +"-- raises an error: bad argument options.port to nil (number expected, got string)\n" +"\n" +"configure_connection_opts({login = 'testuser', ip_address = '0.0.0.0', port = 3303})\n" +"-- raises an error: unexpected argument options.login to nil\n" +"--]]\n" +"\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:287 +msgid "Table qualifiers can be nested and use tables, too." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:294 +msgid "API Reference" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:304 +msgid "**Members**" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:307 +msgid ":ref:`checks() `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:308 +msgid "When called inside a function, checks that the function's arguments conform to the specified types" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:310 +msgid ":ref:`checkers `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:311 +msgid "A global variable that provides access to checkers for different types" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:317 +msgid "checks()" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:321 +msgid "When called inside a function, checks that the function's arguments conform to the specified types." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:323 +msgid "a :ref:`string ` or :ref:`table ` type qualifier used to check the argument type" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:324 +msgid "optional type qualifiers used to check the types of :ref:`other arguments `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:329 +msgid "checkers" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:331 +msgid "The ``checkers`` global variable provides access to checkers for different types. You can use this variable to add a :ref:`custom checker ` that performs arbitrary validations." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:336 +msgid "The ``checkers`` variable also provides access to checkers for Tarantool-specific types. These checkers can be used in a custom checker." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:343 +msgid "Check whether the specified value is :ref:`datetime_object `." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:345 +#: ../../doc/reference/reference_lua/checks.rst:363 +#: ../../doc/reference/reference_lua/checks.rst:382 +#: ../../doc/reference/reference_lua/checks.rst:405 +#: ../../doc/reference/reference_lua/checks.rst:424 +#: ../../doc/reference/reference_lua/checks.rst:443 +#: ../../doc/reference/reference_lua/checks.rst:466 +#: ../../doc/reference/reference_lua/checks.rst:485 +#: ../../doc/reference/reference_lua/checks.rst:504 +#: ../../doc/reference/reference_lua/checks.rst:518 +msgid "the value to check the type for" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:347 +msgid "``true`` if the specified value is ``datetime_object``; otherwise, ``false``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +#: ../../doc/reference/reference_lua/checks.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:348 +#: ../../doc/reference/reference_lua/checks.rst:366 +#: ../../doc/reference/reference_lua/checks.rst:385 +#: ../../doc/reference/reference_lua/checks.rst:408 +#: ../../doc/reference/reference_lua/checks.rst:427 +#: ../../doc/reference/reference_lua/checks.rst:446 +#: ../../doc/reference/reference_lua/checks.rst:469 +#: ../../doc/reference/reference_lua/checks.rst:488 +#: ../../doc/reference/reference_lua/checks.rst:507 +#: ../../doc/reference/reference_lua/checks.rst:521 +msgid "boolean" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:350 +#: ../../doc/reference/reference_lua/checks.rst:368 +#: ../../doc/reference/reference_lua/checks.rst:387 +#: ../../doc/reference/reference_lua/checks.rst:410 +#: ../../doc/reference/reference_lua/checks.rst:429 +#: ../../doc/reference/reference_lua/checks.rst:448 +#: ../../doc/reference/reference_lua/checks.rst:471 +#: ../../doc/reference/reference_lua/checks.rst:490 +msgid "**Example**" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:352 +#: ../../doc/reference/reference_lua/checks.rst:431 +msgid "local datetime = require('datetime')\n" +"local is_datetime = checkers.datetime(datetime.new { day = 1, month = 6, year = 2023 })\n" +"local is_interval = checkers.interval(datetime.interval.new { day = 1 })\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:361 +msgid "Check whether the specified value has the :ref:`decimal ` type." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:365 +msgid "``true`` if the specified value has the ``decimal`` type; otherwise, ``false``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:370 +msgid "local decimal = require('decimal')\n" +"local is_decimal = checkers.decimal(decimal.new(16))\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:380 +msgid "Check whether the specified value is :ref:`error_object `." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:384 +msgid "``true`` if the specified value is ``error_object``; otherwise, ``false``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:389 +msgid "local server_error = box.error.new({ code = 500, reason = 'Server error' })\n" +"local is_error = checkers.error(server_error)\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:399 +msgid "Check whether the specified value is one of the following ``int64`` values:" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:401 +msgid "a Lua number in a range from -2^53+1 to 2^53-1 (inclusive)" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:402 +msgid "Lua cdata ``ctype`` in a range from 0 to ``LLONG_MAX``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:403 +msgid "Lua cdata ``ctype``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:407 +msgid "``true`` if the specified value is an ``int64`` value; otherwise, ``false``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:412 +#: ../../doc/reference/reference_lua/checks.rst:473 +msgid "local is_int64 = checkers.int64(-1024)\n" +"local is_uint64 = checkers.uint64(2048)\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:422 +msgid "Check whether the specified value is :ref:`interval_object `." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:426 +msgid "``true`` if the specified value is ``interval_object``; otherwise, ``false``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:441 +msgid "Check whether the specified value is a :ref:`tuple `." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:445 +msgid "``true`` if the specified value is a tuple; otherwise, ``false``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:450 +msgid "local is_tuple = checkers.tuple(box.tuple.new(1, 'The Beatles', 1960))\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:460 +msgid "Check whether the specified value is one of the following ``uint64`` values:" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:462 +msgid "a Lua number in a range from 0 to 2^53-1 (inclusive)" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:463 +msgid "Lua cdata ``ctype``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:464 +msgid "Lua cdata ``ctype`` in range from 0 to ``LLONG_MAX``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:468 +msgid "``true`` if the specified value is an ``uint64`` value; otherwise, ``false``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:483 +msgid "Check whether the specified value is :ref:`uuid_object `." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:487 +msgid "``true`` if the specified value is ``uuid_object``; otherwise, ``false``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:492 +msgid "local uuid = require('uuid')\n" +"local is_uuid = checkers.uuid(uuid())\n" +"local is_uuid_bin = checkers.uuid_bin(uuid.bin())\n" +"local is_uuid_str = checkers.uuid_str(uuid.str())\n" +"" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:502 +msgid "Check whether the specified value is :ref:`uuid ` represented by a 16-byte binary string." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:506 +msgid "``true`` if the specified value is ``uuid`` represented by a 16-byte binary string; otherwise, ``false``" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:509 +#: ../../doc/reference/reference_lua/checks.rst:523 +msgid "**See also:** :ref:`uuid(value) `" +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:516 +msgid "Check whether the specified value is :ref:`uuid ` represented by a 36-byte hexadecimal string." +msgstr "" + +#: ../../doc/reference/reference_lua/checks.rst:520 +msgid "``true`` if the specified value is ``uuid`` represented by a 36-byte hexadecimal string; otherwise, ``false``" +msgstr "" diff --git a/locale/en/reference/reference_lua/clock.pot b/locale/en/reference/reference_lua/clock.pot new file mode 100644 index 0000000000..63e0b25aa6 --- /dev/null +++ b/locale/en/reference/reference_lua/clock.pot @@ -0,0 +1,240 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/clock.rst:5 +msgid "Module clock" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:9 +msgid "Overview" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:11 +msgid "The ``clock`` module returns time values derived from the Posix / C CLOCK_GETTIME_ function or equivalent. Most functions in the module return a number of seconds; functions whose names end in \"64\" return a 64-bit number of nanoseconds." +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:18 +msgid "Index" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:20 +msgid "Below is a list of all ``clock`` functions." +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:28 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:28 +msgid "Use" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:30 +msgid ":ref:`clock.time() ` |br| :ref:`clock.realtime() `" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:31 +msgid "Get the wall clock time in seconds" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:35 +msgid ":ref:`clock.time64() ` |br| :ref:`clock.realtime64() `" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:36 +msgid "Get the wall clock time in nanoseconds" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:40 +msgid ":ref:`clock.monotonic() `" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:40 +msgid "Get the monotonic time in seconds" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:43 +msgid ":ref:`clock.monotonic64() `" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:43 +msgid "Get the monotonic time in nanoseconds" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:46 +msgid ":ref:`clock.proc() `" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:46 +msgid "Get the processor time in seconds" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:49 +msgid ":ref:`clock.proc64() `" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:49 +msgid "Get the processor time in nanoseconds" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:52 +msgid ":ref:`clock.thread() `" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:52 +msgid "Get the thread time in seconds" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:55 +msgid ":ref:`clock.thread64() `" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:55 +msgid "Get the thread time in nanoseconds" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:58 +msgid ":ref:`clock.bench() `" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:58 +msgid "Measure the time a function takes within a processor" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:71 +msgid "The wall clock time. Derived from C function ``clock_gettime(CLOCK_REALTIME)``." +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:0 +#: ../../doc/reference/reference_lua/clock.rst:0 +#: ../../doc/reference/reference_lua/clock.rst:0 +#: ../../doc/reference/reference_lua/clock.rst:0 +#: ../../doc/reference/reference_lua/clock.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:73 +msgid "seconds or nanoseconds since epoch (1970-01-01 00:00:00), adjusted." +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:0 +#: ../../doc/reference/reference_lua/clock.rst:0 +#: ../../doc/reference/reference_lua/clock.rst:0 +#: ../../doc/reference/reference_lua/clock.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:74 +#: ../../doc/reference/reference_lua/clock.rst:99 +#: ../../doc/reference/reference_lua/clock.rst:120 +#: ../../doc/reference/reference_lua/clock.rst:141 +msgid "number or cdata (ctype)" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:76 +#: ../../doc/reference/reference_lua/clock.rst:101 +#: ../../doc/reference/reference_lua/clock.rst:122 +#: ../../doc/reference/reference_lua/clock.rst:143 +#: ../../doc/reference/reference_lua/clock.rst:165 +msgid "**Example:**" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:78 +msgid "-- This will print an approximate number of years since 1970.\n" +"clock = require('clock')\n" +"print(clock.time() / (365*24*60*60))" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:84 +msgid "See also :ref:`fiber.time64 ` and the standard Lua function `os.clock `_." +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:92 +msgid "The monotonic time. Derived from C function ``clock_gettime(CLOCK_MONOTONIC)``. Monotonic time is similar to wall clock time but is not affected by changes to or from daylight saving time, or by changes done by a user. This is the best function to use with benchmarks that need to calculate elapsed time." +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:98 +msgid "seconds or nanoseconds since the last time that the computer was booted." +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:103 +msgid "-- This will print nanoseconds since the start.\n" +"clock = require('clock')\n" +"print(clock.monotonic64())" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:114 +msgid "The processor time. Derived from C function ``clock_gettime(CLOCK_PROCESS_CPUTIME_ID)``. This is the best function to use with benchmarks that need to calculate how much time has been spent within a CPU." +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:119 +msgid "seconds or nanoseconds since processor start." +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:124 +msgid "-- This will print nanoseconds in the CPU since the start.\n" +"clock = require('clock')\n" +"print(clock.proc64())" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:135 +msgid "The thread time. Derived from C function ``clock_gettime(CLOCK_THREAD_CPUTIME_ID)``. This is the best function to use with benchmarks that need to calculate how much time has been spent within a thread within a CPU." +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:140 +msgid "seconds or nanoseconds since the transaction processor thread started." +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:145 +msgid "-- This will print seconds in the thread since the start.\n" +"clock = require('clock')\n" +"print(clock.thread64())" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:155 +msgid "The time that a function takes within a processor. This function uses ``clock.proc()``, therefore it calculates elapsed CPU time. Therefore it is not useful for showing actual elapsed time." +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:159 +msgid "function or function reference" +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:160 +msgid "whatever values are required by the function." +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:162 +msgid "**table**. first element -- seconds of CPU time, second element -- whatever the function returns." +msgstr "" + +#: ../../doc/reference/reference_lua/clock.rst:167 +msgid "-- Benchmark a function which sleeps 10 seconds.\n" +"-- NB: bench() will not calculate sleep time.\n" +"-- So the returned value will be {a number less than 10, 88}.\n" +"clock = require('clock')\n" +"fiber = require('fiber')\n" +"function f(param)\n" +" fiber.sleep(param)\n" +" return 88\n" +"end\n" +"clock.bench(f, 10)" +msgstr "" diff --git a/locale/en/reference/reference_lua/compat.pot b/locale/en/reference/reference_lua/compat.pot new file mode 100644 index 0000000000..cb20003372 --- /dev/null +++ b/locale/en/reference/reference_lua/compat.pot @@ -0,0 +1,113 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/compat.rst:4 +msgid "Module compat" +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:6 +msgid "Module ``compat`` is introduced since version 2.11.0-rc." +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:9 +msgid "The usual way to handle compatibility problems is to introduce an option for a new behavior and leave the old one by default. It is not always the perfect way." +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:12 +msgid "Sometimes developers want to keep the old behavior for existing applications and offer the new behavior by default for the new ones. For example, the old behavior is known to be problematic, or less safe, or it doesn't correspond to user expectations. In contrast, the user doesn't always read all the documentation and often assumes good defaults. It was decided to introduce a compatibility module to provide a direct way to deprecate unwanted behavior." +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:17 +msgid "The ``compat`` module is basically a global table of options with additional verbose interface and helper functions. There are three stages of changing behavior:" +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:20 +msgid "Old behavior by default." +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:21 +msgid "New behavior by default." +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:22 +msgid "New behavior is frozen and the old behavior is removed." +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:24 +msgid "During the first two stages, a user can toggle options via the interface and change the behavior according to one's needs. At the last stage, the old behavior is removed from the codebase, and the option is marked as obsolete. Because ``compat`` is a global instance, options can be hardcoded into it or added in runtime, for example, by external module." +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:28 +msgid "Options are switched to the next stage in major releases. In this way, developers are able to adapt to the new standard behavior and test it before switching to the next release. If something is broken by a new Tarantool version, a developer can still have a way to fix it by a simple config change, that is, explicitly select the old behavior." +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:31 +msgid "Consider example below:" +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:33 +msgid "The option ``json_esc_slash`` is introduced in the 2.11 minor release. Default is set to 'old', but a developer can utilize the new behavior or test the updated behavior by switching it manually to 'new'." +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:35 +msgid "In release 3.0, the next major release, ``json_esc_slash`` default is switched to 'new'. Now, developers who don't manage to adapt to the new behavior, are able to switch the option to 'old' and fix their module in the future." +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:38 +msgid "In release 4.0, ``json_esc_slash`` is marked as obsolete, and the old behavior is no longer accessible. Developers are forced to use the new behavior." +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:41 +msgid "Basic usage" +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:43 +msgid "If you want to explicitly secure every behavior in ``compat``, you can do it manually, and then call ``compat.dump()`` to get a Lua command that sets up the ``compat`` with all the options selected. You should place this commands at the beginning of code in your ``init.lua`` file. In this way, you are guaranteed to get the same behavior on any other Tarantool version. See a :doc:`tutorial on using compat <./compat/compat_tutorial>` for more examples." +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:48 +msgid "Options" +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:50 +msgid "Below are the available ``compat`` options:" +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:52 +msgid ":doc:`json_escape_forward_slash <./compat/json_escape_forward_slash>`" +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:53 +msgid ":doc:`yaml_pretty_multiline <./compat/yaml_pretty_multiline>`" +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:54 +msgid ":doc:`fiber_channel_close_mode <./compat/fiber_channel_close_mode>`" +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:55 +msgid ":doc:`box_cfg_replication_sync_timeout <./compat/box_cfg_replication_sync_timeout>`" +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:56 +msgid ":doc:`sql_seq_scan_default <./compat/sql_seq_scan_default>`" +msgstr "" + +#: ../../doc/reference/reference_lua/compat.rst:57 +msgid ":doc:`fiber_slice_default <./compat/fiber_slice_default>`" +msgstr "" diff --git a/locale/en/reference/reference_lua/compat/box_cfg_replication_sync_timeout.pot b/locale/en/reference/reference_lua/compat/box_cfg_replication_sync_timeout.pot new file mode 100644 index 0000000000..bae41bc3bd --- /dev/null +++ b/locale/en/reference/reference_lua/compat/box_cfg_replication_sync_timeout.pot @@ -0,0 +1,100 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/compat/box_cfg_replication_sync_timeout.rst:4 +msgid "Default value for replication_sync_timeout" +msgstr "" + +#: ../../doc/reference/reference_lua/compat/box_cfg_replication_sync_timeout.rst:6 +msgid "Having a non-zero :ref:`replication_sync_timeout ` gives a user the false assumption that the ``box.cfg{replication = ...}`` call returns only when the configured node is synced with all the other nodes. This is mostly true for the big ``replication_sync_timeout`` values, but it is not 100% guaranteed. In other words, a user still has to check if the node is synced, or the sync just timed out. Besides, while ``replication_sync_timeout`` is ticking, you cannot reconfigure ``box`` with another ``box.cfg`` call, which hardens reconfiguration." +msgstr "" + +#: ../../doc/reference/reference_lua/compat/box_cfg_replication_sync_timeout.rst:11 +msgid "It is decided to set the ``replication_sync_timeout`` to zero by default." +msgstr "" + +#: ../../doc/reference/reference_lua/compat/box_cfg_replication_sync_timeout.rst:14 +msgid "Old and new behavior" +msgstr "" + +#: ../../doc/reference/reference_lua/compat/box_cfg_replication_sync_timeout.rst:16 +msgid "The ``compat`` module allows you to choose between" +msgstr "" + +#: ../../doc/reference/reference_lua/compat/box_cfg_replication_sync_timeout.rst:18 +msgid "the old behavior: ``box.cfg.replication_sync_timeout`` is 300 seconds by default" +msgstr "" + +#: ../../doc/reference/reference_lua/compat/box_cfg_replication_sync_timeout.rst:20 +msgid "and the new behavior:``box.cfg.replication_sync_timeout`` is 0 by default." +msgstr "" + +#: ../../doc/reference/reference_lua/compat/box_cfg_replication_sync_timeout.rst:22 +msgid "It is important to set the desired behavior before the initial ``box.cfg{}`` call to take effect for it." +msgstr "" + +#: ../../doc/reference/reference_lua/compat/box_cfg_replication_sync_timeout.rst:24 +msgid "tarantool> compat.box_cfg_replication_sync_timeout = 'new'\n" +"---\n" +"...\n" +"tarantool> box.cfg{}\n" +"---\n" +"...\n" +"tarantool> box.cfg.replication_sync_timeout\n" +"---\n" +"- 0\n" +"...\n" +"tarantool> compat.box_cfg_replication_sync_timeout = 'old'\n" +"---\n" +"- error: 'builtin/box/load_cfg.lua:253: The compat option ''box_cfg_replication_sync_timeout''\n" +" takes effect only before the initial box.cfg() call'\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/compat/box_cfg_replication_sync_timeout.rst:42 +msgid "A fresh Tarantool run:" +msgstr "" + +#: ../../doc/reference/reference_lua/compat/box_cfg_replication_sync_timeout.rst:44 +msgid "tarantool> compat.box_cfg_replication_sync_timeout = 'old'\n" +"---\n" +"...\n" +"tarantool> box.cfg{}\n" +"---\n" +"...\n" +"tarantool> box.cfg.replication_sync_timeout\n" +"---\n" +"- 300\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/compat/box_cfg_replication_sync_timeout.rst:58 +msgid "Known compatibility issues" +msgstr "" + +#: ../../doc/reference/reference_lua/compat/box_cfg_replication_sync_timeout.rst:60 +msgid "At this point, no incompatible modules are known." +msgstr "" + +#: ../../doc/reference/reference_lua/compat/box_cfg_replication_sync_timeout.rst:63 +msgid "Detecting issues in your codebase" +msgstr "" + +#: ../../doc/reference/reference_lua/compat/box_cfg_replication_sync_timeout.rst:65 +msgid "We expect issues with a user assuming that the node is not in the orphan state (``box.info.status ~= \"orphan\"``) after the ``box.cfg{replication=...}`` call returns. This is not true with the new behaviour. To simulate the old behavior, one may add a ``box.ctl.wait_rw()`` call after the ``box.cfg{}`` call. ``box.ctl.wait_rw()`` returns only when the node becomes writable, and hence is not an orphan." +msgstr "" diff --git a/locale/en/reference/reference_lua/compat/compat_tutorial.pot b/locale/en/reference/reference_lua/compat/compat_tutorial.pot new file mode 100644 index 0000000000..5de71e5097 --- /dev/null +++ b/locale/en/reference/reference_lua/compat/compat_tutorial.pot @@ -0,0 +1,315 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-17 14:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/compat/compat_tutorial.rst:4 +msgid "Tutorial: Module compat" +msgstr "" + +#: ../../doc/reference/reference_lua/compat/compat_tutorial.rst:6 +msgid "This tutorial covers the following ``compat`` module API and its usage:" +msgstr "" + +#: ../../doc/reference/reference_lua/compat/compat_tutorial.rst:12 +msgid "Listing options" +msgstr "" + +#: ../../doc/reference/reference_lua/compat/compat_tutorial.rst:14 +msgid "The options list is serialized in the interactive console with additional details for user convenience:" +msgstr "" + +#: ../../doc/reference/reference_lua/compat/compat_tutorial.rst:16 +msgid "All non-obsolete options in order new > old > default." +msgstr "" + +#: ../../doc/reference/reference_lua/compat/compat_tutorial.rst:18 +msgid "Serialization returns array-like table with tables ``{