Skip to content

Commit b9ee8bb

Browse files
izmalklenkis
authored andcommitted
Multiple bug fixes
Fix gh-825 feedback: Submodule box.index Fix gh-857 feedback: Модель данных Fix gh-856 feedback: Access control Fix gh-853 feedback: Functions for transaction management Fix gh-848 feedback: Submodule box.index Fix gh-834 Использование бинарного пакета Fix gh-867 feedback: Access control Fix gh-866 feedback: Триггеры Fix gh-865 feedback: Триггеры Fix gh-864 feedback: Рекомендации по Lua-синтаксису Fix gh-861 feedback: Модуль http Fix gh-869 Сonfusing wording in box.backup page Fix gh-860 vshard.router/storage.sync miss return value documentation Fix gh-830 Improve documentation on fibers Fix gh-850 Add more info about connectors
1 parent fc6de68 commit b9ee8bb

File tree

10 files changed

+78
-51
lines changed

10 files changed

+78
-51
lines changed

doc/1.10/book/admin/backups.rst

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,9 @@ backup.start() and backup.stop()
2121

2222
Two functions are helpful for backups in certain situations.
2323

24-
``box.backup.start()`` informs the server that some activities
25-
that might interfer with backup should be suspended -- suspend checkpointing,
26-
suspend Tarantool garbage collection, and effectively enter read-only mode.
27-
28-
Later ``box.backup.stop()`` informs the server that
29-
normal operations may resume. Starting with Tarantool 1.10.1 there is a new
30-
optional argument, ``box.backup.start(n)``, where ``n`` indicates the checkpoint
31-
to use relative to the latest checkpoint -- for example ``n = 0`` means
32-
"backup will be based on the latest checkpoint", ``n = 1`` means "backup will
33-
be based on the first checkpoint before the latest checkpoint
34-
(counting backwards)", and so on,
35-
and the default value for ``n`` is zero.
36-
37-
``box.backup.start()`` returns a table with the names of snapshot
38-
and vinyl files that should be copied. Example:
24+
``box.backup.start()`` informs the server that activities related to the removal
25+
of outdated backups must be suspended and returns a table with the names of
26+
snapshot and vinyl files that should be copied. Example:
3927

4028
.. code-block:: tarantoolsession
4129
@@ -47,6 +35,21 @@ and vinyl files that should be copied. Example:
4735
- ./513/0/00000000000000000002.run
4836
...
4937
38+
.. NOTE::
39+
40+
To guarantee an opportunity to copy these files Tarantool will not delete them.
41+
But there will be no read-only mode and checkpoints will continue by schedule
42+
as usual.
43+
44+
Later ``box.backup.stop()`` informs the server that
45+
normal operations may resume. Starting with Tarantool 1.10.1 there is a new
46+
optional argument, ``box.backup.start(n)``, where ``n`` indicates the checkpoint
47+
to use relative to the latest checkpoint -- for example ``n = 0`` means
48+
"backup will be based on the latest checkpoint", ``n = 1`` means "backup will
49+
be based on the first checkpoint before the latest checkpoint
50+
(counting backwards)", and so on,
51+
and the default value for ``n`` is zero.
52+
5053
.. _admin-backups-hot_backup_memtx:
5154

5255
--------------------------------------------------------------------------------

doc/1.10/book/box/authentication.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ the current user, by default, is '**guest**'.
3939
If the connection is using an :ref:`admin-console port <admin-security>`,
4040
the current user is '**admin**'.
4141
When executing a :ref:`Lua initialization script <index-init_label>`,
42-
the current user is also ‘admin’.
42+
the current user is also ‘**admin**’.
4343

4444
The current user name can be found with :ref:`box.session.user() <box_session-user>`.
4545

@@ -96,9 +96,9 @@ choose long unobvious passwords, but it is ultimately up to the users to choose
9696
or change their own passwords.
9797

9898
There are two functions for managing passwords in Tarantool:
99-
:ref:`box.schema.user.password() <box_schema-user_password>` for changing
100-
a user's password and :ref:`box.schema.user.passwd() <box_schema-user_passwd>`
101-
for getting a hash-password.
99+
:ref:`box.schema.user.passwd() <box_schema-user_passwd>` for changing a user's password and
100+
:ref:`box.schema.user.password() <box_schema-user_password>` for getting a hash
101+
of a user's password.
102102

103103
.. _authentication-owners_privileges:
104104

@@ -112,8 +112,8 @@ spaces, indexes, users, roles, sequences, and functions.
112112

113113
The **owner** of a database object is the user who created it.
114114
The owner of the database itself, and the owner of objects that
115-
are created initially -- the system spaces and the default users --
116-
is 'admin'.
115+
are created initially (the system spaces and the default users)
116+
is '**admin**'.
117117

118118
Owners automatically have **privileges** for what they create.
119119
They can share these privileges with other users or with roles,

doc/1.10/book/box/box_index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Below is a list of all ``box.index`` functions and members.
133133
134134
.. _box_index-index_pairs:
135135

136-
.. method:: pairs([key [, iterator-type]])
136+
.. method:: pairs([key [,{iterator = iterator-type}]])
137137

138138
Search for a tuple or a set of tuples via the given index,
139139
and allow iterating over one tuple at a time.
@@ -750,7 +750,7 @@ Below is a list of all ``box.index`` functions and members.
750750
:param scalar/table key: values to be matched against the index key
751751
:param iterator: comparison method
752752

753-
:return: the number of matching index keys.
753+
:return: the number of matching tuples.
754754
:rtype: number
755755

756756
**Example:**

doc/1.10/book/box/box_txn_management.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Below is a list of all functions for transaction management.
7777
| :ref:`box.on_rollback() | Define a trigger that will be |
7878
| <box-on_rollback>` | activated by ``box.rollback`` |
7979
+--------------------------------------+---------------------------------+
80-
| :ref:`is_in_txn() | State whether a transaction is |
80+
| :ref:`box.is_in_txn() | State whether a transaction is |
8181
| <box-is_in_txn>` | in progress |
8282
+--------------------------------------+---------------------------------+
8383

doc/1.10/book/box/data_model.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Any given tuple may have any number of fields, and the fields may be of
4949
different :ref:`types <index-box_data-types>`.
5050
The identifier of a field is the field's number, base 1
5151
(in Lua and other 1-based languages) or base 0 (in PHP or C/C++).
52-
For example, “1” or "0" can be used in some contexts to refer to the first
52+
For example, ``1`` or ``0`` can be used in some contexts to refer to the first
5353
field of a tuple.
5454

5555
Tuples in Tarantool are stored as

doc/1.10/book/box/triggers.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ There are four types of triggers in Tarantool:
1414
when a session begins or ends,
1515

1616
* :ref:`authentication triggers <box_session-on_auth>`, which are
17-
executed during authentication, and
17+
executed during authentication,
1818

1919
* :ref:`replace triggers <box_space-on_replace>`, which are for database
20-
events.
20+
events, and
2121

2222
* :ref:`transaction triggers <box-on_commit>`, which are executed
2323
during commit or rollback.
@@ -73,7 +73,7 @@ To get a list of triggers, you can use:
7373
* on_connect() – with no arguments – to return a table of all connect-trigger functions;
7474
* on_auth() to return all authentication-trigger functions;
7575
* on_disconnect() to return all disconnect-trigger functions;
76-
* on_replace() to return all replace-trigger functions made for on_replace().
76+
* on_replace() to return all replace-trigger functions made for on_replace();
7777
* before_replace() to return all replace-trigger functions made for before_replace().
7878

7979
**Example**

doc/1.10/book/connectors/__python.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
Python
33
=====================================================================
44

5+
`tarantool-python <http://github.com/tarantool/tarantool-python>`_
6+
is the official Python connector for Tarantool. It is not supplied as part
7+
of the Tarantool repository and must be installed separately (see below for details).
8+
59
Here is a complete Python program that inserts ``[99999,'Value','Value']`` into
610
space ``examples`` via the high-level Python API.
711

@@ -18,7 +22,9 @@ To prepare, paste the code into a file named :file:`example.py` and install
1822
the ``tarantool-python`` connector with either :samp:`pip install tarantool\>0.4`
1923
to install in :file:`/usr` (requires **root** privilege) or
2024
:samp:`pip install tarantool\>0.4 --user` to install in :file:`~` i.e. user's
21-
default directory. Before trying to run, check that the server instance is :ref:`listening <cfg_basic-listen>` at
25+
default directory.
26+
27+
Before trying to run, check that the server instance is :ref:`listening <cfg_basic-listen>` at
2228
``localhost:3301`` and that the space ``examples`` exists, as
2329
:ref:`described earlier <index-connector_setting>`.
2430
To run the program, say :samp:`python example.py`. The program will connect
@@ -32,3 +38,9 @@ necessary for good practice. For that, please see
3238
For an example of using Python API with
3339
`queue managers for Tarantool <https://github.com/tarantool/queue>`_, see
3440
`queue-python <https://github.com/tarantool/queue-python>`_ project at GitHub.
41+
42+
Also there are several community-driven Python connectors:
43+
44+
* `asynctnt <https://github.com/igorcoding/asynctnt>`_ with asyncio support
45+
* `aiotarantool <https://github.com/shveenkov/aiotarantool>`_ also with asyncio support
46+
* `gtarantool <https://github.com/shveenkov/gtarantool>`_ with gevent support **no active maintenance**

doc/1.10/reference/reference_lua/fiber.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,12 @@ recommended.
399399

400400
.. NOTE::
401401

402-
This exception cannot be caught by pcall or xpcall.
402+
Even if you catch the exception, the fiber will remain cancelled.
403+
Most types of calls will check ``fiber.testcancel()``.
404+
However, some functions (``id``, ``status``, ``join`` etc.) will return no error.
405+
We recommend application developers to implement occasional checks with
406+
:ref:`fiber.testcancel() <fiber-testcancel>` and to end fiber's execution
407+
as soon as possible in case it has been cancelled.
403408

404409
**Example:**
405410

@@ -515,7 +520,7 @@ recommended.
515520

516521
Cancel a fiber. Running and suspended fibers can be cancelled.
517522
After a fiber has been cancelled, attempts to operate on it will
518-
cause errors, for example :ref:`fiber_object:id() <fiber_object-id>`
523+
cause errors, for example :ref:`fiber_object:name() <fiber_object-name_get>`
519524
will cause ``error: the fiber is dead``.
520525

521526
:param fiber_object: generally this is an object referenced in the return

doc/1.10/reference/reference_rock/vshard/index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,6 +1477,9 @@ Router public API
14771477

14781478
:param timeout: a timeout, in seconds
14791479

1480+
:return: ``true`` if the dataset was synchronized successfully; or ``nil`` and
1481+
``err`` explaining why the dataset cannot be synchronized.
1482+
14801483
.. _router_api-discovery_wakeup:
14811484

14821485
.. function:: vshard.router.discovery_wakeup()
@@ -1753,6 +1756,9 @@ Storage public API
17531756

17541757
:param timeout: a timeout, in seconds
17551758

1759+
:return: ``true`` if the dataset was synchronized successfully; or ``nil`` and
1760+
``err`` explaining why the dataset cannot be synchronized.
1761+
17561762
.. _storage_api-bucket_pin:
17571763

17581764
.. function:: vshard.storage.bucket_pin(bucket_id)

locale/ru/LC_MESSAGES/doc.po

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22677,12 +22677,12 @@ msgstr "полям не нужны имена."
2267722677
msgid ""
2267822678
"Any given tuple may have any number of fields, and the fields may be of different :ref:"
2267922679
"`types <index-box_data-types>`. The identifier of a field is the field's number, base 1 (in "
22680-
"Lua and other 1-based languages) or base 0 (in PHP or C/C++). For example, “1” or \"0\" can "
22680+
"Lua and other 1-based languages) or base 0 (in PHP or C/C++). For example, ``1`` or ``0`` can "
2268122681
"be used in some contexts to refer to the first field of a tuple."
2268222682
msgstr ""
2268322683
"В любом кортеже может быть любое количество полей, и это могут быть поля разных :ref:`типов "
2268422684
"<index-box_data-types>`. Идентификатором поля является его номер, начиная с 1 (в Lua и "
22685-
"других языках с индексацией с 1) или с 0 (в PHP или C/C++). Например, “1” или \"0\" могут "
22685+
"других языках с индексацией с 1) или с 0 (в PHP или C/C++). Например, ``1`` или ``0`` могут "
2268622686
"использоваться в некоторых контекстах для обозначения первого поля кортежа."
2268722687

2268822688
#: ../doc/1.10/book/box/data_model.rst:89
@@ -26014,16 +26014,16 @@ msgstr ""
2601426014
#: ../doc/1.10/book/box/triggers.rst:50
2601526015
msgid ""
2601626016
":ref:`authentication triggers <box_session-on_auth>`, which are executed during "
26017-
"authentication, and"
26017+
"authentication,"
2601826018
msgstr ""
2601926019
":ref:`триггеры для обработки аутентификации <box_session-on_auth>`, которые выполняются при "
26020-
"аутентификации, и"
26020+
"аутентификации,"
2602126021

2602226022
#: ../doc/1.10/book/box/triggers.rst:53
26023-
msgid ":ref:`replace triggers <box_space-on_replace>`, which are for database events."
26023+
msgid ":ref:`replace triggers <box_space-on_replace>`, which are for database events, and"
2602426024
msgstr ""
2602526025
":ref:`триггеры для обработки замены <box_space-on_replace>`, которые предназначены для "
26026-
"событий в базе данных."
26026+
"событий в базе данных, и"
2602726027

2602826028
#: ../doc/1.10/book/box/triggers.rst:56
2602926029
msgid ""
@@ -26159,10 +26159,10 @@ msgid "on_disconnect() to return all disconnect-trigger functions;"
2615926159
msgstr "on_disconnect(), чтобы вернуть все триггерные функции для обработки отключений;"
2616026160

2616126161
#: ../doc/1.10/book/box/triggers.rst:110
26162-
msgid "on_replace() to return all replace-trigger functions made for on_replace()."
26162+
msgid "on_replace() to return all replace-trigger functions made for on_replace();"
2616326163
msgstr ""
2616426164
"on_replace(), чтобы вернуть все триггерные функции для обработки замены, сделанные для "
26165-
"on_replace()."
26165+
"on_replace();"
2616626166

2616726167
#: ../doc/1.10/book/box/triggers.rst:111
2616826168
msgid "before_replace() to return all replace-trigger functions made for before_replace()."
@@ -28134,8 +28134,8 @@ msgstr ""
2813428134
" > })"
2813528135

2813628136
#: ../doc/1.10/book/getting_started/using_binary.rst:145
28137-
msgid "Create the first :ref:`index <index-box_index>` (named ``'primary'``):"
28138-
msgstr "Создайте первый :ref:`индекс <index-box_index>` (с именем``'primary'``):"
28137+
msgid "Create the first :ref:`index <index-box_index>` (named ``primary``):"
28138+
msgstr "Создайте первый :ref:`индекс <index-box_index>` (с именем``primary``):"
2813928139

2814028140
#: ../doc/1.10/book/getting_started/using_binary.rst:147
2814128141
msgid ""
@@ -28155,9 +28155,9 @@ msgstr "Это первичный индекс по полю ``id`` в кажд
2815528155

2815628156
#: ../doc/1.10/book/getting_started/using_binary.rst:156
2815728157
#: ../doc/1.10/book/getting_started/using_docker.rst:159
28158-
msgid "Insert three :ref:`tuples <index-box_tuple>` (our name for \"records\") into the space:"
28158+
msgid "Insert three :ref:`tuples <index-box_tuple>` (our name for records) into the space:"
2815928159
msgstr ""
28160-
"Вставьте в созданный спейс три :ref:`кортежа <index-box_tuple>` (наш термин для «записей»):"
28160+
"Вставьте в созданный спейс три :ref:`кортежа <index-box_tuple>` (наш термин для записей):"
2816128161

2816228162
#: ../doc/1.10/book/getting_started/using_binary.rst:159
2816328163
msgid ""
@@ -28170,8 +28170,8 @@ msgstr ""
2817028170
"tarantool> s:insert{3, 'Ace of Base', 1993}"
2817128171

2817228172
#: ../doc/1.10/book/getting_started/using_binary.rst:165
28173-
msgid "To select a tuple using the ``'primary'`` index, say:"
28174-
msgstr "Для выборки кортежей по первичному индексу ``'primary'`` выполните команду:"
28173+
msgid "To select a tuple using the ``primary`` index, say:"
28174+
msgstr "Для выборки кортежей по первичному индексу ``primary`` выполните команду:"
2817528175

2817628176
#: ../doc/1.10/book/getting_started/using_binary.rst:167
2817728177
msgid "tarantool> s:select{3}"
@@ -28269,8 +28269,8 @@ msgstr ""
2826928269
"..."
2827028270

2827128271
#: ../doc/1.10/book/getting_started/using_binary.rst:217
28272-
msgid "To add a secondary index based on the ``'band_name'`` field, say:"
28273-
msgstr "Для добавления вторичного индекса по полю ``'band_name'`` используйте эту команду:"
28272+
msgid "To add a secondary index based on the ``band_name`` field, say:"
28273+
msgstr "Для добавления вторичного индекса по полю ``band_name`` используйте эту команду:"
2827428274

2827528275
#: ../doc/1.10/book/getting_started/using_binary.rst:219
2827628276
msgid ""
@@ -28285,8 +28285,8 @@ msgstr ""
2828528285
" > })"
2828628286

2828728287
#: ../doc/1.10/book/getting_started/using_binary.rst:226
28288-
msgid "To select tuples using the ``'secondary'`` index, say:"
28289-
msgstr "Для выборки кортежей по вторичному индексу ``'secondary'`` выполните команду:"
28288+
msgid "To select tuples using the ``secondary`` index, say:"
28289+
msgstr "Для выборки кортежей по вторичному индексу ``secondary`` выполните команду:"
2829028290

2829128291
#: ../doc/1.10/book/getting_started/using_binary.rst:228
2829228292
msgid ""
@@ -45013,7 +45013,7 @@ msgstr "Способы ссылки на объект"
4501345013

4501445014
#: ../doc/1.10/reference/lua_tips.rst:56
4501545015
msgid "First, there are three **object reference variations**:"
45016-
msgstr "Во-первых, есть пять *способов ссылки на объект*:"
45016+
msgstr "Во-первых, есть три **способа ссылки на объект**:"
4501745017

4501845018
#: ../doc/1.10/reference/lua_tips.rst:58
4501945019
msgid ""
@@ -45039,7 +45039,7 @@ msgid ""
4503945039
"this is a matter of user preference and all the variations exist in the wild."
4504045040
msgstr ""
4504145041
"Для примеров в документации, как правило, используется вариант синтаксиса №1, например \":"
45042-
"samp:`box.space.{tester}:`\". Но вы можете с тем же успехом пользоваться любым из пяти "
45042+
"samp:`box.space.{tester}:`\". Но вы можете с тем же успехом пользоваться любым из трех "
4504345043
"описанных выше вариантов."
4504445044

4504545045
#: ../doc/1.10/reference/lua_tips.rst:72
@@ -51908,6 +51908,7 @@ msgstr "расположение, например 'https://tarantool.org/doc'"
5190851908
msgid "optional initial message, for example 'My text string!'"
5190951909
msgstr "необязательное начальное сообщение, например 'My text string!'"
5191051910

51911+
#, fuzzy
5191151912
#: ../doc/1.10/reference/reference_lua/http.rst:107
5191251913
msgid ""
5191351914
"table of connection options, with any of these components: * ``timeout`` - number of "

0 commit comments

Comments
 (0)