diff --git a/doc/dev_guide/internals/box_protocol.rst b/doc/dev_guide/internals/box_protocol.rst index e50fd5ff00..5f50babdcd 100644 --- a/doc/dev_guide/internals/box_protocol.rst +++ b/doc/dev_guide/internals/box_protocol.rst @@ -30,59 +30,62 @@ or to avoid repetitive parsing by the server. .. rst-class:: left-align-column-1 .. rst-class:: left-align-column-2 - +--------------------------------------------------+------------------------+ - | Section | Description | - +==================================================+========================+ - | :ref:`Symbols and terms | Notation of binary | - | ` | protocol | - +--------------------------------------------------+------------------------+ - | :ref:`Header and body | Header of a request | - | ` | | - +--------------------------------------------------+------------------------+ - | Requests: | Body of a request | - | |br|:ref:`IPROTO_SELECT ` | | - | |br|:ref:`IPROTO_INSERT ` | | - | |br|:ref:`IPROTO_REPLACE ` | | - | |br|:ref:`IPROTO_UPDATE ` | | - | |br|:ref:`IPROTO_DELETE ` | | - | |br|:ref:`IPROTO_CALL_16 ` | | - | |br|:ref:`IPROTO_AUTH ` | | - | |br|:ref:`IPROTO_EVAL ` | | - | |br|:ref:`IPROTO_UPSERT ` | | - | |br|:ref:`IPROTO_CALL ` | | - | |br|:ref:`IPROTO_EXECUTE ` | | - | |br|:ref:`IPROTO_NOP ` | | - | |br|:ref:`IPROTO_PREPARE ` | | - | |br|:ref:`IPROTO_PING ` | | - | |br|:ref:`IPROTO_JOIN ` | | - | |br|:ref:`IPROTO_SUBSCRIBE ` | | - | |br|:ref:`IPROTO_VOTE_DEPRECATED | | - | ` | | - | |br|:ref:`IPROTO_VOTE ` | | - | |br|:ref:`IPROTO_FETCH_SNAPSHOT | | - | ` | | - | |br|:ref:`IPROTO_REGISTER ` | | - +--------------------------------------------------+------------------------+ - | :ref:`Responses if no error and no | Responses for no SQL | - | SQL ` | | - +--------------------------------------------------+------------------------+ - | :ref:`Responses for errors | Responses for errors | - | ` | | - +--------------------------------------------------+------------------------+ - | :ref:`Responses for SQL | Responses for SQL | - | ` | | - +--------------------------------------------------+------------------------+ - | :ref:`Authentication | Authentication after | - | ` | connection | - +--------------------------------------------------+------------------------+ - | :ref:`Replication | Replication request | - | ` | | - +--------------------------------------------------+------------------------+ - | :ref:`Illustration ` | Illustration of use | - +--------------------------------------------------+------------------------+ - | :ref:`XLOG/SNAP ` | Format of .xlog | - | | and .snap files | - +--------------------------------------------------+------------------------+ + +----------------------------------------------------+------------------------+ + | Section | Description | + +====================================================+========================+ + | :ref:`Symbols and terms | Notation of binary | + | ` | protocol | + +----------------------------------------------------+------------------------+ + | :ref:`Header and body | Header of a request | + | ` | | + +----------------------------------------------------+------------------------+ + | Requests: | Body of a request | + | |br|:ref:`IPROTO_SELECT ` | | + | |br|:ref:`IPROTO_INSERT ` | | + | |br|:ref:`IPROTO_REPLACE ` | | + | |br|:ref:`IPROTO_UPDATE ` | | + | |br|:ref:`IPROTO_DELETE ` | | + | |br|:ref:`IPROTO_CALL_16 ` | | + | |br|:ref:`IPROTO_AUTH ` | | + | |br|:ref:`IPROTO_EVAL ` | | + | |br|:ref:`IPROTO_UPSERT ` | | + | |br|:ref:`IPROTO_CALL ` | | + | |br|:ref:`IPROTO_EXECUTE ` | | + | |br|:ref:`IPROTO_NOP ` | | + | |br|:ref:`IPROTO_PREPARE ` | | + | |br|:ref:`IPROTO_PING ` | | + | |br|:ref:`IPROTO_JOIN ` | | + | |br|:ref:`IPROTO_SUBSCRIBE ` | | + | |br|:ref:`IPROTO_VOTE_DEPRECATED | | + | ` | | + | |br|:ref:`IPROTO_VOTE ` | | + | |br|:ref:`IPROTO_FETCH_SNAPSHOT | | + | ` | | + | |br|:ref:`IPROTO_REGISTER ` | | + | |br|:ref:`IPROTO_BEGIN ` | | + | |br|:ref:`IPROTO_COMMIT ` | | + | |br|:ref:`IPROTO_ROLLBACK ` | | + +----------------------------------------------------+------------------------+ + | :ref:`Responses if no error and no | Responses for no SQL | + | SQL ` | | + +----------------------------------------------------+------------------------+ + | :ref:`Responses for errors | Responses for errors | + | ` | | + +----------------------------------------------------+------------------------+ + | :ref:`Responses for SQL | Responses for SQL | + | ` | | + +----------------------------------------------------+------------------------+ + | :ref:`Authentication | Authentication after | + | ` | connection | + +----------------------------------------------------+------------------------+ + | :ref:`Replication | Replication request | + | ` | | + +----------------------------------------------------+------------------------+ + | :ref:`Illustration ` | Illustration of use | + +----------------------------------------------------+------------------------+ + | :ref:`XLOG/SNAP ` | Format of .xlog | + | | and .snap files | + +----------------------------------------------------+------------------------+ .. _box_protocol-notation: @@ -130,8 +133,11 @@ The IPROTO constants that identify requests that we will mention in this section IPROTO_EXECUTE=0x0b IPROTO_NOP=0x0c IPROTO_PREPARE=0x0d - IPROTO_CONFIRM=0x28 - IPROTO_ROLLBACK=0x29 + IPROTO_BEGIN=0x0e + IPROTO_COMMIT=0x0f + IPROTO_ROLLBACK=0x10 + IPROTO_RAFT_CONFIRM=0x28 + IPROTO_RAFT_ROLLBACK=0x29 IPROTO_PING=0x40 IPROTO_JOIN=0x41 IPROTO_SUBSCRIBE=0x42 @@ -152,6 +158,7 @@ The IPROTO constants that appear within requests or responses that we will descr IPROTO_TIMESTAMP=0x04 IPROTO_SCHEMA_VERSION=0x05 IPROTO_FLAGS=0x09 + IPROTO_STREAM_ID=0x0a IPROTO_SPACE_ID=0x10 IPROTO_INDEX_ID=0x11 IPROTO_LIMIT=0x12 @@ -244,6 +251,7 @@ It may be useful to compare it with the number of bytes remaining in the packet. IPROTO_REQUEST_TYPE: :samp:`{{MP_UINT unsigned integer}}`, IPROTO_SYNC: :samp:`{{MP_UINT unsigned integer}}`, IPROTO_SCHEMA_VERSION: :samp:`{{MP_UINT unsigned integer}}` + IPROTO_STREAM_ID: :samp:`{{MP_UINT unsigned integer}}` }) **IPROTO_REQUEST_TYPE** or Response-Code-Indicator = 0x00. @@ -265,6 +273,16 @@ be checked if it is absent. In a response header IPROTO_SCHEMA_VERSION is always present, and it is up to the client to check if it has changed. +.. _box_protocol-iproto_stream_id: + +**IPROTO_STREAM_ID** = 0x0a. +An unsigned number that should be unique in every stream. +In requests IPROTO_STREAM_ID is optional and is useful for two things: +ensuring that requests within transactions are done in separate groups, +and ensuring strictly consistent execution of requests (whether or not they are within transactions). +In responses IPROTO_STREAM_ID does not appear. +See :ref:`Binary protocol -- streams `. + Have a look at file `xrow.c `_ function ``xrow_header_encode``, to see how Tarantool encodes the header. @@ -551,8 +569,7 @@ The body is a 2-item map: IPROTO_TUPLE: :samp:`{{MP_ARRAY array of arguments}}` }) -Example: if this is the fifth message, |br| -:samp:`{conn}.:code:`eval('return 5;')` will cause: +Example: if this is the fifth message, :samp:`conn:eval('return 5;')` will cause: .. code-block:: none @@ -647,11 +664,11 @@ The body is a 3-item map: IPROTO_OPTIONS: :samp:`{{MP_ARRAY array}}` }) -Use IPROTO_STMT_ID (0x43) + statement-id (MP_INT) if executing a prepared statement, +Use IPROTO_STMT_ID (0x43) and statement-id (MP_INT) if executing a prepared statement, or use -IPROTO_SQL_TEXT (0x40) + statement-text (MP_STR) if executing an SQL string, then -IPROTO_SQL_BIND (0x41) + array of parameter values to match ? placeholders or -:name placeholders, IPROTO_OPTIONS (0x2b) + array of options (usually empty). +IPROTO_SQL_TEXT (0x40) and statement-text (MP_STR) if executing an SQL string, then +IPROTO_SQL_BIND (0x41) and array of parameter values to match ? placeholders or +:name placeholders, IPROTO_OPTIONS (0x2b) and array of options (usually empty). For example, suppose we prepare a statement with two ? placeholders, and execute with two parameters, thus: |br| @@ -713,12 +730,39 @@ The body is a 1-item map: IPROTO_STMT_ID: :samp:`{{MP_INT integer}}` or IPROTO_SQL_TEXT: :samp:`{{MP_STR string}}` }) -IPROTO_STMT_ID (0x43) + statement-id (MP_INT) if executing a prepared statement +IPROTO_STMT_ID (0x43) and statement-id (MP_INT) if executing a prepared statement or -IPROTO_SQL_TEXT (0x40) + statement-text (string) if executing an SQL string. +IPROTO_SQL_TEXT (0x40) and statement-text (string) if executing an SQL string. Thus the IPROTO_PREPARE map item is the same as the first item of the :ref:`IPROTO_EXECUTE ` body. +.. _box_protocol-begin: + +**IPROTO_BEGIN** = 0x0e. + +This is for starting a transaction. +Typically the header will include IPROTO_STREAM_ID. +The body is: nothing. +See the later section :ref:`Binary protocol -- streams `. + +.. _box_protocol-commit: + +**IPROTO_COMMIT** = 0x0f. + +This is for ending a transaction. +Typically the header will include IPROTO_STREAM_ID. +The body is: nothing. +See the later section :ref:`Binary protocol -- streams `. + +.. _box_protocol-rollback: + +**IPROTO_ROLLBACK** = 0x10. + +This is for ending a transaction. +Typically the header will include IPROTO_STREAM_ID. +The body is: nothing. +See the later section :ref:`Binary protocol -- streams `. + .. _box_protocol-ping: **IPROTO_PING** = 0x40. @@ -757,13 +801,14 @@ Tarantool nodes in :ref:`synchronous replication `. The messages are not supposed to be used by any client applications in their regular connections. -.. _box_protocol-confirm: +.. _box_protocol-raft_confirm: -**IPROTO_CONFIRM** = 0x28 +**IPROTO_RAFT_CONFIRM** = 0x28 This message confirms that the transactions originated from the instance with id = IPROTO_REPLICA_ID have achieved quorum and can be committed, up to and including LSN = IPROTO_LSN. +Prior to Tarantool version 2.10-beta1, IPROTO_RAFT_CONFIRM was called IPROTO_CONFIRM. The body is a 2-item map: @@ -774,7 +819,7 @@ The body is a 2-item map: msgpack(:samp:`{{MP_UINT unsigned integer = size(
) + size()}}`) #
msgpack({ - IPROTO_REQUEST_TYPE: IPROTO_CONFIRM, + IPROTO_REQUEST_TYPE: IPROTO_RAFT_CONFIRM, IPROTO_SYNC: :samp:`{{MP_UINT unsigned integer}}` }) # @@ -783,13 +828,14 @@ The body is a 2-item map: IPROTO_LSN: :samp:`{{MP_INT integer}}` }) -.. _box_protocol-rollback: +.. _box_protocol-raft_rollback: -**IPROTO_ROLLBACK** = 0x29 +**IPROTO_RAFT_ROLLBACK** = 0x29 This message says that the transactions originated from the instance with id = IPROTO_REPLICA_ID couldn't achieve quorum for some reason and should be rolled back, down to LSN = IPROTO_LSN and including it. +Prior to Tarantool version 2.10, IPROTO_RAFT_ROLLBACK was called IPROTO_ROLLBACK. The body is a 2-item map: @@ -800,7 +846,7 @@ The body is a 2-item map: msgpack(:samp:`{{MP_UINT unsigned integer = size(
) + size()}}`) #
msgpack({ - IPROTO_REQUEST_TYPE: IPROTO_ROLLBACK, + IPROTO_REQUEST_TYPE: IPROTO_RAFT_ROLLBACK, IPROTO_SYNC: :samp:`{{MP_UINT unsigned integer}}` }) # @@ -1005,7 +1051,7 @@ If the SQL statement is SELECT or VALUES or PRAGMA, the response contains: }) * :samp:`IPROTO_METADATA: {array of column maps}` = array of column maps, with each column map containing - at least IPROTO_FIELD_NAME (0x00) + MP_STR, and IPROTO_FIELD_TYPE (0x01) + MP_STR. + at least IPROTO_FIELD_NAME (0x00) and MP_STR, and IPROTO_FIELD_TYPE (0x01) and MP_STR. Additionally, if ``sql_full_metadata`` in the :ref:`_session_settings ` system space is TRUE, then the array will have these additional column maps @@ -1014,10 +1060,10 @@ If the SQL statement is SELECT or VALUES or PRAGMA, the response contains: .. code-block:: none - IPROTO_FIELD_COLL (0x02) + MP_STR - IPROTO_FIELD_IS_NULLABLE (0x03) + MP_BOOL - IPROTO_FIELD_IS_AUTOINCREMENT (0x04) + MP_BOOL - IPROTO_FIELD_SPAN (0x05) + MP_STR or MP_NIL + IPROTO_FIELD_COLL (0x02) and MP_STR + IPROTO_FIELD_IS_NULLABLE (0x03) and MP_BOOL + IPROTO_FIELD_IS_AUTOINCREMENT (0x04) and MP_BOOL + IPROTO_FIELD_SPAN (0x05) and MP_STR or MP_NIL * :samp:`IPROTO_DATA:{array of tuples}` = the result set "rows". @@ -1038,7 +1084,6 @@ we could get this response, in the body: IPROTO_FIELD_IS_NULLABLE: false, IPROTO_FIELD_IS_AUTOINCREMENT: true, IPROTO_FIELD_SPAN: nil, - , IPROTO_FIELD_NAME: 'Д', IPROTO_FIELD_TYPE: 'string', IPROTO_FIELD_COLL: 'unicode', @@ -1055,8 +1100,8 @@ If instead we said |br| :code:`conn:prepare([[SELECT dd, дд AS д FROM t1;]])` |br| then we could get almost the same response, but there would be no IPROTO_DATA and there would be two additional items: |br| -``34 00 = IPROTO_BIND_COUNT + MP_UINT = 0`` (there are no parameters to bind), |br| -``33 90 = IPROTO_BIND_METADATA + MP_ARRAY, size 0`` (there are no parameters to bind). +``34 00 = IPROTO_BIND_COUNT and MP_UINT = 0`` (there are no parameters to bind), |br| +``33 90 = IPROTO_BIND_METADATA and MP_ARRAY, size 0`` (there are no parameters to bind). .. cssclass:: highlight .. parsed-literal:: @@ -1072,7 +1117,6 @@ be no IPROTO_DATA and there would be two additional items: |br| IPROTO_FIELD_IS_NULLABLE: false IPROTO_FIELD_IS_AUTOINCREMENT: true IPROTO_FIELD_SPAN: nil, - , IPROTO_FIELD_NAME: 'Д', IPROTO_FIELD_TYPE: 'string', IPROTO_FIELD_COLL: 'unicode', @@ -1169,6 +1213,75 @@ To see how Tarantool handles this, look at `net_box.c `_ function ``netbox_encode_auth``. +.. _box_protocol-streams: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Binary protocol -- streams +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The :ref:`Streams and interactive transactions ` +feature, which was added in Tarantool version +:tarantool-release:`2.10.0-beta1`, allows two things: +sequential processing and interleaving. + +Sequential processing: +With streams there is a guarantee that the server instance will not +handle the next request in a stream until it has completed the previous one. + +Interleaving: +For example, a series of requests can include +"begin for stream #1", "begin for stream #2", +"insert for stream #1", "insert for stream #2", "delete +for stream #1", "commit for stream #1", "rollback for stream #2". + +To make these things possible, +the engine should be :ref:`vinyl ` or :ref:`memtx with mvcc `, and +the client is responsible for ensuring that the stream identifier, +unsigned integer :ref:`IPROTO_STREAM_ID `, is in the request header. +IPROTO_STREAM_ID can be any positive 64-bit number, and should be unique for the connection. +If IPROTO_STREAM_ID equals zero the server instance will ignore it. + +For example, suppose that the client has started a stream with +the :ref:`net.box module ` + +.. code-block:: lua + + net_box = require('net.box') + conn = net_box.connect('localhost:3302') + stream = conn:new_stream() + +At this point the stream object will look like a duplicate of +the conn object, with just one additional member: ``stream_id``. +Now, using stream instead of conn, the client sends two requests: + +.. code-block:: lua + + stream.space.T:insert{1} + stream.space.T:insert{2} + +The header and body of these requests will be the same as in +non-stream :ref:`IPROTO_INSERT ` requests, except +that the header will contain an additional item: IPROTO_STREAM_ID=0x0a +with MP_UINT=0x01. It happens to equal 1 for this example because +each call to conn:new_stream() assigns a new number, starting with 1. + +The client makes stream transactions by sending, in order: +IPROTO_BEGIN, the transaction data-change and query requests, +IPROTO_COMMIT or IPROTO_ROLLBACK. +Each request must contain the same IPROTO_STREAM_ID value. +With streaming there is no need to add +:ref:`IPROTO_FLAGS ` and IPROTO_FLAG_COMMIT +in the header of the last request of a transaction. +Rollback will be automatic if disconnect occurs before commit is possible. + +Thus there are now multiple ways to do transactions: +with net_box and stream:begin() and stream:commit() or stream:rollback() +which cause IPROTO_BEGIN and IPROTO_COMMIT or IPROTO_ROLLBACK with +the current value of stream.stream_id; +with :ref:`box.begin() ` and :ref:`box.commit() ` or :ref:`box.rollback() `; +with SQL and :ref:`START TRANSACTION ` and :ref:`COMMIT ` or :ref:`ROLLBACK `. +An application can use any or all of these ways. + .. _box_protocol-replication: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1274,12 +1387,12 @@ The fields within IPROTO_BALLOT are map items: .. code-block:: none - IPROTO_BALLOT_IS_RO_CFG (0x01) + MP_BOOL - IPROTO_BALLOT_VCLOCK (0x02) + vclock - IPROTO_BALLOT_GC_VCLOCK (0x03) + vclock - IPROTO_BALLOT_IS_RO (0x04) + MP_BOOL - IPROTO_BALLOT_IS_ANON = 0x05 + MP_BOOL - IPROTO_BALLOT_IS_BOOTED = 0x06 + MP_BOOL + IPROTO_BALLOT_IS_RO_CFG (0x01) and MP_BOOL + IPROTO_BALLOT_VCLOCK (0x02) and vclock + IPROTO_BALLOT_GC_VCLOCK (0x03) and vclock + IPROTO_BALLOT_IS_RO (0x04) and MP_BOOL + IPROTO_BALLOT_IS_ANON = 0x05 and MP_BOOL + IPROTO_BALLOT_IS_BOOTED = 0x06 and MP_BOOL IPROTO_BALLOT_IS_RO_CFG and IPRO_BALLOT_VCLOCK and IPROTO_BALLOT_GC_VCLOCK and IPROTO_BALLOT_IS_RO were added in version :doc:`2.6.1 `. @@ -1455,7 +1568,7 @@ example: .. code-block:: none - ce 00 00 00 20 MP_UINT = HEADER + BODY SIZE + ce 00 00 00 20 MP_UINT = HEADER AND BODY SIZE 83 MP_MAP, size 3 00 Response-Code-Indicator ce 00 00 00 00 MP_UINT = IPROTO_OK @@ -1474,7 +1587,7 @@ example: .. code-block:: none - ce 00 00 00 3b MP_UINT = HEADER + BODY SIZE + ce 00 00 00 3b MP_UINT = HEADER AND BODY SIZE 83 MP_MAP, size 3 (i.e. 3 items in header) 00 Response-Code-Indicator ce 00 00 80 0a MP_UINT = hexadecimal 800a @@ -1522,17 +1635,17 @@ then tcpdump will show this response, after the header: 32 IPROTO_METADATA 92 MP_ARRAY, size 2 (i.e. 2 columns) 85 MP_MAP, size 5 (i.e. 5 items for column#1) - 00 a2 44 44 IPROTO_FIELD_NAME + 'DD' - 01 a7 69 6e 74 65 67 65 72 IPROTO_FIELD_TYPE + 'integer' - 03 c2 IPROTO_FIELD_IS_NULLABLE + false - 04 c3 IPROTO_FIELD_IS_AUTOINCREMENT + true - 05 c0 PROTO_FIELD_SPAN + nil + 00 a2 44 44 IPROTO_FIELD_NAME and 'DD' + 01 a7 69 6e 74 65 67 65 72 IPROTO_FIELD_TYPE and 'integer' + 03 c2 IPROTO_FIELD_IS_NULLABLE and false + 04 c3 IPROTO_FIELD_IS_AUTOINCREMENT and true + 05 c0 PROTO_FIELD_SPAN and nil 85 MP_MAP, size 5 (i.e. 5 items for column#2) - 00 a2 d0 94 IPROTO_FIELD_NAME + 'Д' upper case - 01 a6 73 74 72 69 6e 67 IPROTO_FIELD_TYPE + 'string' - 02 a7 75 6e 69 63 6f 64 65 IPROTO_FIELD_COLL + 'unicode' - 03 c3 IPROTO_FIELD_IS_NULLABLE + true - 05 a4 d0 b4 d0 b4 IPROTO_FIELD_SPAN + 'дд' lower case + 00 a2 d0 94 IPROTO_FIELD_NAME and 'Д' upper case + 01 a6 73 74 72 69 6e 67 IPROTO_FIELD_TYPE and 'string' + 02 a7 75 6e 69 63 6f 64 65 IPROTO_FIELD_COLL and 'unicode' + 03 c3 IPROTO_FIELD_IS_NULLABLE and true + 05 a4 d0 b4 d0 b4 IPROTO_FIELD_SPAN and 'дд' lower case 30 IPROTO_DATA 92 MP_ARRAY, size 2 92 MP_ARRAY, size 2 @@ -1544,10 +1657,19 @@ then tcpdump will show this response, after the header: Byte code for the SQL PREPARE example. If we said |br| :code:`conn:prepare([[SELECT dd, дд AS д FROM t1;]])` |br| -then tcpdump would should show almost the same response, but there would -be no IPROTO_DATA and there would be two additional items: |br| -:code:`34 00 = IPROTO_BIND_COUNT + MP_UINT = 0` (there are no parameters to bind), |br| -:code:`33 90 = IPROTO_BIND_METADATA + MP_ARRAY`, size 0 (there are no parameters to bind). +then tcpdump would show almost the same response, but there would +be no IPROTO_DATA. Instead, additional items will appear: + +.. code-block:: none + + 34 IPROTO_BIND_COUNT + 00 MP_UINT = 0 + + 33 IPROTO_BIND_METADATA + 90 MP_ARRAY, size 0 + +``MP_UINT = 0`` and ``MP_ARRAY`` has size 0 because there are no parameters to bind. +Full output: .. code-block:: none @@ -1561,17 +1683,17 @@ be no IPROTO_DATA and there would be two additional items: |br| 32 IPROTO_METADATA 92 MP_ARRAY, size 2 (i.e. 2 columns) 85 MP_MAP, size 5 (i.e. 5 items for column#1) - 00 a2 44 44 IPROTO_FIELD_NAME + 'DD' - 01 a7 69 6e 74 65 67 65 72 IPROTO_FIELD_TYPE + 'integer' - 03 c2 IPROTO_FIELD_IS_NULLABLE + false - 04 c3 IPROTO_FIELD_IS_AUTOINCREMENT + true - 05 c0 PROTO_FIELD_SPAN + nil + 00 a2 44 44 IPROTO_FIELD_NAME and 'DD' + 01 a7 69 6e 74 65 67 65 72 IPROTO_FIELD_TYPE and 'integer' + 03 c2 IPROTO_FIELD_IS_NULLABLE and false + 04 c3 IPROTO_FIELD_IS_AUTOINCREMENT and true + 05 c0 PROTO_FIELD_SPAN and nil 85 MP_MAP, size 5 (i.e. 5 items for column#2) - 00 a2 d0 94 IPROTO_FIELD_NAME + 'Д' upper case - 01 a6 73 74 72 69 6e 67 IPROTO_FIELD_TYPE + 'string' - 02 a7 75 6e 69 63 6f 64 65 IPROTO_FIELD_COLL + 'unicode' - 03 c3 IPROTO_FIELD_IS_NULLABLE + true - 05 a4 d0 b4 d0 b4 IPROTO_FIELD_SPAN + 'дд' lower case + 00 a2 d0 94 IPROTO_FIELD_NAME and 'Д' upper case + 01 a6 73 74 72 69 6e 67 IPROTO_FIELD_TYPE and 'string' + 02 a7 75 6e 69 63 6f 64 65 IPROTO_FIELD_COLL and 'unicode' + 03 c3 IPROTO_FIELD_IS_NULLABLE and true + 05 a4 d0 b4 d0 b4 IPROTO_FIELD_SPAN and 'дд' lower case Byte code for the heartbeat example. The master might send this body: diff --git a/locale/ru/LC_MESSAGES/book/app_server/luajit_memprof.po b/locale/ru/LC_MESSAGES/book/app_server/luajit_memprof.po index 168236c96c..16fcf77f02 100644 --- a/locale/ru/LC_MESSAGES/book/app_server/luajit_memprof.po +++ b/locale/ru/LC_MESSAGES/book/app_server/luajit_memprof.po @@ -1,34 +1,46 @@ msgid "LuaJIT memory profiler" -msgstr "" +msgstr "Профилировщик памяти LuaJIT" msgid "" -"Starting from version :doc:`2.7.1 `, Tarantool has the " -"built‑in module called ``misc.memprof`` that implements the LuaJIT memory " -"profiler (further, *profiler*). The profiler provides a memory allocation " -"report that helps analyse Lua code and find out the places that put the most" -" pressure on the Lua garbage collector (GC)." +"Starting from version :doc:`2.7.1 `, Tarantool has a " +"built‑in module called ``misc.memprof`` that implements a LuaJIT memory " +"profiler (which we will just call *the profiler* in this section). The " +"profiler provides a memory allocation report that helps analyze Lua code and" +" find the places that put the most pressure on the Lua garbage collector " +"(GC)." msgstr "" +"В Tarantool, начиная с версии :doc:`2.7.1 `, есть встроенный" +" модуль ``misc.memprof``, реализующий профилировщик памяти LuaJIT (далее в " +"разделе — *профилировщик*). Профилировщик предоставляет отчет об аллокации " +"памяти, который помогает проанализовать Lua-код и выявить области наибольшей" +" нагрузки на сборщик мусора на Lua." -msgid "Working with profiler" -msgstr "" +msgid "Working with the profiler" +msgstr "Использование профилировщика" -msgid "Usage of the profiler is two-fold:" -msgstr "" +msgid "Usage of the profiler involves two steps:" +msgstr "Работа с профилировщиком состоит из двух этапов:" msgid "" -":ref:`Collect ` a binary profile of allocations, " +":ref:`Collecting ` a binary profile of allocations, " "reallocations, and deallocations in memory related to Lua (further, *binary " "memory profile* or *binary profile* for short)." msgstr "" +"События аллокации, реаллокации и деаллокации в Lua :ref:`собираются " +"` в бинарный профиль (далее по тексту — *бинарный " +"профиль памяти* или просто *бинарный профиль*)." msgid "" -":ref:`Parse ` the binary profile collected and get a " +":ref:`Parsing ` the collected binary profile to get a " "human-readable profiling report." msgstr "" +"Выполняется :ref:`парсинг ` собранного бинарного " +"профиля. В результате формируется отчет о профилировании в удобном для " +"чтения формате." msgid "Collecting binary profile" -msgstr "" +msgstr "Сбор бинарного профиля" msgid "" "To collect a binary profile for a particular part of the Lua code, you need " @@ -36,10 +48,15 @@ msgid "" "``misc.memprof.start()`` and ``misc.memprof.stop()``, and then execute the " "code under Tarantool." msgstr "" +"Чтобы сформировать бинарный профиль для определенного участка кода на Lua, " +"вставьте этот участок кода между функциями ``misc.memprof.start()`` и " +"``misc.memprof.stop()``, а затем выполните его в Tarantool." msgid "" "Below is a chunk of simple Lua code named ``test.lua`` to illustrate this." msgstr "" +"Для наглядности ниже приведен фрагмент кода на Lua под названием " +"``test.lua``." msgid "" "-- Prevent allocations on traces.\n" @@ -52,7 +69,7 @@ msgid "" "end\n" "\n" "local t = {}\n" -"for i = 1, 1e5 do\n" +"for i = 1, 1e4 do\n" " -- table.insert is the built-in function and all corresponding\n" " -- allocations are reported in the scope of the main chunk.\n" " table.insert(t,\n" @@ -61,188 +78,328 @@ msgid "" "end\n" "local stp, err = misc.memprof.stop()" msgstr "" +"-- Отключение аллокации на трассах\n" +"jit.off()\n" +"local str, err = misc.memprof.start(\"memprof_new.bin\")\n" +"-- Lua не создает стековый фрейм для вызова string.rep,\n" +"-- поэтому все события аллокации\n" +"-- приписываются не функции append(), а родительской области\n" +"local function append(str, rep)\n" +" return string.rep(str, rep)\n" +"end\n" +"\n" +"local t = {}\n" +"for i = 1, 1e4 do\n" +" -- table.insert — встроенная функция,\n" +" -- так что профилировщик включает все соответствующие ей\n" +" -- события аллокации в отчет по основной части кода\n" +" table.insert(t,\n" +" append('q', i)\n" +" )\n" +"end\n" +"local stp, err = misc.memprof.stop()" -msgid "Starting profiler in Lua code:" +msgid "" +"The Lua code for starting the profiler -- as in line 3 in the test.lua " +"example above -- is:" msgstr "" +"В примере test.lua код для запуска профилировщика находится на строке 3:" msgid "local str, err = misc.memprof.start(FILENAME)" -msgstr "" +msgstr "local str, err = misc.memprof.start(ИМЯ_ФАЙЛА)" msgid "" -"where ``FILENAME`` is a name of the binary file where profiling events are " -"written." +"where ``FILENAME`` is the name of the binary file where profiling events are" +" written." msgstr "" +"``ИМЯ_ФАЙЛА`` — имя бинарного файла, куда записываются профилируемые " +"события." msgid "" -"If it is not possible to open a file for writing or the profiler fails to " -"start, ``misc.memprof.start()`` returns ``nil`` on failure. Also, in this " -"case the function returns an error message as the second result and a " -"system-dependent error code as the third result. Otherwise, it returns " -"``true``." -msgstr "" +"If the operation fails, for example if it is not possible to open a file for" +" writing or if the profiler is already running, ``misc.memprof.start()`` " +"returns ``nil`` as the first result, an error-message string as the second " +"result, and a system-dependent error code number as the third result. If the" +" operation succeeds, ``misc.memprof.start()`` returns ``true``." +msgstr "" +"Если операция завершается ошибкой, функция ``misc.memprof.start()`` " +"возвращает результат, состоящий из трех частей: ``nil``; строка с сообщением" +" об ошибке; код ошибки в зависимости от системы. Ошибка может возникнуть, " +"например, когда не открывается файл для записи или профилировщик уже " +"запущен. Если операция выполняется успешно, ``misc.memprof.start()`` " +"возвращает ``true``." -msgid "Stopping profiler in Lua code:" +msgid "" +"The Lua code for stopping the profiler -- as in line 18 in the test.lua " +"example above -- is:" msgstr "" +"В примере test.lua код для остановки профилировщика находится на строке 18:" msgid "local stp, err = misc.memprof.stop()" -msgstr "" +msgstr "local stp, err = misc.memprof.stop()" msgid "" -"If any error occurs at stopping the profiling (an error when the file " -"descriptor is being closed) or during reporting, ``misc.memprof.stop()`` " -"returns ``nil``. Also, in this case the function returns an error message as" -" the second result and a system-dependent error code as the third result. " -"Otherwise, it returns ``true``." -msgstr "" +"If the operation fails, for example if there is an error when the file " +"descriptor is being closed or if there is a failure during reporting, " +"``misc.memprof.stop()`` returns ``nil`` as the first result, an error-" +"message string as the second result, and a system-dependent error code " +"number as the third result. If the operation succeeds, " +"``misc.memprof.stop()`` returns ``true``." +msgstr "" +"Если операция завершается ошибкой, функция ``misc.memprof.stop()`` " +"возвращает результат, состоящий из трех частей: ``nil``; строка с сообщением" +" об ошибке; код ошибки в зависимости от системы. Ошибка может возникнуть, " +"например, когда закрыт файловый дескриптор или во время составления отчета " +"происходит сбой. Если операция выполняется успешно, ``misc.memprof.stop()`` " +"возвращает ``true``." msgid "" "To generate the file with memory profile in binary format (in the " -":ref:`example above `, it's ``memprof_new.bin``), " -"execute the code under Tarantool:" +":ref:`test.lua code example above ` the file name " +"is ``memprof_new.bin``), execute the code under Tarantool:" msgstr "" +"Теперь нужно сгенерировать файл с профилем памяти в бинарном формате. В " +":ref:`примере test.lua ` имя файла — " +"``memprof_new.bin``. Выполните код в Tarantool:" msgid "$ tarantool test.lua" -msgstr "" +msgstr "$ tarantool test.lua" msgid "" "Tarantool collects the allocation events in ``memprof_new.bin``, puts the " "file in its :ref:`working directory `, and closes the " "session." msgstr "" +"Tarantool собирает события аллокации в файл ``memprof_new.bin``, помещает " +"его в :ref:`рабочую директорию ` и завершает сеанс." msgid "" -"The :ref:`code example ` above also illustrates " -"the memory allocation logic in some of the cases that are important to " -"understand for further :ref:`reading ` and " -":ref:`analysing ` a profiling report:" +"The :ref:`test.lua code example ` above also " +"illustrates the memory allocation logic in some cases that are important to " +"understand for :ref:`reading ` and :ref:`analyzing " +"` a profiling report:" msgstr "" +":ref:`Пример test.lua ` также иллюстрирует логику," +" по которой в некоторых случаях происходит аллокация памяти. Важно понимать " +"эту логику, чтобы :ref:`читать ` и :ref:`анализировать" +" ` отчеты о профилировании." msgid "" "Line 2: It is recommended to switch the JIT compilation off by calling " -"``jit.off()`` before the profiler start. Refer to the following " -":ref:`explanation ` for more details." +"``jit.off()`` before the profiler start. Refer to the following :ref:`note " +"about jitoff ` for more details." msgstr "" +"Строка 2: Рекомендуется отключать JIT-компиляцию, вызывая ``jit.off()`` " +"перед запуском профилировщика. За дополнительными сведениями обратитесь к " +":ref:`примечанию о jitoff `." msgid "" "Lines 6-8: Tail call optimization doesn't create a new call frame, so all " "allocations inside the function called via the ``CALLT/CALLMT`` `bytecodes " "`_ are " -"attributed to its caller. See also comments to these lines." +"attributed to the function's caller. See also the comments preceding these " +"lines." msgstr "" +"Строки 6–8: Оптимизация хвостового вызова не создает новый фрейм стека " +"вызовов, поэтому все события аллокации в `байт-коде " +"`_ " +"``CALLT/CALLMT`` относятся на счет кода, вызывающего эту функцию. Обратите " +"внимание на комментарии перед этими строками." msgid "" -"Lines 14-16: Usually, the information about allocations inside Lua built‑ins" -" are not really useful for developers. That's why if a Lua built‑in function" -" is called from a Lua function, the profiler attributes all allocations to " +"Lines 14-16: Usually the information about allocations inside Lua built‑ins " +"is not really useful for developers. That's why if a Lua built‑in function " +"is called from a Lua function, the profiler attributes all allocations to " "the Lua function. Otherwise, this event is attributed to a C function. See " -"also comments to these lines." +"also the comments preceding these lines." msgstr "" +"Строки 14–16: Как правило, разработчиков несильно интересует информация об " +"аллокации во встроенных функциях LuaJIT. Поэтому если встроенная функция " +"вызывается из функции на Lua, профилировщик собирает все события аллокации " +"для функции на Lua. В противном случае событие относится к функции на C. " +"Обратите внимание на комментарии перед этими строками." msgid "Parsing binary profile and generating profiling report" -msgstr "" +msgstr "Парсинг бинарного профиля и формирование отчета о профилировании" msgid "" -"After having the memory profile in binary format, the next step is to parse " -"it to get a human-readable profiling report. You can do this via Tarantool " +"After getting the memory profile in binary format, the next step is to parse" +" it to get a human-readable profiling report. You can do this via Tarantool " "by using the following command (mind the hyphen ``-`` prior to the file " "name):" msgstr "" +"Получив профиль памяти в двоичном формате, нужно выполнить парсинг, чтобы " +"отчет было удобно читать. Парсинг можно выполнить в Tarantool, " +"воспользовавшись следующей командой (обратите внимание на дефис ``-`` перед " +"именем файла):" -msgid "$ tarantool -e 'require(\"memprof\")(arg[1])' - " -msgstr "" +msgid "$ tarantool -e 'require(\"memprof\")(arg)' - memprof_new.bin" +msgstr "$ tarantool -e 'require(\"memprof\")(arg)' - memprof_new.bin" msgid "" "where ``memprof_new.bin`` is the binary profile :ref:`generated earlier " -"`." +"` by ``tarantool test.lua``. (Warning: there is a " +"slight behavior change here, the ``tarantool -e ...`` command was slightly " +"different in Tarantool versions prior to Tarantool 2.8.1.)" msgstr "" +"Здесь ``memprof_new.bin`` — бинарный профиль, :ref:`ранее сгенерированный " +"` командой ``tarantool test.lua``. (Внимание: в " +"версии Tarantool 2.8.1 поведение команды ``tarantool -e`` немного " +"изменилось.)" msgid "" -"Tarantool generates a profiling report that is displayed in console and " -"closes the session:" +"Tarantool generates a profiling report and displays it on the console before" +" closing the session:" msgstr "" +"Tarantool генерирует отчет о профилировании и выводит его в консоль перед " +"закрытием сеанса:" msgid "" "ALLOCATIONS\n" -"@test.lua:0, line 15: 1002 531818 0\n" -"@test.lua:0, line 14: 1 24 0\n" -"@test.lua:0, line 10: 1 32 0\n" -"@test.lua:0, line 8: 1 20 0\n" +"@test.lua:14: 10000 events +50240518 bytes -0 bytes\n" +"@test.lua:9: 1 events +32 bytes -0 bytes\n" +"@test.lua:8: 1 events +20 bytes -0 bytes\n" +"@test.lua:13: 1 events +24 bytes -0 bytes\n" "\n" "REALLOCATIONS\n" -"@test.lua:0, line 14: 9 16424 8248\n" -" Overrides:\n" -" @test.lua:0, line 14\n" -"@test.lua:0, line 15: 5 1984 992\n" -" Overrides:\n" -" @test.lua:0, line 15\n" +"@test.lua:13: 13 events +262216 bytes -131160 bytes\n" +" Overrides:\n" +" @test.lua:13\n" +"\n" +"@test.lua:14: 11 events +49536 bytes -24768 bytes\n" +" Overrides:\n" +" @test.lua:14\n" +" INTERNAL\n" +"\n" +"INTERNAL: 3 events +8448 bytes -16896 bytes\n" +" Overrides:\n" +" @test.lua:14\n" "\n" "DEALLOCATIONS\n" -"INTERNAL: 20 0 1481\n" -"@test.lua:0, line 15: 3 0 7168\n" -" Overrides:\n" -" @test.lua:0, line 15" +"INTERNAL: 1723 events +0 bytes -483515 bytes\n" +"@test.lua:14: 1 events +0 bytes -32768 bytes\n" +"\n" +"HEAP SUMMARY:\n" +"@test.lua:14 holds 50248326 bytes: 10010 allocs, 10 frees\n" +"@test.lua:13 holds 131080 bytes: 14 allocs, 13 frees\n" +"INTERNAL holds 8448 bytes: 3 allocs, 3 frees\n" +"@test.lua:9 holds 32 bytes: 1 allocs, 0 frees\n" +"@test.lua:8 holds 20 bytes: 1 allocs, 0 frees" msgstr "" +"ALLOCATIONS\n" +"@test.lua:14: 10000 events +50240518 bytes -0 bytes\n" +"@test.lua:9: 1 events +32 bytes -0 bytes\n" +"@test.lua:8: 1 events +20 bytes -0 bytes\n" +"@test.lua:13: 1 events +24 bytes -0 bytes\n" +"\n" +"REALLOCATIONS\n" +"@test.lua:13: 13 events +262216 bytes -131160 bytes\n" +" Overrides:\n" +" @test.lua:13\n" +"\n" +"@test.lua:14: 11 events +49536 bytes -24768 bytes\n" +" Overrides:\n" +" @test.lua:14\n" +" INTERNAL\n" +"\n" +"INTERNAL: 3 events +8448 bytes -16896 bytes\n" +" Overrides:\n" +" @test.lua:14\n" +"\n" +"DEALLOCATIONS\n" +"INTERNAL: 1723 events +0 bytes -483515 bytes\n" +"@test.lua:14: 1 events +0 bytes -32768 bytes\n" +"\n" +"HEAP SUMMARY:\n" +"@test.lua:14 holds 50248326 bytes: 10010 allocs, 10 frees\n" +"@test.lua:13 holds 131080 bytes: 14 allocs, 13 frees\n" +"INTERNAL holds 8448 bytes: 3 allocs, 3 frees\n" +"@test.lua:9 holds 32 bytes: 1 allocs, 0 frees\n" +"@test.lua:8 holds 20 bytes: 1 allocs, 0 frees" msgid "" "On MacOS, a report will be different for the same chunk of code because " "Tarantool and LuaJIT are built with the GC64 mode enabled for MacOS." msgstr "" +"В macOS отчет по той же части кода выглядит по-другому, поскольку Tarantool " +"и LuaJIT собраны с поддержкой режима GC64 для macOS." -msgid "Let's examine the report structure. A report has three sections:" -msgstr "" +msgid "Let's examine the report structure. A report has four sections:" +msgstr "Рассмотрим структуру отчета. Он состоит из четырех разделов:" msgid "ALLOCATIONS" -msgstr "" +msgstr "ALLOCATIONS (аллокация)" -msgid "RELOCATIONS" -msgstr "" +msgid "REALLOCATIONS" +msgstr "REALLOCATIONS (реаллокация)" -msgid "DEALLOCATIONS." +msgid "DEALLOCATIONS" +msgstr "DEALLOCATIONS (деаллокация)" + +msgid "" +"HEAP SUMMARY (described later in :ref:`The heap summary and the --leak-only " +"option`)" msgstr "" +"HEAP SUMMARY (cводка изменений в динамической памяти, раздел описан " +":ref:`ниже `)" msgid "" -"Each section contains event records that are sorted from the most often to " -"the least ones." +"Each section contains event records that are sorted from the most frequent " +"to the least frequent." msgstr "" +"Записи в каждом разделе отсортированы в порядке от наиболее до наименее " +"частых событий." msgid "An event record has the following format:" -msgstr "" +msgstr "Запись о событии регистрируется в следующем формате:" msgid "" -"@:, line : " -" " +"@:: events + bytes " +"- bytes" msgstr "" +"@<имя_файла>:<номер_строки>: <количество_событий> events +<выделенные_байты>" +" bytes -<освобожденные_байты> bytes" msgid "—a name of the file containing Lua code." -msgstr "" - -msgid "" -"—the line number where the function generating the event is " -"declared. In some of the cases, allocations are attributed not to the " -"declared function but to the main chunk. In this case, the " -"is set to ``0``. See the :ref:`code chunk above` " -"with the explanation in the comments for some examples." -msgstr "" +msgstr "<имя_файла> — имя файла, содержащего код на Lua." msgid "—the line number where the event is detected." -msgstr "" +msgstr "<номер_строки> — номер строки, в которой обнаружено событие." msgid "—a number of events for this code line." -msgstr "" +msgstr "<количество_событий> — количество событий для этой строки кода." -msgid "—amount of memory allocated during all the events, bytes." +msgid "" +"+ bytes—amount of memory allocated during all the events on this " +"line." msgstr "" +"+<выделенная_память_в_байтах> bytes — объем выделенной памяти для всех " +"событий в этой строке." -msgid "—amount of memory freed during all the events, bytes." +msgid "" +"- bytes—amount of memory freed during all the events on this line." msgstr "" +"+<освобожденная_память_в_байтах> bytes — объем освобожденной памяти для всех" +" событий в этой строке." msgid "The ``Overrides`` label shows what allocation has been overridden." msgstr "" +"Метка ``Overrides`` на событии показывает, какое событие аллокации оно " +"замещает." + +msgid "" +"See the :ref:`test.lua chunk above ` with the " +"explanation in the comments for some examples." +msgstr "" +"См. :ref:`код примера test.lua выше ` и пояснения " +"в комментариях к нему." msgid "" "The ``INTERNAL`` label indicates that this event is caused by internal " "LuaJIT structures." msgstr "" +"Метка ``INTERNAL`` показывает, что событие произошло во внутренних " +"структурах LuaJIT." msgid "" "Important note regarding the ``INTERNAL`` label and the recommendation of " @@ -254,6 +411,14 @@ msgid "" "code that generated the trace. In this case, the profiler labels such " "allocations as ``INTERNAL``." msgstr "" +"Важное примечание о метке ``INTERNAL`` и рекомендации отключать компиляцию " +"JIT (``jit.off()``). В текущей версии профилировщика не поддерживается " +"подробное (verbose) описание событий аллокации при `трассировке " +"`_. Если память выделяется во время " +"трассировки, профилировщик не может соотнести события аллокации с " +"соответствующей частью кода. В этом случае профилировщик помечает такие " +"события как ``INTERNAL``." msgid "" "So, if the JIT compilation is on, new traces will be generated and there " @@ -261,47 +426,69 @@ msgid "" "some of them are really caused by internal LuaJIT structures, but some of " "them are caused by allocations on traces." msgstr "" +"Когда компиляция JIT включена, выполняется несколько процессов трассировки. " +"В результате пометку ``INTERNAL`` в отчете о профилировании получают самые " +"разные события: некоторые из них действительно возникают во внутренних " +"структурах LuaJIT, а другие вызваны аллокацией при трассировке." msgid "" -"If you want to have more definite report without JIT compiler allocations, " -":ref:`call jit.off() ` before starting the " +"If you want to have a more definite report without JIT compiler allocations," +" :ref:`call jit.off() ` before starting the " "profiling. And if you want to completely exclude the trace allocations from " "the report, remove also the old traces by additionally calling " "``jit.flush()`` after ``jit.off()``." msgstr "" +"Вы можете получить более конкретный отчет, в который не входят события " +"аллокации, вызванные JIT-компилятором. Для этого до запуска профилировщика " +":ref:`вызовите jit.off() `. Чтобы полностью " +"исключить из отчета аллокацию на трассах, удалите предыдущие трассы, вызвав " +"после ``jit.off()`` функцию ``jit.flush()``." msgid "" "Nevertheless, switching the JIT compilation off before the profiling is not " -"\"a must\". It is rather a recommendation, and in some of the cases, for " -"example, on production environment, you may need to keep JIT compilation on " -"to see the full picture of all the memory allocations. In this case, the " -"majority the ``INTERNAL`` events are most probably caused by traces." +"\"a must\". It is rather a recommendation, and in some cases, for example in" +" a production environment, you may need to keep JIT compilation on to see " +"the full picture of all the memory allocations. In this case, the majority " +"of the ``INTERNAL`` events are most probably caused by traces." msgstr "" +"Отключать компиляцию JIT перед запуском профилировщика рекомендуется, но это" +" не обязательно. Например, в производственной среде без компиляции JIT " +"полное представление об аллокациях памяти получить невозможно. В подобных " +"случаях большая часть событий ``INTERNAL``, вероятнее всего, происходит при " +"трассировках." msgid "" "As for investigating the Lua code with the help of profiling reports, it is " -"always code-dependent and there can't be cent per cent definite " -"recommendations in this regard. Nevertheless, some of the things you can see" -" in the analysis of :ref:`another code example `." +"always code-dependent and there can't be hundred per cent definite " +"recommendations in this regard. Nevertheless, you can see some of the things" +" in the :ref:`Profiling report analysis example ` later." msgstr "" +"Иногда отчет о профилировании помогает исследовать код на Lua. Однако этот " +"метод подходит не для любого кода, так что рекомендаций на этот счет нет. " +"Посмотрите :ref:`пример анализа отчета о профилировании " +"`, чтобы узнать, как можно использовать отчет для " +"исследования кода." msgid "" "Also, below is the :ref:`FAQ ` section with the questions that" -" most probably can arise while using the profiler." +" most probably can arise while using profiler." msgstr "" +"Больше информации о том, как использовать профилировщик, вы найдете ниже в " +"разделе :ref:`Вопросы и ответы `." msgid "FAQ" msgstr "Вопросы и ответы" msgid "" -"In this section, some of the profiler-related points are discussed in a Q&A " -"format." +"In this section, some profiler-related points are discussed in a Q&A format." msgstr "" +"В этом разделе даются ответы на часто задаваемые вопросы о работе " +"профилировщика." msgid "" "**Question (Q)**: Is the profiler suitable for C allocations or allocations " "inside C code?" -msgstr "" +msgstr "**Вопрос (В)**: Проверяет ли профилировщик аллокацию в C и коде на C?" msgid "" "**Answer (A)**: The profiler reports only allocation events caused by the " @@ -310,52 +497,83 @@ msgid "" "``malloc()`` or other non-Lua allocators. You can use ``valgrind`` to debug " "them." msgstr "" +"**Ответ (A)**: Профилировщик включает в отчет только события выделения " +"памяти Lua-аллокатором. Отчет содержит все события аллокации в Lua, например" +" создание таблиц и строк. Однако профилировщик не отслеживает выделение " +"памяти с помощью ``malloc()`` или действия аллокаторов, не связанных с Lua. " +"Чтобы фиксировать такие события, для отладки можно использовать " +"``valgrind``." msgid "" "**Q**: Why are there so many ``INTERNAL`` allocations in my profiling " "report? What does it mean?" msgstr "" +"**В**: Почему у меня в отчете о профилировании столько событий аллокации " +"``INTERNAL``? Что это значит?" msgid "" "**A**: ``INTERNAL`` means that these allocations/reallocations/deallocations" " are related to the internal LuaJIT structures or are made on traces. " -"Currently, the memory profiler doesn't report verbosely allocations of " -"objects that are made during trace execution. Try to :ref:`add jit.off() " -"` before profiler start." +"Currently, the profiler doesn't verbosely report allocations of objects that" +" are made during trace execution. Try :ref:`adding jit.off() " +"` before the profiler start." msgstr "" +"**О**: Пометка ``INTERNAL`` означает, что событие " +"аллокации/реаллокации/деаллокации связано с внутренними структурами LuaJIT " +"или трассами. Сейчас профилировщик не включает в отчет подробное описание " +"событий аллокации для объектов, создаваемых на трассах. Попробуйте перед " +"запуском профилировщика :ref:`добавить jit.off() " +"`." msgid "" -"**Q**: Why is there some reallocations/deallocations without the " +"**Q**: Why are there some reallocations/deallocations without an " "``Overrides`` section?" msgstr "" +"**В**: Почему на некоторых событиях аллокации/деаллокации нет метки " +"``Overrides``?" msgid "" "**A**: These objects can be created before the profiler starts. Adding " -"``collectgarbage()`` before the profiler's start enables to collect all " +"``collectgarbage()`` before the profiler's start enables collecting all " "previously allocated objects that are dead when the profiler starts." msgstr "" +"**О**: Вероятно, события связаны с объектами, созданными до запуска " +"профилировщика. Если перед запуском профилировщика добавить вызов " +"``collectgarbage()``, то будут учитываться и события, связанные с " +"\"мертвыми\" объектами: под такие объекты ранее была выделена память, но на " +"момент запуска профилировщика они уже недоступны." msgid "" -"**Q**: Why some objects are not collected during profiling? Is it a memory " +"**Q**: Why are some objects not collected during profiling? Is it a memory " "leak?" msgstr "" +"**В**: Почему некоторые объекты не учитываются при профилировании? Это " +"связано с утечкой памяти?" msgid "" "**A**: LuaJIT uses incremental Garbage Collector (GC). A GC cycle may not be" -" finished at the moment of the profiler's stop. Add ``collectgarbage()`` " -"before stopping the profiler to collect all the dead objects for sure." +" finished at the moment the profiler stops. Add ``collectgarbage()`` before " +"stopping the profiler to collect all the dead objects for sure." msgstr "" +"**О**: LuaJIT использует инкрементальный сборщик мусора. Когда профилировщик" +" завершает работу, цикл сборки мусора может все еще выполняться. Чтобы " +"обеспечить профилирование \"мертвых\" объектов, добавьте " +"``collectgarbage()`` перед командой остановки профилировщика." msgid "" "**Q**: Can I profile not just a current chunk but the entire running " "application? Can I start the profiler when the application is already " "running?" msgstr "" +"**В**: Можно ли профилировать не только часть кода, а все приложение? Можно " +"ли запустить профилировщик во время работы приложения?" msgid "" -"**A**: Yes. Here is the example of code that can be inserted in the " -"Tarantool console for a running instance." +"**A**: Yes. Here is an example of code that can be inserted in the Tarantool" +" console for a running instance." msgstr "" +"**О**: Да. Вот пример кода, который можно вставить в консоль Tarantool, " +"когда приложение уже запущено:" msgid "" "local fiber = require \"fiber\"\n" @@ -384,28 +602,60 @@ msgid "" " log.warn(\"end of profile\")\n" "end)" msgstr "" +"local fiber = require \"fiber\"\n" +"local log = require \"log\"\n" +"\n" +"fiber.create(function()\n" +" fiber.name(\"memprof\")\n" +"\n" +" collectgarbage() -- Сбор мертвых объектов\n" +" log.warn(\"start of profile\")\n" +"\n" +" local st, err = misc.memprof.start(ИМЯ_ФАЙЛА)\n" +" if not st then\n" +" log.error(\"failed to start profiler: %s\", err)\n" +" end\n" +"\n" +" fiber.sleep(ВРЕМЯ)\n" +"\n" +" collectgarbage()\n" +" st, err = misc.memprof.stop()\n" +"\n" +" if not st then\n" +" log.error(\"profiler on stop error: %s\", err)\n" +" end\n" +"\n" +" log.warn(\"end of profile\")\n" +"end)" msgid "where" -msgstr "" +msgstr "Пояснения:" -msgid "``FILENAME``—a name of the report file in binary format" +msgid "" +"``FILENAME``—the name of the binary file where profiling events are written" msgstr "" +"``ИМЯ_ФАЙЛА`` — имя бинарного файла, куда записываются профилируемые " +"события." -msgid "``TIME``—duration of profiling, seconds." -msgstr "" +msgid "``TIME``—duration of profiling, in seconds." +msgstr "``ВРЕМЯ`` — продолжительность профилирования в секундах." msgid "" "Also, you can directly call ``misc.memprof.start()`` and " "``misc.memprof.stop()`` from a console." msgstr "" +"Кроме того, вызывать ``misc.memprof.start()`` и ``misc.memprof.stop()`` " +"можно напрямую из консоли." msgid "Profiling report analysis example" -msgstr "" +msgstr "Пример анализа отчета о профилировании" msgid "" "In the example below, the following Lua code named ``format_concat.lua`` is " "investigated with the help of the memory profiler reports." msgstr "" +"Ниже приведен код на Lua --- файл ``format_concat.lua``. Этот код будет " +"исследован с применением отчетов о профилировании памяти." msgid "" "-- Prevent allocations on new traces.\n" @@ -440,56 +690,123 @@ msgid "" "\n" "os.exit()" msgstr "" +"-- Отключение аллокации на новых трассах\n" +"jit.off()\n" +"\n" +"local function concat(a)\n" +" local nstr = a..\"a\"\n" +" return nstr\n" +"end\n" +"\n" +"local function format(a)\n" +" local nstr = string.format(\"%sa\", a)\n" +" return nstr\n" +"end\n" +"\n" +"collectgarbage()\n" +"\n" +"local binfile = \"/tmp/memprof_\"..(arg[0]):match(\"([^/]*).lua\")..\".bin\"\n" +"\n" +"local st, err = misc.memprof.start(binfile)\n" +"assert(st, err)\n" +"\n" +"-- Нагрузка\n" +"for i = 1, 10000 do\n" +" local f = format(i)\n" +" local c = concat(i)\n" +"end\n" +"collectgarbage()\n" +"\n" +"local st, err = misc.memprof.stop()\n" +"assert(st, err)\n" +"\n" +"os.exit()" msgid "" "When you run this code :ref:`under Tarantool ` and " -"then :ref:`parse ` the binary memory profile, " -"you will get the following profiling report:" +"then :ref:`parse ` the binary memory profile " +"in /tmp/memprof_format_concat.bin, you will get the following profiling " +"report:" msgstr "" +"Запустив этот код :ref:`в Tarantool ` и выполнив " +"последующий :ref:`парсинг ` бинарного профиля " +"в /tmp/memprof_format_concat.bin, вы получите такой отчет о профилировании:" msgid "" "ALLOCATIONS\n" -"@format_concat.lua:9, line 10: 19998 624322 0\n" -"INTERNAL: 1 65536 0\n" +"@format_concat.lua:10: 19996 events +624284 bytes -0 bytes\n" +"INTERNAL: 1 events +65536 bytes -0 bytes\n" "\n" "REALLOCATIONS\n" "\n" "DEALLOCATIONS\n" -"INTERNAL: 19998 0 558816\n" -" Overrides:\n" -" @format_concat.lua:9, line 10\n" -"@format_concat.lua:9, line 10: 2 0 98304\n" -" Overrides:\n" -" @format_concat.lua:9, line 10" +"INTERNAL: 19996 events +0 bytes -558778 bytes\n" +" Overrides:\n" +" @format_concat.lua:10\n" +"\n" +"@format_concat.lua:10: 2 events +0 bytes -98304 bytes\n" +" Overrides:\n" +" @format_concat.lua:10\n" +"\n" +"HEAP SUMMARY:\n" +"INTERNAL holds 65536 bytes: 1 allocs, 0 frees" msgstr "" +"ALLOCATIONS\n" +"@format_concat.lua:10: 19996 events +624284 bytes -0 bytes\n" +"INTERNAL: 1 events +65536 bytes -0 bytes\n" +"\n" +"REALLOCATIONS\n" +"\n" +"DEALLOCATIONS\n" +"INTERNAL: 19996 events +0 bytes -558778 bytes\n" +" Overrides:\n" +" @format_concat.lua:10\n" +"\n" +"@format_concat.lua:10: 2 events +0 bytes -98304 bytes\n" +" Overrides:\n" +" @format_concat.lua:10\n" +"\n" +"HEAP SUMMARY:\n" +"INTERNAL holds 65536 bytes: 1 allocs, 0 frees" -msgid "The reasonable questions regarding the report can be:" -msgstr "" +msgid "Reasonable questions regarding the report can be:" +msgstr "Отчет может вызвать такие вопросы:" msgid "Why are there no allocations related to the ``concat()`` function?" -msgstr "" +msgstr "Почему нет событий по функции ``concat()``?" -msgid "Why the amount of allocations is not a round number?" -msgstr "" +msgid "Why is the number of allocations not a round number?" +msgstr "Почему количество событий — это не целое число?" msgid "Why are there approximately 20K allocations instead of 10K?" -msgstr "" +msgstr "Почему в отчете не 10 тысяч событий, а около 20 тысяч?" msgid "" "First of all, LuaJIT doesn't create a new string if the string with the same" " payload exists (see details on `lua-users.org/wiki `_). This is called the `string interning " -"`_. So, when the string is " +"users.org/wiki/ImmutableObjects>`_). This is called `string interning " +"`_. So, when a string is " "created via the ``format()`` function, there is no need to create the same " "string via the ``concat()`` function, and LuaJIT just uses the previous one." msgstr "" +"Во-первых, LuaJIT не создает новую строку, если уже есть строка с такой же " +"нагрузкой (подробнее на сайте `lua-users.org/wiki `_). Это называется `интернированием строк " +"`_. Иными словами, если " +"строка создана с помощью функции ``format()``, нет необходимости создавать " +"такую же строку с помощью функции ``concat()`` — LuaJIT будет использовать " +"предыдущую." msgid "" -"That is also the reason why the amount of allocations is not the round " -"number as can be expected from the cycle operator ``for i = 1, 10000...``: " +"That is also the reason why the number of allocations is not a round number " +"as could be expected from the cycle operator ``for i = 1, 10000...``: " "Tarantool creates some strings for internal needs and built‑in modules, so " "some strings already exist." msgstr "" +"По этой же причине количество событий аллокации — это не целое число, как " +"можно было бы ожидать при использовании оператора цикла ``for i = 1, " +"10000...``. Некоторые строки Tarantool создает для внутренних нужд и " +"встроенных модулей, поэтому часть строк уже существует." msgid "" "But why are there so many allocations? It's almost twice as big as the " @@ -497,104 +814,198 @@ msgid "" "creates another string necessary for the ``%s`` identifier, so there are two" " allocations for each iteration: for ``tostring(i)`` and for " "``string.format(\"%sa\", string_i_value)``. You can see the difference in " -"behaviour by adding the ``local _ = tostring(i)`` line between lines 22 and " +"behavior by adding the line ``local _ = tostring(i)`` between lines 22 and " "23." msgstr "" +"Но откуда столько событий аллокации? Их почти в 2 раза больше, чем можно " +"было бы ожидать. Это происходит потому, что встроенная функция " +"``string.format()`` каждый раз создает дополнительную строку для " +"идентификатора ``%s``. То есть в каждой итерации регистрируются два события " +"аллокации: для ``tostring(i)`` и для ``string.format(\"%sa\", " +"string_i_value)``. Добавив строку ``local _ = tostring(i)`` между строками " +"22 и 23, вы увидите разницу в поведении." msgid "" -"To profile only the ``concat()`` function, comment line 23, namely, ``local " -"f = format(i)`` and run the profiler." -msgstr "" - -msgid "The profiler's output is the following:" +"To profile only the ``concat()`` function, comment out line 23 (which is " +"``local f = format(i)``) and run the profiler. Now the output will look like" +" this:" msgstr "" +"Чтобы профилировать только функцию ``concat()``, закомментируйте строку 23 " +"(``local f = format(i)``) и запустите профилировщик. Теперь результат будет " +"такой:" msgid "" "ALLOCATIONS\n" -"@format_concat.lua:4, line 5: 10000 284411 0\n" +"@format_concat.lua:5: 10000 events +284411 bytes -0 bytes\n" "\n" "REALLOCATIONS\n" "\n" "DEALLOCATIONS\n" -"INTERNAL: 10000 0 218905\n" -" Overrides:\n" -" @format_concat.lua:4, line 5\n" -"@format_concat.lua:4, line 5: 1 0 32768" +"INTERNAL: 10000 events +0 bytes -218905 bytes\n" +" Overrides:\n" +" @format_concat.lua:5\n" +"\n" +"@format_concat.lua:5: 1 events +0 bytes -32768 bytes\n" +"\n" +"HEAP SUMMARY:\n" +"@format_concat.lua:5 holds 65536 bytes: 10000 allocs, 9999 frees" msgstr "" +"ALLOCATIONS\n" +"@format_concat.lua:5: 10000 events +284411 bytes -0 bytes\n" +"\n" +"REALLOCATIONS\n" +"\n" +"DEALLOCATIONS\n" +"INTERNAL: 10000 events +0 bytes -218905 bytes\n" +" Overrides:\n" +" @format_concat.lua:5\n" +"\n" +"@format_concat.lua:5: 1 events +0 bytes -32768 bytes\n" +"\n" +"HEAP SUMMARY:\n" +"@format_concat.lua:5 holds 65536 bytes: 10000 allocs, 9999 frees" -msgid "**Q**: But what will change if the JIT compilation is enabled?" -msgstr "" +msgid "**Q**: But what will change if JIT compilation is enabled?" +msgstr "**В**: Что изменится, если включить компиляцию JIT?" msgid "" -"**A**: In the :ref:`code `, comment line 2, " -"namely, ``jit.off()`` and run the profiler . Now, there are only 56 " +"**A**: In the :ref:`code `, comment out line 2 " +"(which is ``jit.off()``) and run the profiler . Now there are only 56 " "allocations in the report, and all other allocations are JIT-related (see " "also the related `dev issue " "`_):" msgstr "" +"**О**: Закомментируйте вторую строку (``jit.off()``) в :ref:`коде " +"` и запустите профилировщик. Теперь в отчете " +"только 56 событий. Остальные события связаны с JIT (см. также " +"соответствующую `задачу на GitHub " +"`_):" msgid "" "ALLOCATIONS\n" -"@format_concat.lua:4, line 5: 56 1112 0\n" -"@format_concat.lua:0, line 0: 4 640 0\n" -"INTERNAL: 2 382 0\n" +"@format_concat.lua:5: 56 events +1112 bytes -0 bytes\n" +"@format_concat.lua:0: 4 events +640 bytes -0 bytes\n" +"INTERNAL: 2 events +382 bytes -0 bytes\n" "\n" "REALLOCATIONS\n" "\n" "DEALLOCATIONS\n" -"INTERNAL: 58 0 1164\n" -" Overrides:\n" -" @format_concat.lua:4, line 5\n" -" INTERNAL" +"INTERNAL: 58 events +0 bytes -1164 bytes\n" +" Overrides:\n" +" @format_concat.lua:5\n" +" INTERNAL\n" +"\n" +"\n" +"HEAP SUMMARY:\n" +"@format_concat.lua:0 holds 640 bytes: 4 allocs, 0 frees\n" +"INTERNAL holds 360 bytes: 2 allocs, 1 frees" msgstr "" +"ALLOCATIONS\n" +"@format_concat.lua:5: 56 events +1112 bytes -0 bytes\n" +"@format_concat.lua:0: 4 events +640 bytes -0 bytes\n" +"INTERNAL: 2 events +382 bytes -0 bytes\n" +"\n" +"REALLOCATIONS\n" +"\n" +"DEALLOCATIONS\n" +"INTERNAL: 58 events +0 bytes -1164 bytes\n" +" Overrides:\n" +" @format_concat.lua:5\n" +" INTERNAL\n" +"\n" +"\n" +"HEAP SUMMARY:\n" +"@format_concat.lua:0 holds 640 bytes: 4 allocs, 0 frees\n" +"INTERNAL holds 360 bytes: 2 allocs, 1 frees" msgid "" "This happens because a trace has been compiled after 56 iterations (the " "default value of the ``hotloop`` compiler parameter). Then, the JIT-compiler" -" removed the unused ``c`` variable from the trace, and, therefore, the dead" -" code of the ``concat()`` function is eliminated." +" removed the unused variable ``c`` from the trace, and, therefore, the dead " +"code of the ``concat()`` function is eliminated." msgstr "" +"Так произошло потому, что трассировка была скомпилирована после 56 итераций " +"(это значение параметра компилятора ``hotloop`` по умолчанию). Затем JIT-" +"компилятор удалил из трассировки неиспользуемую переменную ``c``, а вместе с" +" ней и неиспользуемый код функции ``concat()``." msgid "" "Next, let's profile only the ``format()`` function with JIT enabled. For " -"that, keep lines 2 and 24 commented (``jit.off()`` and ``local c = " -"concat(i)`` respectively), uncomment line 23 (``local f = format(i)``), and " -"run the profiler." +"that, comment out lines 2 and 24 (``jit.off()`` and ``local c = " +"concat(i)``), do not comment out line 23 (``local f = format(i)``), and run " +"the profiler. Now the output will look like this:" msgstr "" +"Теперь включите компиляцию JIT и запустите профилирование только для функции" +" ``format()``. Для этого закомментируйте строки 2 и 24 (``jit.off()`` и " +"``local c = concat(i)``), раскомментируйте строку 23 (``local f = " +"format(i)``) и вызовите профилировщик. Результат будет такой:" msgid "" "ALLOCATIONS\n" -"@format_concat.lua:9, line 10: 19998 624322 0\n" -"INTERNAL: 4 66824 0\n" -"@format_concat.lua:0, line 0: 4 640 0\n" +"@format_concat.lua:10: 19996 events +624284 bytes -0 bytes\n" +"INTERNAL: 4 events +66928 bytes -0 bytes\n" +"@format_concat.lua:0: 4 events +640 bytes -0 bytes\n" "\n" "REALLOCATIONS\n" "\n" "DEALLOCATIONS\n" -"INTERNAL: 19999 0 559072\n" -" Overrides:\n" -" @format_concat.lua:0, line 0\n" -" @format_concat.lua:9, line 10\n" -"@format_concat.lua:9, line 10: 2 0 98304\n" -" Overrides:\n" -" @format_concat.lua:9, line 10" +"INTERNAL: 19997 events +0 bytes -559034 bytes\n" +" Overrides:\n" +" @format_concat.lua:0\n" +" @format_concat.lua:10\n" +"\n" +"@format_concat.lua:10: 2 events +0 bytes -98304 bytes\n" +" Overrides:\n" +" @format_concat.lua:10\n" +"\n" +"\n" +"HEAP SUMMARY:\n" +"INTERNAL holds 66928 bytes: 4 allocs, 0 frees\n" +"@format_concat.lua:0 holds 384 bytes: 4 allocs, 1 frees" msgstr "" +"ALLOCATIONS\n" +"@format_concat.lua:10: 19996 events +624284 bytes -0 bytes\n" +"INTERNAL: 4 events +66928 bytes -0 bytes\n" +"@format_concat.lua:0: 4 events +640 bytes -0 bytes\n" +"\n" +"REALLOCATIONS\n" +"\n" +"DEALLOCATIONS\n" +"INTERNAL: 19997 events +0 bytes -559034 bytes\n" +" Overrides:\n" +" @format_concat.lua:0\n" +" @format_concat.lua:10\n" +"\n" +"@format_concat.lua:10: 2 events +0 bytes -98304 bytes\n" +" Overrides:\n" +" @format_concat.lua:10\n" +"\n" +"\n" +"HEAP SUMMARY:\n" +"INTERNAL holds 66928 bytes: 4 allocs, 0 frees\n" +"@format_concat.lua:0 holds 384 bytes: 4 allocs, 1 frees" msgid "" -"**Q**: Why is there so many allocations in comparison to the ``concat()`` " +"**Q**: Why are there so many allocations in comparison to the ``concat()`` " "function?" msgstr "" +"**В**: Откуда так много событий аллокации по сравнению с ``concat()``?" msgid "" "**A**: The answer is simple: the ``string.format()`` function with the " "``%s`` identifier is not yet compiled via LuaJIT. So, a trace can't be " "recorded and the compiler doesn't perform the corresponding optimizations." msgstr "" +"**О**: Ответ прост: LuaJIT еще не скомпилировал функцию ``string.format()`` " +"с идентификатором ``%s``. Поэтому трассировка не регистрируется, а " +"компилятор не выполняет соответствующую оптимизацию." msgid "" -"If we change the ``format()`` function in the :ref:`code chunk " -"` in the following way" +"If we change the ``format()`` function in lines 9-12 of the :ref:`Profiling " +"report analysis example ` in the following way" msgstr "" +"Изменим функцию ``format`` в строках 9--12 :ref:`примера для анализа отчета " +"о профилировании ` следующим образом:" msgid "" "local function format(a)\n" @@ -602,22 +1013,90 @@ msgid "" " return nstr\n" "end" msgstr "" +"local function format(a)\n" +" local nstr = string.format(\"%sa\", tostring(a))\n" +" return nstr\n" +"end" msgid "the profiling report becomes much prettier:" -msgstr "" +msgstr "Теперь отчет о профилировании будет выглядеть намного лучше:" msgid "" "ALLOCATIONS\n" -"@format_concat.lua:9, line 10: 110 2131 0\n" -"@format_concat.lua:0, line 0: 4 640 0\n" -"INTERNAL: 3 1148 0\n" +"@format_concat.lua:10: 109 events +2112 bytes -0 bytes\n" +"@format_concat.lua:0: 4 events +640 bytes -0 bytes\n" +"INTERNAL: 3 events +1206 bytes -0 bytes\n" +"\n" +"REALLOCATIONS\n" +"\n" +"DEALLOCATIONS\n" +"INTERNAL: 112 events +0 bytes -2460 bytes\n" +" Overrides:\n" +" @format_concat.lua:0\n" +" @format_concat.lua:10\n" +" INTERNAL\n" +"\n" +"\n" +"HEAP SUMMARY:\n" +"INTERNAL holds 1144 bytes: 3 allocs, 1 frees\n" +"@format_concat.lua:0 holds 384 bytes: 4 allocs, 1 frees" +msgstr "" +"ALLOCATIONS\n" +"@format_concat.lua:10: 109 events +2112 bytes -0 bytes\n" +"@format_concat.lua:0: 4 events +640 bytes -0 bytes\n" +"INTERNAL: 3 events +1206 bytes -0 bytes\n" "\n" "REALLOCATIONS\n" "\n" "DEALLOCATIONS\n" -"INTERNAL: 113 0 2469\n" -" Overrides:\n" -" @format_concat.lua:0, line 0\n" -" @format_concat.lua:9, line 10\n" -" INTERNAL" +"INTERNAL: 112 events +0 bytes -2460 bytes\n" +" Overrides:\n" +" @format_concat.lua:0\n" +" @format_concat.lua:10\n" +" INTERNAL\n" +"\n" +"\n" +"HEAP SUMMARY:\n" +"INTERNAL holds 1144 bytes: 3 allocs, 1 frees\n" +"@format_concat.lua:0 holds 384 bytes: 4 allocs, 1 frees" + +msgid "The heap summary and the --leak-only option" +msgstr "Сводка изменений в динамической памяти и параметр --leak-only" + +msgid "This feature was added in version :doc:`2.8.1 `." +msgstr "" +"Эта функциональная возможность появилась в версии :doc:`2.8.1 " +"`." + +msgid "" +"The end of each display is a HEAP SUMMARY section which looks like this:" +msgstr "" +"В конце каждого отчета приводится раздел HEAP SUMMARY (сводка изменений в " +"динамической памяти). Этот раздел выглядит так:" + +msgid "" +"@: holds bytes:\n" +" allocs, frees" +msgstr "" +"@<имя_файла>:<номер_строки> holds <количество_доступных_байтов> bytes: " +"<количество_событий_аллокации> allocs, <количество_событий_деаллокации> " +"frees" + +msgid "" +"Sometimes a program can cause many deallocations, so the DEALLOCATION " +"section can become large, so the display is not easy to read. To minimize " +"output, start the parsing with an extra flag: ``--leak-only``, for example" +msgstr "" +"Иногда программа может вызывать множество событий деаллокации. В этом случае" +" раздел DEALLOCATION сильно увеличится и отчет будет сложно читать. Чтобы " +"уменьшить количество выводимых данных, запустите парсинг с дополнительным " +"параметром ``--leak-only``. Например, так:" + +msgid "$ tarantool -e 'require(\"memprof\")(arg)' - --leak-only memprof_new.bin" +msgstr "$ tarantool -e 'require(\"memprof\")(arg)' - --leak-only memprof_new.bin" + +msgid "" +"When `--leak-only`` is used, only the HEAP SUMMARY section is displayed." msgstr "" +"При использовании параметра ``--leak-only`` выводится только раздел HEAP " +"SUMMARY." diff --git a/locale/ru/LC_MESSAGES/book/box/atomic.po b/locale/ru/LC_MESSAGES/book/box/atomic.po index 38d1d19374..3cb1f6bba5 100644 --- a/locale/ru/LC_MESSAGES/book/box/atomic.po +++ b/locale/ru/LC_MESSAGES/book/box/atomic.po @@ -11,6 +11,14 @@ msgstr "" "почему Tarantool дает гарантию атомарности выполнения. На это следует " "обратить внимание." +msgid "" +"Since :tarantool-release:`2.10.0-beta1`, Tarantool supports streams and " +"interactive transactions over them. See :ref:`Streams `." +msgstr "" +"Начиная с версии :tarantool-release:`2.10.0-beta1`, Tarantool поддерживает " +"стримы и интерактивные транзакции. Больше информации можно найти здесь: " +":ref:`Стримы `." + msgid "Threads, fibers and yields" msgstr "Потоки, файберы и передача управления" diff --git a/locale/ru/LC_MESSAGES/contributing/contributing.po b/locale/ru/LC_MESSAGES/contributing/contributing.po index 0d89738a9d..56f5963ed3 100644 --- a/locale/ru/LC_MESSAGES/contributing/contributing.po +++ b/locale/ru/LC_MESSAGES/contributing/contributing.po @@ -1,5 +1,5 @@ -msgid "How to be involved in Tarantool" +msgid "How to get involved in Tarantool" msgstr "" msgid "What is Tarantool?" @@ -8,8 +8,8 @@ msgstr "" msgid "" "Tarantool is an open source database that can store everything in RAM. Use " "Tarantool as a cache with the ability to save data to disk. Tarantool serves" -" up to a million requests per second, secondary index searches, and SQL " -"support." +" up to a million requests per second, allows for secondary index searches, " +"and has SQL support." msgstr "" msgid "" @@ -31,39 +31,39 @@ msgstr "" msgid "" "This is the easiest way to get your questions answered. Many people are " -"afraid to ask questions because they think they are \"wasting the experts' " -"time,\" but no one really thinks so. Contributors are important to us." +"afraid to ask questions because they believe they are \"wasting the experts'" +" time,\" but we don't really think so. Contributors are important to us." msgstr "" msgid "" -"Also we have a `Stack Overflow tag " +"We also have a `Stack Overflow tag " "`_." msgstr "" msgid "Join the chat and ask questions." msgstr "" -msgid "How to leave feedback, ideas or suggestions?" +msgid "How to leave feedback, ideas, or suggestions?" msgstr "" msgid "You can leave your feedback or share ideas in different ways:" msgstr "" msgid "" -"**The simplest way** is to write `here " +"**The simplest way** is to fill `the feedback form " "`__. All you need to do " -"is fill in one product comment field and send it to us. If you don't mind --" -" leave your email address. If you wish, we can involve you in the product " +"is fill in one product comment field and click \"Send.\" You can optionally " +"provide your email address. If you wish, we can involve you in the product " "development process." msgstr "" msgid "" "**A more technical way** is to create a ticket on GitHub. If you have a " -"suggestion for a new feature or information about a bug, `follow the link " -"`_ and leave a ticket. " -"The link leads to the ``tarantool/tarantool`` repository. For any other " -"projects on GitHub select \"Issues\" - \"New issue\"." +"suggestion for a new feature or information about a bug, `create a new " +"GitHub issue `_. The link" +" leads to the ``tarantool/tarantool`` repository. To leave feedback for our " +"other projects on GitHub, select \"Issues\" > \"New issue.\"" msgstr "" msgid "" @@ -71,9 +71,7 @@ msgid "" "`_." msgstr "" -msgid "" -"You can chat with the team in the general product chat. They are divided by " -"language:" +msgid "To talk to our team about a product, go to one of our chats:" msgstr "" msgid "`Russian-speaking `_" @@ -83,46 +81,44 @@ msgid "`English-speaking `_" msgstr "" msgid "" -"If this communication channel is inconvenient for you or there is simply no " -"Telegram, you can leave your comment on `tarantool.io " -"`_. Fill out the form at the bottom of the site and" -" leave your email. We read each request and respond to them usually within 2" -" days." +"If Telegram is inconvenient for you or simply isn't working, you can leave " +"your comment on `tarantool.io `_. Fill out the form" +" at the bottom of the site and leave your email. We read every request and " +"respond to them usually within 2 days." msgstr "" -msgid "How to contribute?" +msgid "How to contribute" msgstr "" msgid "There are many ways to contribute to Tarantool:" msgstr "" msgid "" -"Code -- Contribute to the code. We have components written in C, Lua, " -"Python, Go, and other languages." +"Code: Contribute to the code. We have components written in C, Lua, Python, " +"Go, and other languages." msgstr "" msgid "" -"Write -- Improve documentation, write blog posts, create tutorials or " -"solution pages." +"Write: Improve documentation, write blog posts, create tutorials or solution" +" pages." msgstr "" msgid "" -"Q&A -- Share your acknowledgments at Stack Overflow with tag `#tarantool " -"`_." +"Q&A: Share your experience on Stack Overflow with the `#tarantool " +"`_ tag." msgstr "" msgid "" -"Spread the word -- Share your accomplishments in social media using the " -"``#tarantool`` hashtags (or CC ``@tarantooldb`` in Twitter)." -msgstr "" - -msgid "Tarantool Ecosystem" +"Spread the word: Share your accomplishments on social media using the " +"``#tarantool`` hashtag (or CC ``@tarantooldb`` on Twitter)." msgstr "" -msgid "Tarantool has a large ecosystem of tools around the product itself." +msgid "Tarantool ecosystem" msgstr "" -msgid "We divide the Tarantool ecosystem into 4 types:" +msgid "" +"Tarantool has a large ecosystem of tools. We divide the ecosystem into four " +"large blocks:" msgstr "" msgid "Tarantool itself." @@ -135,14 +131,15 @@ msgid "Connectors for programming languages." msgstr "" msgid "" -"Applied tools. See a selection including external tools in the `\"awesome " -"Tarantool\" list `_." +"Applied tools. See the curated `Awesome Tarantool list " +"`_, which also includes " +"external tools." msgstr "" msgid "" -"First-time tasks can be easily found in the issues section of any repository" -" by the \"good first issue\" tag. These are beginner to intermediate tasks " -"that will help you get comfortable with the tool." +"To start contributing, check the \"good first issue\" tag in the issues " +"section of any of our repositories. These are beginner to intermediate tasks" +" that will help you get comfortable with the tool." msgstr "" msgid "" @@ -152,8 +149,8 @@ msgid "" msgstr "" msgid "" -"For each repository we have a queue for reviewing, and reviewing your " -"changes can be delayed. We try to give the first answer within two days. " +"There is a review queue in each of our repositories, so your changes may not" +" be reviewed immediately. We usually give the first answer within two days. " "Depending on the ticket and its complexity, the review time may take a week " "or more." msgstr "" @@ -161,11 +158,10 @@ msgstr "" msgid "Please do not hesitate to tag the maintainer in your GitHub ticket." msgstr "" -msgid "Read further about the contribution to each of the blocks." +msgid "Read on to learn about contributing to different ecosystem blocks." msgstr "" -msgid "" -"You have a problem in documentation. How to tell about it and how to fix it?" +msgid "Documentation: How to report and fix problems" msgstr "" msgid "There are several ways to improve the documentation:" @@ -173,196 +169,201 @@ msgstr "" msgid "" "**The easiest one** is to leave your comment on the web documentation page. " -"All you need to do is click on the red button in the bottom right corner of " -"the page and fill in the comment field. You can point out an error, provide " -"feedback on the current article, or suggest changes. We review each comment " -"and take it to work. This form is built into the documentation on the " -"Tarantool website." +"To use the built-in feedback form, select the text that you want to comment " +"on, press :kbd:`Ctrl+Enter`, type your comment in the pop-up window, and " +"click :guilabel:`Submit`. On mobile screens, an :guilabel:`Error?` button " +"appears at the bottom of the screen, which opens the same pop-up window. You" +" can point out an error, provide feedback on the current article, or suggest" +" changes. We review each comment and work with it." msgstr "" msgid "" -"**Advanced** -- All Tarantool documentation tasks are `in the repository " -"`_. Here you can take any tasks and" -" suggest your changes. Our documentation is written in the `reStructuredText" -" markup " +"**Advanced**: All Tarantool documentation tasks can be found in the " +"`repository `_. Go to any task and " +"suggest your changes. We write our documentation using `reStructuredText " +"markup " "`_, and " -"we have a :doc:`writing style guide `. After making the change, you " -"need to build the documentation locally and see how it was laid out. This is" -" done automatically in Docker. `Read more in the README of the tarantool/doc" -" repository `_." +"we have a :doc:`writing style guide `. After you make the change, " +"build the documentation locally and see how it works. This can be done " +"automatically in Docker. To learn more, check the `README of the " +"tarantool/doc repository `_." msgstr "" msgid "" -"Some projects have their documentation in the code repository. For example, " -"`Tarantool Cartridge `_. This is " -"done on purpose, so the developers themselves can update it faster. " -"Instructions for building such documentation sets are in the code " -"repository." +"Some projects, like `Tarantool Cartridge " +"`_, have their documentation in the" +" code repository. 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." msgstr "" msgid "" -"If you find that the documentation in the README of a module or, for " -"example, a connector is incomplete or wrong, the best way to influence this " -"is to fix it yourself. Clone the repository, fix the bug, and suggest " -"changes as a PR (pull request). It will take you 5 minutes and will help the" -" whole community." +"If you find that the documentation provided in the README of a module or a " +"connector is incomplete or wrong, the best way to influence this is to fix " +"it yourself. Clone the repository, fix the bug, and suggest changes in a " +"pull request. It will take you five minutes but it will help the whole " +"community." msgstr "" msgid "" -"If for some reason you cannot fix it, create a ticket in this repository and" -" report the error. Such errors are fixed quickly." +"If you cannot fix it for any reason, create a ticket in the repository and " +"report the error. It will be fixed promptly." msgstr "" msgid "How to contribute to modules" msgstr "" msgid "" -"Tarantool is a database with an embedded application server. You can write " -"any code in C and Lua and pack it in distributable modules." +"Tarantool is a database with an embedded application server. This means you " +"can write any code in C or Lua and pack it in distributable modules." msgstr "" -msgid "Here are examples of official modules:" +msgid "" +"We have official and unofficial modules. Here are some of our official " +"modules:" msgstr "" msgid "" -"`HTTP server `_ -- HTTP server " +"`HTTP server `_: HTTP server " "implementation with middleware support." msgstr "" msgid "" -"`queue `_ - Tarantool implementation of " -"a persistent message queue." +"`queue `_: Tarantool implementation of " +"the persistent message queue." msgstr "" msgid "" -"`metrics `_ - ready-to-use solution " -"for collecting metrics." +"`metrics `_: Ready-to-use solution for" +" collecting metrics." msgstr "" msgid "" -"`cartridge `_ - framework for " -"writing distributed applications." +"`cartridge `_: Framework for writing" +" distributed applications." +msgstr "" + +msgid "Official modules are provided in our organization on GitHub." msgstr "" msgid "" -"Modules are distributed through our package manager, which is already " -"preinstalled with Tarantool." +"All modules are distributed through our package manager, which is pre-" +"installed with Tarantool. That also applies to unofficial modules, which " +"means that other users can get your module easily." msgstr "" msgid "" -"We have official modules and unofficial ones. The official ones are those " -"that are in our organization on GitHub. But we distribute unofficial ones " -"via our package manager too so that other users can get your module easily. " -"If you want to add your module to our GitHub organization -- `text us here " -"`_." +"If you want to add your module to our GitHub organization, `send us a " +"message on Telegram `_." msgstr "" -msgid "Want to contribute to an existing module" +msgid "Contributing to an existing module" msgstr "" msgid "" -"Tasks for contributors can be easily found in the issues section of any " -"repository by the \"good first issue\" tag. These are tasks of an initial or" -" intermediate level of difficulty that will help you get comfortable in the " -"module of interest." +"Tasks for contributors can be found in the issues section of any repository " +"under the \"good first issue\" tag. These tasks are beginner or intermediate" +" in terms of difficulty level, so you can comfortably get used to the module" +" of your interest." msgstr "" msgid "" -"Look at the `currently open tasks " +"Check the `currently open tasks " "`_" " for the HTTP Server module." msgstr "" -msgid "" -"The style guide for the Lua code we are following is :ref:`here " -"`." +msgid "Please see our :doc:`Lua style guide `." msgstr "" msgid "" -"You can contact the current maintainer through MAINTAINERS, which is located" -" in the root of the repository. If there is not such a file -- `let us know " -"`_. We will respond within one to two days." +"You can find the contact of the current maintainer in the MAINTAINERS file, " +"located in the root of the repository. If there is no such file, please `let" +" us know `_. We will respond within two days." msgstr "" msgid "" "If you see that the project does not have a maintainer or is inactive, you " -"can become one yourself. See the section :ref:`How to become a maintainer " -"`." +"can become its maintainer yourself. See the :ref:`How to become a maintainer" +" ` section." msgstr "" -msgid "Want to create a new module" +msgid "Creating a new module" msgstr "" msgid "" -"You can also create any custom modules and share them with the community. " -"`Look at the module template `_ and " -"write your own." +"You can also create custom modules and share them with the community. `Look " +"at the module template `_ and write " +"your own." msgstr "" msgid "How to contribute to Tarantool Core" msgstr "" msgid "" -"Tarantool is written mostly in C. Some parts are written in C++ and Lua. " -"Review can take longer because we want it to be reliable." +"Tarantool is written mostly in C. Some parts are in C++ and Lua. Your " +"contributions to Tarantool Core may take longer to review because we want " +"the code to be reliable." msgstr "" msgid "To start:" msgstr "" -msgid ":ref:`learn how to build Tarantool `" +msgid ":doc:`Learn how to build Tarantool `." msgstr "" msgid "" -"read about Tarantool architecture and main modules (`here " -"`__ and `here " -"`__)" +"Read about Tarantool architecture and main modules on the `developer site " +"`__ and on `GitHub " +"`__." msgstr "" msgid "" -"We have standards that we try to adhere to when developing in Tarantool. " -"These are the Style Guide and Contribution Guide :ref:`links " -"`. They tell you how to format your code, how to " -"format your commits, and how to write your test and make sure you don't " -"break anything." +"In Tarantool development, we strive to follow the standards laid out in our " +":doc:`style and contribution guides `. " +"These documents explain how to format your code and commits as well as how " +"to write tests without breaking anything accidentally." msgstr "" msgid "" -"They will also help you make a patch that is easier to check, which will " -"allow you to quickly push changes to master." +"The guidelines also help you create patches that are easy to check, which " +"allows quickly pushing changes to master." msgstr "" msgid "" -"Before your first commit, read `this article " +"Please read about `our code review procedure " "`_!" +"coding-points-to-check>`_ before making your first commit." msgstr "" -msgid "A patch can be offered in two ways:" +msgid "Here are two ways to suggest a patch:" msgstr "" msgid "" -"(preferred) Using a fork and pull mechanism on GitHub: make changes to your " -"copy of the repository and submit to us for review. See details `here " -"`__." +"(preferred) Using the fork and pull mechanism on GitHub: Make changes to " +"your copy of the repository and submit it to us for review. Check the " +"`GitHub documentation `__ to learn " +"how to do it." msgstr "" msgid "" -"Suggest a patch via the mailing list. Our developers are discussing most of " -"the features there. See details :ref:`here `." +"Suggest a patch via the mailing list. This is where our developers discuss " +"most features. Learn more in :ref:`the article on submitting patches " +"`." msgstr "" -msgid "How to write a test" +msgid "How to write tests" msgstr "" msgid "" -"The database is a product that is expected to be as reliable as possible. We" -" at Tarantool have developed a dedicated test framework for developing test " -"scripts that test Tarantool itself. The framework is called ``test-run``." +"A database is a product that is expected to be as reliable as possible. We " +"at Tarantool created ``test-run``, a dedicated test framework for developing" +" scripts that test Tarantool itself." msgstr "" -msgid "Writing your own test is not difficult. See test examples here:" +msgid "" +"Writing your own test is not difficult. Check out the following examples:" msgstr "" msgid "" @@ -376,45 +377,40 @@ msgid "" msgstr "" msgid "" -"We also have a CI that automatically checks build and test coverage for new " -"changes on all supported operating systems. This happens after any commit to" -" the repository." +"We also have a CI workflow that automatically checks build and test coverage" +" for new changes on all supported operating systems. The workflow is " +"launched after every commit to the repository." msgstr "" msgid "" -"The QA team has many tasks for specialists who are involved in checking the " -"quality of the product and tools. They provide test coverage for products, " -"help develop the test framework, and introduce and maintain new tools to " -"test the stability of releases." +"We have many tasks for QA specialists. Our QA team provides test coverage " +"for our products, helps develop the test framework, and introduces and " +"maintains new tools to test the stability of our releases." msgstr "" msgid "" -"We test modules differently: for modules, we use the `luatest " -"`_ framework. This is a fork of the " -"popular framework in the Lua community, which we have enhanced and optimized" -" for our tasks. See `examples " +"For modules, we use `luatest `_--- our" +" fork of a framework popular in the Lua community, enhanced and optimized " +"for our tasks. See `examples " "`_. of writing tests " "for a module." msgstr "" -msgid "Read: writing tests in Tarantool, writing unit tests. ???" -msgstr "" - msgid "How to contribute to language connectors" msgstr "" msgid "" -"A connector is a library that provides an API for accessing Tarantool from a" -" programming language. Tarantool uses its own binary protocol for access, " -"and the connector's task is to transfer user requests to the database and " +"A connector is a library that provides an API to access Tarantool from a " +"programming language. Tarantool uses its own binary protocol for access, and" +" the connector's task is to transfer user requests to the database and " "application server in the required format." msgstr "" msgid "" "Data access connectors have already been implemented for all major " "languages. If you want to write your own connector, you first need to " -"familiarize yourself with the Tarantool binary protocol. Its current " -"description can be found :ref:`here `." +"familiarize yourself with the Tarantool binary protocol. Read :doc:`the " +"protocol description ` to learn more." msgstr "" msgid "We consider the following connectors as references:" @@ -426,70 +422,69 @@ msgstr "" msgid "" "`net.box " "`_" -" — binary protocol client in Tarantool" +"---Tarantool binary protocol client" msgstr "" msgid "You can look at them to understand how to do it right." msgstr "" msgid "" -"The Tarantool ecosystem has connectors that are supported by the Tarantool " -"team itself, and there are connectors that are developed and supported " -"exclusively by the community. All of them have their pros and cons. See a " -"`complete list of connectors and their recommended versions " +"Some connectors in the Tarantool ecosystem are supported by the Tarantool " +"team. Others are developed and supported exclusively by the community. All " +"of them have their pros and cons. See the `complete list of connectors and " +"their recommended versions " "`_." msgstr "" msgid "" -"If you are using an existing connector from the community and want to " -"implement new features or fix a bug, then send your PRs via GitHub to the " -"desired repository." +"If you are using a community connector and want to implement new features " +"for it or fix a bug, send your PRs via GitHub to the connector repository." msgstr "" msgid "" -"To contact the author of the connector in case of questions, look in the " -"MAINTAINERS file: there will be contacts of the repository maintainer. If " -"there is no such file -- `text us here `_. We will " -"help you figure it out. We usually answer within one day." +"If you have questions for the author of the connector, check the MAINTAINERS" +" file for the repository maintainer's contact. If there is no such file, " +"`send us a message on Telegram `_. We will help you " +"figure it out. We usually answer within one day." msgstr "" msgid "How to contribute to tools" msgstr "" msgid "" -"The Tarantool ecosystem has tools that help in operation, deploy " -"applications, or allow working with Kubernetes." +"The Tarantool ecosystem has tools that facilitate the workflow, help with " +"application deployment, or allow working with Kubernetes." msgstr "" -msgid "Examples of tools from the Tarantool team:" +msgid "Here are some of the tools created by the Tarantool team:" msgstr "" msgid "" -"`ansible-cartridge `_: " -"Ansible role for deploying an application on Cartridge" +"`ansible-cartridge `_: an " +"Ansible role to deploy Cartridge applications." msgstr "" msgid "" -"`cartridge-cli `_: CLI utility " -"for creating applications, launching clusters locally on Cartridge and " -"solving operational problems" +"`cartridge-cli `_: a CLI utility" +" for creating applications, launching clusters locally on Cartridge, and " +"solving operation problems." msgstr "" msgid "" -"`tarantool-operator `_: " -"Kubernetes operator for cluster orchestration" +"`tarantool-operator `_: a " +"Kubernetes operator for cluster orchestration." msgstr "" msgid "" "These tools can be installed via standard package managers: ``ansible " -"galaxy``, ``yum``, ``apt-get``, respectively." +"galaxy``, ``yum``, or ``apt-get``." msgstr "" msgid "" -"If you have a tool that might go well in our curated `\"awesome Tarantool\" " -"list `_ you can read the " -"`guide for contributors `_ there and submit a pull request." +"If you have a tool that might go well in our curated `Awesome Tarantool list" +" `_, read the `guide for " +"contributors `_ and submit a pull request." msgstr "" msgid "How to become a maintainer" @@ -497,29 +492,30 @@ msgstr "" msgid "" "Maintainers are people who can merge PRs or commit to master. We expect " -"maintainers to answer questions and tickets in time, and do code reviews." +"maintainers to answer questions and tickets on time as well as do code " +"reviews." msgstr "" msgid "" -"If you need to get a review but no one responds for a week, take a look at " -"the Maintainers section of the ``README.md`` in the repository. Write to the" -" person listed there. If you have not received an answer in 3-4 days, you " -"can escalate the question `here `__." +"If you need to get a review but no one responds within a week, take a look " +"at the Maintainers section of the repository's ``README.md``. Write to the " +"person listed there. If you have not received an answer within 3--4 days, " +"you can escalate the question `on Telegram `__." msgstr "" msgid "" -"A repository may have no maintainers (the Maintainers list in ``README.md`` " -"is empty), or existing maintainers may be inactive. Then you can become a " -"maintainer yourself. We think it's better if the repository is maintained by" -" a newbie than if the repository is dead. So don't be shy: we love " -"maintainers and help them figure it out." +"A repository may have no maintainers (empty Maintainers list in " +"``README.md``), or the existing maintainers may be inactive. In this case, " +"you can become a maintainer yourself. We think it's better if the repository" +" is maintained by a newbie than if the repository is dead. So don't be shy: " +"we love maintainers and help them figure it all out." msgstr "" msgid "" "All you need to do is fill out `this form " "`_." -" Indicate which repository you want to access, the reason (inactivity, the " -"maintainer is not responding), and how to contact you. We will consider the " -"application in 1 day and either give you the rights or tell you what else " +" Tell us what repository you want to access, the reason (inactivity, the " +"maintainer is not responding), and how to contact you. We will consider your" +" application in 1 day and either give you the rights or tell you what else " "needs to be done." msgstr "" diff --git a/locale/ru/LC_MESSAGES/contributing/docs.po b/locale/ru/LC_MESSAGES/contributing/docs.po index 5c3a6f95e3..97105b5c56 100644 --- a/locale/ru/LC_MESSAGES/contributing/docs.po +++ b/locale/ru/LC_MESSAGES/contributing/docs.po @@ -1,4 +1,7 @@ +msgid "Contents:" +msgstr "Оглавление:" + msgid "Documentation & Localization guidelines" msgstr "" @@ -10,6 +13,3 @@ msgstr "" msgid "" "The guidelines are a work in progress, and we welcome all contributions." msgstr "" - -msgid "Contents:" -msgstr "Оглавление:" diff --git a/locale/ru/LC_MESSAGES/contributing/docs/examples.po b/locale/ru/LC_MESSAGES/contributing/docs/examples.po index 7fb4583580..538a00f42c 100644 --- a/locale/ru/LC_MESSAGES/contributing/docs/examples.po +++ b/locale/ru/LC_MESSAGES/contributing/docs/examples.po @@ -3,8 +3,8 @@ msgid "Examples and templates" msgstr "Примеры и шаблоны" msgid "" -"In this document, we explain general guidelines for describing Tarantool API" -" and give some examples and templates." +"This document contains general guidelines for describing the Tarantool API, " +"as well as examples and templates." msgstr "" msgid "Use this checklist for documenting a function or a method:" @@ -28,7 +28,7 @@ msgstr "" msgid "Complexity factors (if exist)" msgstr "" -msgid "Note re storage engine (if exists)" +msgid "Usage with memtx and vinyl (if differs)" msgstr "" msgid "Example(s)" @@ -37,12 +37,12 @@ msgstr "" msgid "Extra information (if needed)" msgstr "" -msgid "Documenting a function" +msgid "Documenting functions" msgstr "" msgid "" -"We describe functions of Tarantool modules via Sphinx directives ``.. " -"module::`` and ``.. function::``:" +"We use the Sphinx directives ``.. module::`` and ``.. function::`` to " +"describe functions of Tarantool modules:" msgstr "" msgid "" @@ -77,7 +77,7 @@ msgid "" " ...\n" msgstr "" -msgid "And the resulting output looks like this:" +msgid "The resulting output looks like this:" msgstr "" msgid "" @@ -137,22 +137,22 @@ msgstr "" "---\n" "..." -msgid "Documenting class method and data" +msgid "Documenting class methods and data" msgstr "" msgid "" -"Description of a method is similar to a function, but the ``.. class::`` " +"Methods are described similarly to functions, but the ``.. class::`` " "directive, unlike ``.. module::``, requires nesting." msgstr "" msgid "" -"As for documenting data, it will be enough to write a description, a return " -"type, and an example." +"As for data, it's enough to write the description, the return type, and an " +"example." msgstr "" msgid "" -"Here is an example of documenting a method and data of a class " -"``index_object``:" +"Here is the example documentation describing the method and data of the " +"``index_object`` class:" msgstr "" msgid "" @@ -201,6 +201,9 @@ msgid "" " ...\n" msgstr "" +msgid "And the resulting output looks like this:" +msgstr "" + msgid "Search for a tuple :ref:`via the given index `." msgstr "" diff --git a/locale/ru/LC_MESSAGES/contributing/docs/infra.po b/locale/ru/LC_MESSAGES/contributing/docs/infra.po index 35bfb59f4d..323a0cfa18 100644 --- a/locale/ru/LC_MESSAGES/contributing/docs/infra.po +++ b/locale/ru/LC_MESSAGES/contributing/docs/infra.po @@ -3,40 +3,40 @@ msgid "Documentation infrastructure" msgstr "" msgid "" -"In this section of the :doc:`documentation guidelines `," -" we deal with some support activities to ensure the correct building of " -"documentation." +"This section of the :doc:`documentation guidelines ` " +"discusses some of the support activities that ensure the correct building of" +" documentation." msgstr "" msgid "Adding submodules" msgstr "" msgid "" -"The source files with the documentation content are mainly stored in the " -"`documentation repository `_. However, in " -"some of the cases the content source files are stored in repositories of " -"other Tarantool-related products and modules, for example, `Cartridge " -"`_, `Monitoring " -"`__, and " -"some others." +"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." msgstr "" msgid "" -"In this case, we need to add such a repository containing the source files " -"as a submodule to the `documentation repository " -"`_ and set up other necessary settings to " -"ensure the proper building of the entire body of Tarantool documentation " -"presented at the `official web-site `_." +"If you are working with source files from a product or module repository, " +"add that repository as a submodule to the `documentation repository " +"`_ and configure other necessary settings." +" This will ensure that the entire body of Tarantool documentation, presented" +" on the `official website `_, is built " +"properly." msgstr "" -msgid "The steps to do that are the following:" +msgid "Here is how to do that:" msgstr "" msgid "1. Add a submodule" msgstr "" msgid "" -"First, we need to add a repository containing the content source files as a " +"First, we need to add the repository with content source files as a " "submodule." msgstr "" @@ -54,8 +54,7 @@ msgid "" msgstr "" msgid "" -"Check that the new submodule appears in the ``.gitmodules`` file, for " -"example:" +"Check that the new submodule is in the ``.gitmodules`` file, for example:" msgstr "" msgid "" @@ -68,42 +67,39 @@ msgid "2. Update build_submodules.sh" msgstr "" msgid "" -"Next, we should define what directories and files are to be copied from the " -"submodule repository into the documentation one before building " -"documentation. These settings are defined in the ``build_submodules.sh`` " -"file which is in the root directory of the documentation repository." +"Now define what directories and files are to be copied from the submodule " +"repository to the documentation repository before building documentation. " +"These settings are defined in the ``build_submodules.sh`` file in the root " +"directory of the documentation repository." msgstr "" msgid "" -"We can take examples of the already existing submodules to show the logic of" -" the settings." +"Here are some real submodule examples that show the logic of the settings." msgstr "" msgid "metrics" msgstr "" msgid "" -"In case of the ``metrics`` submodule, the content source files are in the " +"The content source files for the ``metrics`` submodule are in the " "``./doc/monitoring`` directory of the submodule repository. In the final " "documentation view, the content should appear in the `Monitoring " "`__ chapter " "(``https://www.tarantool.io/en/doc/latest/book/monitoring/``)." msgstr "" -msgid "So, we need to:" +msgid "To make this work:" msgstr "" -msgid "create a directory at ``./doc/book/monitoring/``." +msgid "Create a directory at ``./doc/book/monitoring/``." msgstr "" msgid "" -"copy the entire content of the ``./modules/metrics/doc/monitoring/`` " +"Copy the entire content of the ``./modules/metrics/doc/monitoring/`` " "directory to ``./doc/book/monitoring/``." msgstr "" -msgid "" -"The corresponding lines in the ``build_submodules.sh`` file are the " -"following:" +msgid "Here are the corresponding lines in ``build_submodules.sh``:" msgstr "" msgid "" @@ -115,33 +111,30 @@ msgid "" msgstr "" msgid "" -"The ``${project_root}`` variable is defined earlier as " -"``project_root=$(pwd)``. We should start the documentation build from the " -"documentation repository root directory so that will be the value of the " -"variable." +"The ``${project_root}`` variable is defined earlier in the file as " +"``project_root=$(pwd)``. This is because the documentation build has to " +"start from the documentation repository root directory." msgstr "" msgid "cartridge_cli" msgstr "" msgid "" -"In case of the ``cartridge_cli`` submodule, the content source is in the " -"``README.rst`` file located in the directory of the submodule repository. In" -" the final documentation view, the content should appear here: " +"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/``." msgstr "" -msgid "create a directory at ``./doc/book/cartridge/cartridge_cli``" +msgid "Create a directory at ``./doc/book/cartridge/cartridge_cli``." msgstr "" msgid "" -"copy ``./modules/cartridge_cli/README.rst`` to " +"Copy ``./modules/cartridge_cli/README.rst`` to " "``./doc/book/cartridge/cartridge_cli/index.rst``." msgstr "" -msgid "" -"The corresponding settings in the ``build_submodules.st`` file are the " -"following:" +msgid "Here ar the corresponding settings in ``build_submodules.sh``:" msgstr "" msgid "" @@ -158,6 +151,5 @@ msgid "3. Update .gitignore" msgstr "" msgid "" -"Finaly, we should add paths to the copied directories and files to the " -"``.gitignore`` file." +"Finally, add paths to the copied directories and files to ``.gitignore``." msgstr "" diff --git a/locale/ru/LC_MESSAGES/contributing/docs/localization.po b/locale/ru/LC_MESSAGES/contributing/docs/localization.po index 22d83b84a6..4d74aa004b 100644 --- a/locale/ru/LC_MESSAGES/contributing/docs/localization.po +++ b/locale/ru/LC_MESSAGES/contributing/docs/localization.po @@ -1,4 +1,7 @@ +msgid "Contents:" +msgstr "" + msgid "Localization" msgstr "" @@ -7,6 +10,3 @@ msgid "" "you are translating Tarantool docs into Russian, be sure to check out our " "translation guidelines." msgstr "" - -msgid "Contents:" -msgstr "" diff --git a/locale/ru/LC_MESSAGES/contributing/docs/markup.po b/locale/ru/LC_MESSAGES/contributing/docs/markup.po index 2eaecb7c28..8f02a11c63 100644 --- a/locale/ru/LC_MESSAGES/contributing/docs/markup.po +++ b/locale/ru/LC_MESSAGES/contributing/docs/markup.po @@ -1,14 +1,13 @@ +msgid "Contents:" +msgstr "Оглавление:" + msgid "Markup reference" msgstr "" msgid "" -"Tarantool documentation is built via `Sphinx `_ engine and is written in `reStructuredText " -"`_ " -"markup. This section will guide you through our typical cases while writing " -"the docs." +"`_. This" +" section will guide you through our typical documentation formatting cases." msgstr "" - -msgid "Contents:" -msgstr "Оглавление:" diff --git a/locale/ru/LC_MESSAGES/contributing/docs/markup/admonitions.po b/locale/ru/LC_MESSAGES/contributing/docs/markup/admonitions.po index bea97522ec..6133b9e789 100644 --- a/locale/ru/LC_MESSAGES/contributing/docs/markup/admonitions.po +++ b/locale/ru/LC_MESSAGES/contributing/docs/markup/admonitions.po @@ -43,6 +43,23 @@ msgid "" "user about some consequences of his actions." msgstr "" +msgid "Important:" +msgstr "" + +msgid ".. important::" +msgstr "" + +msgid "" +"This block contains essential information that the user should know while " +"doing something." +msgstr "" + +msgid "" +"For example, the block :doc:`in Getting Started with Docker " +"` is used to warn the user against " +"closing the terminal window." +msgstr "" + msgid "Custom admonition:" msgstr "" diff --git a/locale/ru/LC_MESSAGES/contributing/docs/markup/links.po b/locale/ru/LC_MESSAGES/contributing/docs/markup/links.po index 706a73876c..58ca7876e7 100644 --- a/locale/ru/LC_MESSAGES/contributing/docs/markup/links.po +++ b/locale/ru/LC_MESSAGES/contributing/docs/markup/links.po @@ -43,11 +43,11 @@ msgstr "" msgid "Our naming convention is as follows:" msgstr "Соглашение об именовании заключается в следующем:" -msgid "Character set: a through z, 0 through 9, dash, underscore." -msgstr "Набор символов: от a до z, от 0 до 9, дефис, подчеркивание." +msgid "Character set: a through z, 0 through 9, hyphen, underscore." +msgstr "" -msgid "Format: ``path dash filename dash tag``" -msgstr "Формат: ``путь дефис имя файла дефис тег``" +msgid "Format: ``path hyphen filename hyphen tag``" +msgstr "" msgid "**Example:**" msgstr "**Пример:**" @@ -68,24 +68,17 @@ msgid "``iterator_type`` is the tag." msgstr "" msgid "" -"Use a dash \"-\" to delimit the path and the file name. In the documentation" -" source, we use only underscores \"_\" in paths and file names, reserving " -"dash \"-\" as the delimiter for local links." +"Use a hyphen \"-\" to delimit the path and the file name. In the " +"documentation source, we use only underscores \"_\" in paths and file names," +" reserving the hyphen \"-\" as the delimiter for local links." msgstr "" -"Используйте дефис \"-\", чтобы разграничить путь и имя файла. В исходном " -"коде документации мы пользуемся только символами подчеркивания \"_\" при " -"указании пути и имени файла, оставляя дефисы \"-\" для разграничения в " -"локальных ссылках." msgid "" "The tag can be anything meaningful. The only guideline is for Tarantool " "syntax items (such as members), where the preferred tag syntax is " -"``module_or_object_name dash member_name``. For example, ``box_space-drop``." +"``module_or_object_name hyphen member_name``. For example, ``box_space-" +"drop``." msgstr "" -"Тег может содержать любую значимую информацию. Единственная рекомендация " -"дается для элементов синтаксиса Tarantool'а, где предпочтительно " -"использовать следующий синтаксис в тегах: ``имя_объекта_или_модуля дефис " -"имя_элемента``. Например, ``box_space-drop``." msgid "To add a link to an anchor, use the following syntax:" msgstr "" diff --git a/locale/ru/LC_MESSAGES/contributing/docs/sphinx-warnings.po b/locale/ru/LC_MESSAGES/contributing/docs/sphinx-warnings.po index 571a81b042..e4616dc997 100644 --- a/locale/ru/LC_MESSAGES/contributing/docs/sphinx-warnings.po +++ b/locale/ru/LC_MESSAGES/contributing/docs/sphinx-warnings.po @@ -3,13 +3,11 @@ msgid "Sphinx-build warnings reference" msgstr "" msgid "" -"This document will guide you through the possible warnings raised by Sphinx " -"engine while building the docs." +"This document will guide you through the warnings that can be raised by " +"Sphinx while building the docs." msgstr "" -msgid "" -"Below we cite a list with the most frequent warnings and the ways of " -"solutions." +msgid "Below are the most frequent warnings and the ways to solve them." msgstr "" msgid "Bullet list ends without a blank line; unexpected unindent" @@ -59,8 +57,8 @@ msgid "" msgstr "" msgid "" -"Sometimes, however, there's no appropriate lexer, or the code snippet can't " -"be lexed properly. In such case, use ``code-block:: text``." +"However, sometimes there's no appropriate lexer or the code snippet can't be" +" lexed properly. In that case, use ``code-block:: text``." msgstr "" msgid "Duplicate explicit target name: \"...\"" @@ -68,22 +66,22 @@ msgstr "" msgid "" "* `Install `_\n" -" ``git``, a version control system.\n" +" ``git``, the version control system.\n" "\n" "* `Install `_\n" " the ``unzip`` utility." msgstr "" msgid "" -"Sphinx-builder raises warnings when we call different targets the same " -"names. Sphinx developers `recommend `_ using double underlines ``__`` in such cases to " "avoid this." msgstr "" msgid "" "* `Install `__\n" -" ``git``, a version control system.\n" +" ``git``, the version control system.\n" "\n" "* `Install `__\n" " the ``unzip`` utility." @@ -97,23 +95,25 @@ msgid "" msgstr "" msgid "" -"If you don't need it there, place ``:orphan:`` directive at the top of the " -"file. Or, if this file is included somewhere or reused, add it to the " -"_includes directory. These directories are ignored by Sphinx because we put " -"them in ``exclude_patterns`` in ``conf.py`` file." +"If you don't want to include the document in a toctree, place the " +"``:orphan:`` directive at the top of the file. If this file is already " +"included somewhere or reused, add it to the _includes directory. Sphinx " +"ignores everything in this directory because we list it among " +"``exclude_patterns`` in ``conf.py``." msgstr "" msgid "Duplicate label \"...\", other instance in \".../.../...\"" msgstr "" msgid "" -"This happens if you include the contents of one file with tags in another. " -"Then Sphinx thinks the tags are repeated." +"This happens if you include the contents of a file into another file, when " +"the included file has tags in it. In this, Sphinx thinks the tags are " +"repeated." msgstr "" msgid "" -"As in previous case, don't forget to add such file in _includes or avoid " -"using tags within it." +"As in the previous case, add the file to _includes or avoid using tags in " +"it." msgstr "" msgid "Malformed hyperlink target" @@ -122,7 +122,7 @@ msgstr "" msgid "**Similar warning:** Unknown target name: \"...\"" msgstr "" -msgid "Check the spelling of the target or the accuracy of the tag." +msgid "Check the target spelling and the tag syntax." msgstr "" msgid ".. _box_space-index_func" @@ -132,7 +132,7 @@ msgid "" "See the :ref:`Creating a functional index ` section." msgstr "" -msgid "Semicolon is missing in tag definition:" +msgid "A semicolon is missing in the tag definition:" msgstr "" msgid ".. _box_space-index_func:" @@ -141,16 +141,14 @@ msgstr "" msgid "Toctree contains reference to nonexisting document '...'" msgstr "" -msgid "" -"This may happen when you, for example, refer to the wrong path to a " -"document." +msgid "This may happen when you refer to a wrong path to a document." msgstr "" msgid "Check the path." msgstr "" msgid "" -"If the path is in ``cartridge`` or another submodule, check that you've " +"If the path points to ``cartridge`` or another submodule, check that you've " ":doc:`built the submodules content ` before " "building docs." msgstr "" @@ -172,37 +170,37 @@ msgstr "" msgid "**See also:**" msgstr "**См. также:**" -msgid ":doc:`/contributing/docs/markup/links`" +msgid ":doc:`Links and references `" msgstr "" msgid "Unexpected indentation" msgstr "" msgid "" -"The reStructuredText syntax is based on indentation, much like in Python. In" -" a block of content, all lines should be equally indented. An increase or " -"decrease in indentation means the end of the current block and the beginning" -" of a new one." +"The reStructuredText syntax is based on indentation, much like in Python. " +"All lines in a block of content must be equally indented. An increase or " +"decrease in indentation denotes the end of the current block and the " +"beginning of a new one." msgstr "" msgid "" -"Note: dots show indentation spaces in these examples. For example, ``|..|`` " -"means a two-space indentation." +"Note: In the following examples, dots stand for indentation spaces. For " +"example, ``|..|`` denotes a two-space indentation." msgstr "" msgid "" "|..|* (Engines) Improve dump start/stop logging. When initiating memory dump, print\n" -"how much memory is going to be dumped, expected dump rate, ETA, and the recent\n" +"how much memory is going to be dumped, the expected dump rate, ETA, and the recent\n" "write rate." msgstr "" msgid "" "*|...|(Engines) Improve dump start/stop logging. When initiating memory dump, print\n" -"|....|how much memory is going to be dumped, expected dump rate, ETA, and the recent\n" +"|....|how much memory is going to be dumped, the expected dump rate, ETA, and the recent\n" "|....|write rate." msgstr "" -msgid ":doc:`/contributing/docs/markup/intro`" +msgid ":doc:`General syntax guidelines `" msgstr "" msgid "Unknown document" @@ -212,7 +210,7 @@ msgid ":doc:`reference/reference_lua/box_space/update`" msgstr "" msgid "" -"Sphinx did not recognise the file path correctly due to a missing slash at " +"Sphinx did not recognize the file path correctly due to a missing slash at " "the beginning, so let's just put it there:" msgstr "" diff --git a/locale/ru/LC_MESSAGES/contributing/docs/style.po b/locale/ru/LC_MESSAGES/contributing/docs/style.po index 4c560dac5f..9e94666943 100644 --- a/locale/ru/LC_MESSAGES/contributing/docs/style.po +++ b/locale/ru/LC_MESSAGES/contributing/docs/style.po @@ -5,37 +5,27 @@ msgstr "" msgid "US vs British spelling" msgstr "Британский или американский вариант английского" -msgid "We use English US spelling." +msgid "We use the US English spelling." msgstr "" -"В английской версии документации мы придерживаемся американского варианта " -"английского языка." msgid "Instance vs server" msgstr "Экземпляр или сервер" msgid "" -"We say \"instance\" rather than \"server\" to refer to an instance of " -"Tarantool server. This keeps the manual terminology consistent with names " -"like ``/etc/tarantool/instances.enabled`` in the Tarantool environment." +"We say \"instance\" rather than \"server\" to refer to a Tarantool server " +"instance. This keeps the manual terminology consistent with names like " +"``/etc/tarantool/instances.enabled`` in the Tarantool environment." msgstr "" -"Ссылаясь на экземпляр Tarantool-сервера, мы говорим \"экземпляр\", а не " -"\"сервер\". Это обеспечивает однородность терминологии в руководстве и " -"именами в окружении Tarantool'а (например, " -"``/etc/tarantool/instances.enabled`` -- активные экземпляры)." msgid "" -"Wrong usage: \"Replication allows multiple Tarantool *servers* to work on " -"copies of the same databases.\"" +"Wrong usage: \"Replication allows multiple Tarantool *servers* to work with " +"copies of the same database.\"" msgstr "" -"Неправильно: \"С помощью репликации несколько *серверов* Tarantool’а могут " -"работать на копиях одинаковых баз данных.\"" msgid "" "Correct usage: \"Replication allows multiple Tarantool *instances* to work " -"on copies of the same databases.\"" +"with copies of the same database.\"" msgstr "" -"Правильно: \"С помощью репликации несколько *экземпляров* Tarantool’а могут " -"работать на копиях одинаковых баз данных.\"" msgid "Express one idea in a sentence" msgstr "" @@ -75,15 +65,15 @@ msgid "" msgstr "" msgid "" -"A replica set from which the bucket is being migrated is called a source; a " -"target replica set to which the bucket is being migrated is called a " -"destination." +"The replica set from where the bucket is being migrated is called the " +"source; the target replica set where the bucket is being migrated to is " +"called the destination." msgstr "" msgid "" -"A replica set from which the bucket is being migrated is called a source. A " -"target replica set to which the bucket is being migrated is called a " -"destination." +"The replica set from where the bucket is being migrated is called the " +"source. The target replica set where the bucket is being migrated to is " +"called the destination." msgstr "" msgid "Don't use i.e. and e.g." @@ -93,28 +83,29 @@ msgid "Don't use the following contractions:" msgstr "" msgid "" -"`\"i.e.\" `_ —from Latin " -"\"id est\". Use \"that is\" or \"which means\" instead." +"`\"i.e.\" `_---from the " +"Latin \"id est\". Use \"that is\" or \"which means\" instead." msgstr "" msgid "" -"`\"e.g.\" `_ —from Latin " -"\"exempli gratia\". Use \"for example\" or \"such as\" instead." +"`\"e.g.\" `_---from the " +"Latin \"exempli gratia\". Use \"for example\" or \"such as\" instead." msgstr "" msgid "" -"Many people, especially non-native English speakers, aren't familiar or " -"don't know the difference between `\"i.e.\" and \"e.g.\" contractions " -"`_. So it's best to avoid using them." +"Many people, especially non-native English speakers, aren't familiar with " +"the `\"i.e.\" and \"e.g.\" contractions `_ " +"or don't know the difference between them. For this reason, it's best to " +"avoid using them." msgstr "" -msgid "Specify a link text" +msgid "Specify link text" msgstr "" msgid "" -"While giving a :doc:`link `, specify " -"clearly where this link leads. Thus, you will not mislead a reader." +"When you provide a :doc:`link `, clearly " +"specify where it leads. In this way, you will not mislead the reader." msgstr "" msgid "Bad example:" diff --git a/locale/ru/LC_MESSAGES/contributing/docs/terms.po b/locale/ru/LC_MESSAGES/contributing/docs/terms.po index 484d0753ce..1b1b99db2d 100644 --- a/locale/ru/LC_MESSAGES/contributing/docs/terms.po +++ b/locale/ru/LC_MESSAGES/contributing/docs/terms.po @@ -6,83 +6,82 @@ msgid "What are concepts and terms" msgstr "" msgid "" -"To write well about some subject matter, one needs to know the objects of " -"this subject matter and use the right, carefully selected words for them. " -"Such objects are called concepts, and the words for them are called terms." +"To write well about a certain subject matter, one needs to know its details " +"and use the right, carefully selected words for them. These details are " +"called concepts, and the words for them are called terms." msgstr "" msgid "concept" msgstr "" msgid "" -"The concept is the idea of some object, attribute, or action. It is " -"independent of languages, audience, and products. It just exists." +"A concept is the idea of an object, attribute, or action. It is independent " +"of languages, audience, and products. It just exists." msgstr "" msgid "" -"For example, a large database can be partitioned into smaller instances, " -"which are easier to operate and can exceed the throughput of a single large " -"database instance. Such instances can exchange data for keeping it " -"consistent between them." +"For example, a large database can be partitioned into smaller instances. " +"Those instances are easier to operate, and their throughput often exceeds " +"the throughput of a single large database instance. The instances can " +"exchange data to keep it consistent between them." msgstr "" msgid "term" msgstr "" msgid "" -"The term is a word, which authors or a particular book, article, or " -"documentation set have explicitly selected to denote a :term:`concept` in a " -"particular language and for a particular audience." +"A term is a word explicitly selected by the authors of a particular text to " +"denote a :term:`concept` in a particular language for a particular audience." msgstr "" msgid "" "For example, in Tarantool, we use the term \"[database] sharding\" to denote" -" the concept mentioned in the previous example." +" the concept described in the previous example." msgstr "" msgid "Use preferred terms" msgstr "" msgid "" -"The purpose of using terms is to write concisely and unambiguously, which is" -" good for readers. But selecting terms is hard. Often there are two or more " -"terms for one concept popular with the community, so there's no obvious " -"choice. Indeed, selecting and consistently using any of them is much better " -"than not selecting and just using random terms each time. This is why it's " -"also helpful to restrict the usage of some terms explicitly." +"The purpose of using terms is writing concisely and unambiguously, which is " +"good for the readers. But selecting terms is hard. Often, the community " +"favors two or more terms for one concept, so there's no obvious choice. " +"Selecting and consistently using any of them is much better than not making " +"a choice and using a random term every time. This is why it's also helpful " +"to restrict the usage of some terms explicitly." msgstr "" msgid "restricted term" msgstr "" msgid "" -"A restricted term is a word that authors have explicitly forbidden to use " +"A restricted term is a word that the authors explicitly prohibited to use " "for denoting a :term:`concept`. Such a word is sometimes used as a " -":term:`term` for the same :term:`concept` elsewhere: in the community, in " -"other books, or other products' documentation. Sometimes, this word is used " -"to denote a similar but different concept. In this case, the right choice of" -" terms helps us differentiate between concepts." +":term:`term` for the same :term:`concept` elsewhere---in the community, in " +"books, or in other product documentation. Sometimes this word is used to " +"denote a similar but different concept. In this case, the right choice of " +"terms helps us differentiate between concepts." msgstr "" msgid "" "For example, in Tarantool, we don't use the term \"[database] segmentation\"" -" to denote what we call \"database sharding.\" Although, other authors could" -" do so. Also, there is the term \"[database] partitioning\" that we use to " -"denote a wider concept, which includes sharding and other things." +" to denote what we call \"database sharding.\" Nevertheless, other authors " +"might do so. We also use the term \"[database] partitioning\" to denote a " +"wider concept, which includes sharding among other things." msgstr "" msgid "Define terms by explaining concepts" msgstr "" msgid "" -"Define the term by explaining the concept. For the most important concepts " -"and the ones unique to Tarantool, the definition should always be in our " -"documentation." +"We always want to document definitions for the most important concepts, as " +"well as for concepts unique to Tarantool." msgstr "" msgid "" -"Define each term in the document which is most relevant to it. There's no " -"need to gather all definitions on a particular \"Glossary\" page." +"Define every term in the document that you find most appropriate for it. You" +" don't have to create a dedicated glossary page containing all the " +"definitions." msgstr "" msgid "To define a term, use the ``glossary`` directive in the following way:" @@ -106,17 +105,17 @@ msgstr "" msgid "" "The `Sphinx documentation `_ has an extensive glossary, which " -"we can use as a reference." +"doc/sphinx/blob/master/doc/glossary.rst>`_ has an extensive glossary that " +"can be used as a reference." msgstr "" msgid "Introduce terms on first entry" msgstr "" msgid "" -"When you use a term for the first time in a document, introduce it by giving" -" a definition, synonyms, translation, examples, and links. It will help " -"readers learn the term and understand the concept behind it." +"When you use a term in a document for the first time, define it and provide " +"synonyms, a translation, examples, and/or links. It will help readers learn " +"the term and understand the concept behind it." msgstr "" msgid "Define the term or give a link to the definition." @@ -130,15 +129,15 @@ msgstr "" msgid "" "For example, this is a link to the definition of :term:`concept`.\n" -"As with any rST role, it can have :term:`custom text `." +"Like any rST role, it can have :term:`custom text `." msgstr "" msgid "The resulting output will look like this:" msgstr "" msgid "" -"For example, this is a link to the definition of :term:`concept`. As with " -"any rST role, it can have :term:`custom text `." +"For example, this is a link to the definition of :term:`concept`. Like any " +"rST role, it can have :term:`custom text `." msgstr "" msgid "With acronyms, you can also use the `abbr` role:" @@ -160,10 +159,10 @@ msgstr "" msgid "" "When writing in Russian, it's good to add the corresponding English term. " -"Readers may be more familiar with it or can use it in search." +"Readers may be more familiar with it or can search it online." msgstr "" -msgid "Шардирование (сегментирование, sharding) — это..." +msgid "Шардирование (сегментирование, sharding) --- это..." msgstr "" msgid "Give examples or links to extra reading where you can." diff --git a/locale/ru/LC_MESSAGES/dev_guide/building_from_source.po b/locale/ru/LC_MESSAGES/dev_guide/building_from_source.po index 553d824fc7..95880fcc3a 100644 --- a/locale/ru/LC_MESSAGES/dev_guide/building_from_source.po +++ b/locale/ru/LC_MESSAGES/dev_guide/building_from_source.po @@ -146,8 +146,8 @@ msgid "RHEL/CentOS 7" msgstr "" msgid "" -"$ yum install python-pip\n" -"$ yum install epel-release\n" +"$ yum install -y python-pip\n" +"$ yum install -y epel-release\n" "\n" "$ curl -s https://packagecloud.io/install/repositories/packpack/backports/script.rpm.sh | bash\n" "\n" @@ -178,10 +178,10 @@ msgid "CentOS 8" msgstr "" msgid "" -"$ dnf install epel-release\n" +"$ dnf install -y epel-release\n" "\n" -"$ dnf install -y git gcc cmake3 make gcc-c++ zlib-devel readline-devel \\\n" -" ncurses-devel openssl-devel libunwind-devel libicu-devel \\\n" +"$ dnf install -y git gcc cmake3 libarchive make gcc-c++ zlib-devel \\\n" +" readline-devel ncurses-devel openssl-devel libunwind-devel libicu-devel \\\n" " python3-pyyaml python3-six python3-gevent\n" "\n" "$ git clone https://github.com/tarantool/tarantool.git --recursive\n" diff --git a/locale/ru/LC_MESSAGES/dev_guide/internals/box_protocol.po b/locale/ru/LC_MESSAGES/dev_guide/internals/box_protocol.po index 6ff5f08430..a9e3d8720b 100644 --- a/locale/ru/LC_MESSAGES/dev_guide/internals/box_protocol.po +++ b/locale/ru/LC_MESSAGES/dev_guide/internals/box_protocol.po @@ -72,7 +72,9 @@ msgid "" "` |br|:ref:`IPROTO_SUBSCRIBE ` " "|br|:ref:`IPROTO_VOTE_DEPRECATED ` |br|:ref:`IPROTO_VOTE " "` |br|:ref:`IPROTO_FETCH_SNAPSHOT ` " -"|br|:ref:`IPROTO_REGISTER `" +"|br|:ref:`IPROTO_REGISTER ` |br|:ref:`IPROTO_BEGIN " +"` |br|:ref:`IPROTO_COMMIT ` " +"|br|:ref:`IPROTO_ROLLBACK `" msgstr "" "Запросы: |br|:ref:`IPROTO_SELECT ` " "|br|:ref:`IPROTO_INSERT ` |br|:ref:`IPROTO_REPLACE " @@ -87,7 +89,9 @@ msgstr "" "` |br|:ref:`IPROTO_SUBSCRIBE ` " "|br|:ref:`IPROTO_VOTE_DEPRECATED ` |br|:ref:`IPROTO_VOTE " "` |br|:ref:`IPROTO_FETCH_SNAPSHOT ` " -"|br|:ref:`IPROTO_REGISTER `" +"|br|:ref:`IPROTO_REGISTER ` |br|:ref:`IPROTO_BEGIN " +"` |br|:ref:`IPROTO_COMMIT ` " +"|br|:ref:`IPROTO_ROLLBACK `" msgid "Body of a request" msgstr "Тело запроса" @@ -224,8 +228,11 @@ msgid "" "IPROTO_EXECUTE=0x0b\n" "IPROTO_NOP=0x0c\n" "IPROTO_PREPARE=0x0d\n" -"IPROTO_CONFIRM=0x28\n" -"IPROTO_ROLLBACK=0x29\n" +"IPROTO_BEGIN=0x0e\n" +"IPROTO_COMMIT=0x0f\n" +"IPROTO_ROLLBACK=0x10\n" +"IPROTO_RAFT_CONFIRM=0x28\n" +"IPROTO_RAFT_ROLLBACK=0x29\n" "IPROTO_PING=0x40\n" "IPROTO_JOIN=0x41\n" "IPROTO_SUBSCRIBE=0x42\n" @@ -247,8 +254,11 @@ msgstr "" "IPROTO_EXECUTE=0x0b\n" "IPROTO_NOP=0x0c\n" "IPROTO_PREPARE=0x0d\n" -"IPROTO_CONFIRM=0x28\n" -"IPROTO_ROLLBACK=0x29\n" +"IPROTO_BEGIN=0x0e\n" +"IPROTO_COMMIT=0x0f\n" +"IPROTO_ROLLBACK=0x10\n" +"IPROTO_RAFT_CONFIRM=0x28\n" +"IPROTO_RAFT_ROLLBACK=0x29\n" "IPROTO_PING=0x40\n" "IPROTO_JOIN=0x41\n" "IPROTO_SUBSCRIBE=0x42\n" @@ -273,6 +283,7 @@ msgid "" "IPROTO_TIMESTAMP=0x04\n" "IPROTO_SCHEMA_VERSION=0x05\n" "IPROTO_FLAGS=0x09\n" +"IPROTO_STREAM_ID=0x0a\n" "IPROTO_SPACE_ID=0x10\n" "IPROTO_INDEX_ID=0x11\n" "IPROTO_LIMIT=0x12\n" @@ -322,6 +333,7 @@ msgstr "" "IPROTO_TIMESTAMP=0x04\n" "IPROTO_SCHEMA_VERSION=0x05\n" "IPROTO_FLAGS=0x09\n" +"IPROTO_STREAM_ID=0x0a\n" "IPROTO_SPACE_ID=0x10\n" "IPROTO_INDEX_ID=0x11\n" "IPROTO_LIMIT=0x12\n" @@ -451,12 +463,14 @@ msgid "" " IPROTO_REQUEST_TYPE: :samp:`{{MP_UINT unsigned integer}}`,\n" " IPROTO_SYNC: :samp:`{{MP_UINT unsigned integer}}`,\n" " IPROTO_SCHEMA_VERSION: :samp:`{{MP_UINT unsigned integer}}`\n" +" IPROTO_STREAM_ID: :samp:`{{MP_UINT unsigned integer}}`\n" "})" msgstr "" "msgpack({\n" " IPROTO_REQUEST_TYPE: :samp:`{{MP_UINT unsigned integer}}`,\n" " IPROTO_SYNC: :samp:`{{MP_UINT unsigned integer}}`,\n" " IPROTO_SCHEMA_VERSION: :samp:`{{MP_UINT unsigned integer}}`\n" +" IPROTO_STREAM_ID: :samp:`{{MP_UINT unsigned integer}}`\n" "})" msgid "" @@ -497,6 +511,22 @@ msgstr "" "IPROTO_SCHEMA_VERSION присутствует всегда, и клиент должен сам проверить, не" " изменилась ли версия." +msgid "" +"**IPROTO_STREAM_ID** = 0x0a. An unsigned number that should be unique in " +"every stream. In requests IPROTO_STREAM_ID is optional and is useful for two" +" things: ensuring that requests within transactions are done in separate " +"groups, and ensuring strictly consistent execution of requests (whether or " +"not they are within transactions). In responses IPROTO_STREAM_ID does not " +"appear. See :ref:`Binary protocol -- streams `." +msgstr "" +"**IPROTO_STREAM_ID** = 0x0a. Беззнаковое число, которое должно быть " +"уникально для каждого стрима. В запросах указывать значение IPROTO_STREAM_ID" +" необязательно. Однако оно может понадобиться, если необходимо обрабатывать " +"запросы внутри транзакций отдельными группами или выполнять запросы строго " +"последовательно независимо от того, входят ли они в ту или иную транзакцию. " +"В ответах IPROTO_STREAM_ID отсутствует. См. :ref:`Бинарный протокол -- " +"стримы`." + msgid "" "Have a look at file `xrow.c " "`_ " @@ -996,11 +1026,11 @@ msgstr "" "})" msgid "" -"Example: if this is the fifth message, |br| " -":samp:`{conn}.:code:`eval('return 5;')` will cause:" +"Example: if this is the fifth message, :samp:`conn:eval('return 5;')` will " +"cause:" msgstr "" -"Пример: если это пятое сообщение, |br| :samp:`{conn}.:code:`eval('return " -"5;')` вызовет:" +"Пример. Если это пятое сообщение, :samp:`conn:eval('return 5;')` приведет к " +"следующему:" msgid "" "# \n" @@ -1155,17 +1185,17 @@ msgstr "" "})" msgid "" -"Use IPROTO_STMT_ID (0x43) + statement-id (MP_INT) if executing a prepared " -"statement, or use IPROTO_SQL_TEXT (0x40) + statement-text (MP_STR) if " -"executing an SQL string, then IPROTO_SQL_BIND (0x41) + array of parameter " +"Use IPROTO_STMT_ID (0x43) and statement-id (MP_INT) if executing a prepared " +"statement, or use IPROTO_SQL_TEXT (0x40) and statement-text (MP_STR) if " +"executing an SQL string, then IPROTO_SQL_BIND (0x41) and array of parameter " "values to match ? placeholders or :name placeholders, IPROTO_OPTIONS (0x2b) " -"+ array of options (usually empty)." +"and array of options (usually empty)." msgstr "" -"При выполнении подготовленного оператора используйте IPROTO_STMT_ID (0x43) +" +"При выполнении подготовленного оператора используйте IPROTO_STMT_ID (0x43) и" " ID оператора (MP_INT), при работе со строками SQL — IPROTO_SQL_TEXT (0x40) " -"+ текст оператора (MP_STR), а затем IPROTO_SQL_BIND (0x41) + массив значений" -" параметров для подстановочных знаков ? или :name, IPROTO_OPTIONS (0x2b) + " -"массив параметров (обычно пустой)." +"и текст оператора (MP_STR), а затем IPROTO_SQL_BIND (0x41) и массив значений" +" параметров для подстановочных знаков ``?`` или ``:name``, IPROTO_OPTIONS " +"(0x2b) и массив параметров (обычно пустой)." msgid "" "For example, suppose we prepare a statement with two ? placeholders, and " @@ -1276,16 +1306,43 @@ msgstr "" "})" msgid "" -"IPROTO_STMT_ID (0x43) + statement-id (MP_INT) if executing a prepared " -"statement or IPROTO_SQL_TEXT (0x40) + statement-text (string) if executing " -"an SQL string. Thus the IPROTO_PREPARE map item is the same as the first " +"IPROTO_STMT_ID (0x43) and statement-id (MP_INT) if executing a prepared " +"statement or IPROTO_SQL_TEXT (0x40) and statement-text (string) if executing" +" an SQL string. Thus the IPROTO_PREPARE map item is the same as the first " "item of the :ref:`IPROTO_EXECUTE ` body." msgstr "" -"При выполнении подготовленного оператора используйте IPROTO_STMT_ID (0x43) +" -" ID оператора (MP_INT), при работе со строками SQL — IPROTO_SQL_TEXT (0x40) " -"+ текст оператора (string). Таким образом, элемент ассоциативного массива " -"IPROTO_PREPARE — это то же самое, что и первый элемент тела сообщения " -":ref:`IPROTO_EXECUTE `." +"При выполнении подготовленного оператора используйте IPROTO_STMT_ID (0x43) и" +" ID оператора (MP_INT), при работе со строками SQL --- IPROTO_SQL_TEXT " +"(0x40) и текст оператора (string). Таким образом, элемент ассоциативного " +"массива IPROTO_PREPARE — это то же самое, что и первый элемент тела " +"сообщения :ref:`IPROTO_EXECUTE `." + +msgid "**IPROTO_BEGIN** = 0x0e." +msgstr "**IPROTO_BEGIN** = 0x0e." + +msgid "" +"This is for starting a transaction. Typically the header will include " +"IPROTO_STREAM_ID. The body is: nothing. See the later section :ref:`Binary " +"protocol -- streams `." +msgstr "" +"Этот запрос начинает транзакцию. Как правило, заголовок запроса включает " +"IPROTO_STREAM_ID. Тело запроса пустое. См. раздел ниже :ref:`Бинарный " +"протокол -- стримы`." + +msgid "**IPROTO_COMMIT** = 0x0f." +msgstr "**IPROTO_COMMIT** = 0x0f." + +msgid "" +"This is for ending a transaction. Typically the header will include " +"IPROTO_STREAM_ID. The body is: nothing. See the later section :ref:`Binary " +"protocol -- streams `." +msgstr "" +"Этот запрос завершает транзакцию. Как правило, заголовок запроса включает " +"IPROTO_STREAM_ID. Тело запроса пустое. См. раздел ниже :ref:`Бинарный " +"протокол -- стримы`." + +msgid "**IPROTO_ROLLBACK** = 0x10." +msgstr "**IPROTO_ROLLBACK** = 0x10." msgid "**IPROTO_PING** = 0x40." msgstr "**IPROTO_PING** = 0x40." @@ -1351,17 +1408,19 @@ msgstr "" "узлами Tarantool при :ref:`синхронной репликации `. Эти сообщения" " не должны использоваться клиентскими приложениями при обычном соединении." -msgid "**IPROTO_CONFIRM** = 0x28" -msgstr "**IPROTO_CONFIRM** = 0x28" +msgid "**IPROTO_RAFT_CONFIRM** = 0x28" +msgstr "**IPROTO_RAFT_CONFIRM** = 0x28" msgid "" "This message confirms that the transactions originated from the instance " "with id = IPROTO_REPLICA_ID have achieved quorum and can be committed, up to" -" and including LSN = IPROTO_LSN." +" and including LSN = IPROTO_LSN. Prior to Tarantool version 2.10-beta1, " +"IPROTO_RAFT_CONFIRM was called IPROTO_CONFIRM." msgstr "" -"Это сообщение подтверждает, что транзакции до LSN = IPROTO_LSN включительно " -"от экземпляра с ID = IPROTO_REPLICA_ID достигли кворума и могут быть " -"зафиксированы." +"Это сообщение подтверждает, что транзакции до ``LSN = IPROTO_LSN`` " +"включительно из экземпляра с ``id = IPROTO_REPLICA_ID`` набрали кворум и " +"могут пройти коммит. До версии Tarantool 2.10-beta1 запрос " +"IPROTO_RAFT_CONFIRM назывался IPROTO_CONFIRM." msgid "The body is a 2-item map:" msgstr "" @@ -1372,7 +1431,7 @@ msgid "" "msgpack(:samp:`{{MP_UINT unsigned integer = size(
) + size()}}`)\n" "#
\n" "msgpack({\n" -" IPROTO_REQUEST_TYPE: IPROTO_CONFIRM,\n" +" IPROTO_REQUEST_TYPE: IPROTO_RAFT_CONFIRM,\n" " IPROTO_SYNC: :samp:`{{MP_UINT unsigned integer}}`\n" "})\n" "# \n" @@ -1385,7 +1444,7 @@ msgstr "" "msgpack(:samp:`{{MP_UINT unsigned integer = size(
) + size()}}`)\n" "#
\n" "msgpack({\n" -" IPROTO_REQUEST_TYPE: IPROTO_CONFIRM,\n" +" IPROTO_REQUEST_TYPE: IPROTO_RAFT_CONFIRM,\n" " IPROTO_SYNC: :samp:`{{MP_UINT unsigned integer}}`\n" "})\n" "# \n" @@ -1394,24 +1453,26 @@ msgstr "" " IPROTO_LSN: :samp:`{{MP_INT integer}}`\n" "})" -msgid "**IPROTO_ROLLBACK** = 0x29" -msgstr "**IPROTO_ROLLBACK** = 0x29" +msgid "**IPROTO_RAFT_ROLLBACK** = 0x29" +msgstr "**IPROTO_RAFT_ROLLBACK** = 0x29" msgid "" "This message says that the transactions originated from the instance with id" " = IPROTO_REPLICA_ID couldn't achieve quorum for some reason and should be " -"rolled back, down to LSN = IPROTO_LSN and including it." +"rolled back, down to LSN = IPROTO_LSN and including it. Prior to Tarantool " +"version 2.10, IPROTO_RAFT_ROLLBACK was called IPROTO_ROLLBACK." msgstr "" -"В этом сообщении говорится, что транзакции до LSN = IPROTO_LSN включительно " -"от экземпляра с id = IPROTO_REPLICA_ID, по какой-то причине не смогли " -"достичь кворума — их нужно откатить." +"В этом сообщении говорится, что транзакции до ``LSN = IPROTO_LSN`` " +"включительно из экземпляра с ``id = IPROTO_REPLICA_ID`` не смогли набрать " +"кворум и будут отменены. До версии Tarantool 2.10 запрос " +"IPROTO_RAFT_ROLLBACK назывался IPROTO_ROLLBACK." msgid "" "# \n" "msgpack(:samp:`{{MP_UINT unsigned integer = size(
) + size()}}`)\n" "#
\n" "msgpack({\n" -" IPROTO_REQUEST_TYPE: IPROTO_ROLLBACK,\n" +" IPROTO_REQUEST_TYPE: IPROTO_RAFT_ROLLBACK,\n" " IPROTO_SYNC: :samp:`{{MP_UINT unsigned integer}}`\n" "})\n" "# \n" @@ -1424,7 +1485,7 @@ msgstr "" "msgpack(:samp:`{{MP_UINT unsigned integer = size(
) + size()}}`)\n" "#
\n" "msgpack({\n" -" IPROTO_REQUEST_TYPE: IPROTO_ROLLBACK,\n" +" IPROTO_REQUEST_TYPE: IPROTO_RAFT_ROLLBACK,\n" " IPROTO_SYNC: :samp:`{{MP_UINT unsigned integer}}`\n" "})\n" "# \n" @@ -1801,35 +1862,36 @@ msgstr "" msgid "" ":samp:`IPROTO_METADATA: {array of column maps}` = array of column maps, with" -" each column map containing at least IPROTO_FIELD_NAME (0x00) + MP_STR, and " -"IPROTO_FIELD_TYPE (0x01) + MP_STR. Additionally, if ``sql_full_metadata`` in" -" the :ref:`_session_settings ` system space is " -"TRUE, then the array will have these additional column maps which correspond" -" to components described in the :ref:`box.execute() ` section:" -msgstr "" -":samp:`IPROTO_METADATA: {array of column maps}` = массив ассоциативных " +" each column map containing at least IPROTO_FIELD_NAME (0x00) and MP_STR, " +"and IPROTO_FIELD_TYPE (0x01) and MP_STR. Additionally, if " +"``sql_full_metadata`` in the :ref:`_session_settings ` system space is TRUE, then the array will have these " +"additional column maps which correspond to components described in the " +":ref:`box.execute() ` section:" +msgstr "" +":samp:`IPROTO_METADATA: {array of column maps}` --- массив ассоциативных " "массивов, причем каждый ассоциативный массив содержит по крайней мере " "IPROTO_FIELD_NAME (0x00) + MP_STR и IPROTO_FIELD_TYPE (0x01) + MP_STR. Кроме" -" того, если задано значение TRUE для ``sql_full_metadata`` в системном " -"спейсе :ref:`_session_settings `, то массив " -"будет содержать такие дополнительные ассоциативные массивы, которые " +" того, если в системном спейсе :ref:`_session_settings ` задано значение TRUE для ``sql_full_metadata``, то массив" +" будет содержать такие дополнительные ассоциативные массивы, которые " "соответствуют компонентам, описанным в разделе :ref:`box.execute() `:" msgid "" -"IPROTO_FIELD_COLL (0x02) + MP_STR\n" -"IPROTO_FIELD_IS_NULLABLE (0x03) + MP_BOOL\n" -"IPROTO_FIELD_IS_AUTOINCREMENT (0x04) + MP_BOOL\n" -"IPROTO_FIELD_SPAN (0x05) + MP_STR or MP_NIL" +"IPROTO_FIELD_COLL (0x02) and MP_STR\n" +"IPROTO_FIELD_IS_NULLABLE (0x03) and MP_BOOL\n" +"IPROTO_FIELD_IS_AUTOINCREMENT (0x04) and MP_BOOL\n" +"IPROTO_FIELD_SPAN (0x05) and MP_STR or MP_NIL" msgstr "" "IPROTO_FIELD_COLL (0x02) + MP_STR\n" "IPROTO_FIELD_IS_NULLABLE (0x03) + MP_BOOL\n" "IPROTO_FIELD_IS_AUTOINCREMENT (0x04) + MP_BOOL\n" -"IPROTO_FIELD_SPAN (0x05) + MP_STR or MP_NIL" +"IPROTO_FIELD_SPAN (0x05) + MP_STR или MP_NIL" msgid ":samp:`IPROTO_DATA:{array of tuples}` = the result set \"rows\"." msgstr "" +":samp:`IPROTO_DATA:{array of tuples}` = строки результирующего набора." msgid "" "Example: If we ask for full metadata by saying |br| " @@ -1853,7 +1915,6 @@ msgid "" " IPROTO_FIELD_IS_NULLABLE: false,\n" " IPROTO_FIELD_IS_AUTOINCREMENT: true,\n" " IPROTO_FIELD_SPAN: nil,\n" -" ,\n" " IPROTO_FIELD_NAME: 'Д',\n" " IPROTO_FIELD_TYPE: 'string',\n" " IPROTO_FIELD_COLL: 'unicode',\n" @@ -1874,7 +1935,6 @@ msgstr "" " IPROTO_FIELD_IS_NULLABLE: false,\n" " IPROTO_FIELD_IS_AUTOINCREMENT: true,\n" " IPROTO_FIELD_SPAN: nil,\n" -" ,\n" " IPROTO_FIELD_NAME: 'Д',\n" " IPROTO_FIELD_TYPE: 'string',\n" " IPROTO_FIELD_COLL: 'unicode',\n" @@ -1891,16 +1951,15 @@ msgid "" "If instead we said |br| :code:`conn:prepare([[SELECT dd, дд AS д FROM " "t1;]])` |br| then we could get almost the same response, but there would be " "no IPROTO_DATA and there would be two additional items: |br| ``34 00 = " -"IPROTO_BIND_COUNT + MP_UINT = 0`` (there are no parameters to bind), |br| " -"``33 90 = IPROTO_BIND_METADATA + MP_ARRAY, size 0`` (there are no parameters" -" to bind)." +"IPROTO_BIND_COUNT and MP_UINT = 0`` (there are no parameters to bind), |br| " +"``33 90 = IPROTO_BIND_METADATA and MP_ARRAY, size 0`` (there are no " +"parameters to bind)." msgstr "" -"Если бы вместо этого мы вызвали |br| :code:`conn:prepare([[SELECT dd, дд AS " -"д FROM t1;]])` |br| то могли бы получить почти такой же ответ, но без " -"IPROTO_DATA и с двумя дополнительными элементами: |br| ``34 00 = " -"IPROTO_BIND_COUNT + MP_UINT = 0`` (привязка параметров не нужна), |br| ``33 " -"90 = IPROTO_BIND_METADATA + MP_ARRAY, size 0`` (привязка параметров не " -"нужна)." +"Если бы вместо этого мы вызвали :code:`conn:prepare([[SELECT dd, дд AS д " +"FROM t1;]])`, мы получили бы почти такой же ответ, но без IPROTO_DATA и с " +"двумя дополнительными элементами: |br| ``34`` (IPROTO_BIND_COUNT) и ``00`` " +"(MP_UINT = 0, нет параметров), ``33`` (IPROTO_BIND_METADATA) и ``90`` " +"(MP_ARRAY размера 0, нет параметров)." msgid "" "# \n" @@ -1914,7 +1973,6 @@ msgid "" " IPROTO_FIELD_IS_NULLABLE: false\n" " IPROTO_FIELD_IS_AUTOINCREMENT: true\n" " IPROTO_FIELD_SPAN: nil,\n" -" ,\n" " IPROTO_FIELD_NAME: 'Д',\n" " IPROTO_FIELD_TYPE: 'string',\n" " IPROTO_FIELD_COLL: 'unicode',\n" @@ -1934,7 +1992,6 @@ msgstr "" " IPROTO_FIELD_IS_NULLABLE: false\n" " IPROTO_FIELD_IS_AUTOINCREMENT: true\n" " IPROTO_FIELD_SPAN: nil,\n" -" ,\n" " IPROTO_FIELD_NAME: 'Д',\n" " IPROTO_FIELD_TYPE: 'string',\n" " IPROTO_FIELD_COLL: 'unicode',\n" @@ -2115,6 +2172,138 @@ msgstr "" "`netbox_encode_auth`` в файле `net_box.c " "`_." +msgid "Binary protocol -- streams" +msgstr "Бинарный протокол — стримы" + +msgid "" +"The :ref:`Streams and interactive transactions ` feature, which " +"was added in Tarantool version :tarantool-release:`2.10.0-beta1`, allows two" +" things: sequential processing and interleaving." +msgstr "" +":ref:`Стримы и интерактивные транзакции `, добавленные в " +"Tarantool :tarantool-release:`2.10.0-beta1`, делают возможными две " +"процедуры: последовательную обработку и чередование." + +msgid "" +"Sequential processing: With streams there is a guarantee that the server " +"instance will not handle the next request in a stream until it has completed" +" the previous one." +msgstr "" +"Последовательная обработка гарантирует, что экземпляр не будет обрабатывать " +"следующий запрос в стриме, пока не завершит работу с предыдущим." + +msgid "" +"Interleaving: For example, a series of requests can include \"begin for " +"stream #1\", \"begin for stream #2\", \"insert for stream #1\", \"insert for" +" stream #2\", \"delete for stream #1\", \"commit for stream #1\", \"rollback" +" for stream #2\"." +msgstr "" +"Чередование допускает, например, такую последовательность запросов: \"begin " +"для стрима 1\", \"begin для стрима 2\", \"insert для стрима 1\", \"insert " +"для стрима 2\", \"delete для стрима 1\", \"commit для стрима 1\", \"rollback" +" для стрима 2\"." + +msgid "" +"To make these things possible, the engine should be :ref:`vinyl ` or :ref:`memtx with mvcc `, and the" +" client is responsible for ensuring that the stream identifier, unsigned " +"integer :ref:`IPROTO_STREAM_ID `, is in the " +"request header. IPROTO_STREAM_ID can be any positive 64-bit number, and " +"should be unique for the connection. If IPROTO_STREAM_ID equals zero the " +"server instance will ignore it." +msgstr "" +"Эти процедуры возможны, если используется движок :ref:`vinyl ` или :ref:`memtx с mvcc `. При этом " +"клиент отвечает за наличие идентификатора стрима, беззнакового целого числа " +":ref:`IPROTO_STREAM_ID `, в заголовке " +"запроса. Идентификатор IPROTO_STREAM_ID должен быть положительным 64-битовым" +" числом, уникальным для соединения. Если IPROTO_STREAM_ID стрима равен нулю," +" экземпляр его проигнорирует." + +msgid "" +"For example, suppose that the client has started a stream with the " +":ref:`net.box module `" +msgstr "" +"Предположим, что клиент запустил стрим с помощью :ref:`модуля " +"net.box`." + +msgid "" +"net_box = require('net.box')\n" +"conn = net_box.connect('localhost:3302')\n" +"stream = conn:new_stream()" +msgstr "" +"net_box = require('net.box')\n" +"conn = net_box.connect('localhost:3302')\n" +"stream = conn:new_stream()" + +msgid "" +"At this point the stream object will look like a duplicate of the conn " +"object, with just one additional member: ``stream_id``. Now, using stream " +"instead of conn, the client sends two requests:" +msgstr "" +"В этот момент объект ``stream`` будет выглядеть так же, как объект ``conn``," +" но включать один дополнительный элемент: ``stream_id``. Пусть теперь " +"клиент, используя ``stream`` вместо ``conn``, отправит два запроса:" + +msgid "" +"stream.space.T:insert{1}\n" +"stream.space.T:insert{2}" +msgstr "" +"stream.space.T:insert{1}\n" +"stream.space.T:insert{2}" + +msgid "" +"The header and body of these requests will be the same as in non-stream " +":ref:`IPROTO_INSERT ` requests, except that the header " +"will contain an additional item: IPROTO_STREAM_ID=0x0a with MP_UINT=0x01. It" +" happens to equal 1 for this example because each call to conn:new_stream() " +"assigns a new number, starting with 1." +msgstr "" +"Заголовок и тело этих запросов будут такими же, как в обычных запросах " +":ref:`IPROTO_INSERT `, но заголовок будет содержать " +"дополнительный элемент ``IPROTO_STREAM_ID=0x0a``, где ``MP_UINT=0x01``. В " +"этом примере значение IPROTO_STREAM_ID равно 1, так как при вызове " +"``conn:new_stream()`` идентификатору каждого нового стрима присваивается " +"уникальное значение, начиная с 1." + +msgid "" +"The client makes stream transactions by sending, in order: IPROTO_BEGIN, the" +" transaction data-change and query requests, IPROTO_COMMIT or " +"IPROTO_ROLLBACK. Each request must contain the same IPROTO_STREAM_ID value. " +"With streaming there is no need to add :ref:`IPROTO_FLAGS ` and IPROTO_FLAG_COMMIT in the header of the last request of a " +"transaction. Rollback will be automatic if disconnect occurs before commit " +"is possible." +msgstr "" +"Клиент запускает транзакцию внутри стрима, отправляя запросы в следующем " +"порядке: IPROTO_BEGIN, запросы на изменение и получение данных транзакции, " +"затем IPROTO_COMMIT или IPROTO_ROLLBACK. Каждый запрос должен содержать " +"переменную IPROTO_STREAM_ID с одним и тем же значением. Используя стримы, не" +" нужно добавлять в заголовок последнего запроса транзакции " +":ref:`IPROTO_FLAGS ` и IPROTO_FLAG_COMMIT. Если " +"транзакция прервется до того, как можно будет выполнить коммит, она будет " +"автоматически отменена." + +msgid "" +"Thus there are now multiple ways to do transactions: with net_box and " +"stream:begin() and stream:commit() or stream:rollback() which cause " +"IPROTO_BEGIN and IPROTO_COMMIT or IPROTO_ROLLBACK with the current value of " +"stream.stream_id; with :ref:`box.begin() ` and :ref:`box.commit()" +" ` or :ref:`box.rollback() `; with SQL and " +":ref:`START TRANSACTION ` and :ref:`COMMIT " +"` or :ref:`ROLLBACK `. An application can use any " +"or all of these ways." +msgstr "" +"Таким образом, у приложения есть несколько способов выполнять транзакции. " +"Во-первых, можно использовать модуль ``net_box`` с методами " +"``stream:begin()`` и ``stream:commit()``/``stream:rollback()``, которые " +"отправляют запросы IPROTO_BEGIN и IPROTO_COMMIT/IPROTO_ROLLBACK с текущим " +"значением ``stream.stream_id``. Другой способ --- применять методы " +":ref:`box.begin() ` и :ref:`box.commit() `/:ref:`box.rollback() `. Наконец, можно пользоваться " +"инструкциями SQL :ref:`START TRANSACTION ` и " +":ref:`COMMIT `/:ref:`ROLLBACK `." + msgid "Binary protocol -- replication" msgstr "Бинарный протокол — репликация" @@ -2293,19 +2482,19 @@ msgstr "" "в IPROTO_BALLOT — это элементы ассоциативного массива:" msgid "" -"IPROTO_BALLOT_IS_RO_CFG (0x01) + MP_BOOL\n" -"IPROTO_BALLOT_VCLOCK (0x02) + vclock\n" -"IPROTO_BALLOT_GC_VCLOCK (0x03) + vclock\n" -"IPROTO_BALLOT_IS_RO (0x04) + MP_BOOL\n" -"IPROTO_BALLOT_IS_ANON = 0x05 + MP_BOOL\n" -"IPROTO_BALLOT_IS_BOOTED = 0x06 + MP_BOOL" +"IPROTO_BALLOT_IS_RO_CFG (0x01) and MP_BOOL\n" +"IPROTO_BALLOT_VCLOCK (0x02) and vclock\n" +"IPROTO_BALLOT_GC_VCLOCK (0x03) and vclock\n" +"IPROTO_BALLOT_IS_RO (0x04) and MP_BOOL\n" +"IPROTO_BALLOT_IS_ANON = 0x05 and MP_BOOL\n" +"IPROTO_BALLOT_IS_BOOTED = 0x06 and MP_BOOL" msgstr "" -"IPROTO_BALLOT_IS_RO_CFG (0x01) + MP_BOOL\n" -"IPROTO_BALLOT_VCLOCK (0x02) + vclock\n" -"IPROTO_BALLOT_GC_VCLOCK (0x03) + vclock\n" -"IPROTO_BALLOT_IS_RO (0x04) + MP_BOOL\n" -"IPROTO_BALLOT_IS_ANON = 0x05 + MP_BOOL\n" -"IPROTO_BALLOT_IS_BOOTED = 0x06 + MP_BOOL" +"IPROTO_BALLOT_IS_RO_CFG (0x01) и MP_BOOL\n" +"IPROTO_BALLOT_VCLOCK (0x02) и vclock\n" +"IPROTO_BALLOT_GC_VCLOCK (0x03) и vclock\n" +"IPROTO_BALLOT_IS_RO (0x04) и MP_BOOL\n" +"IPROTO_BALLOT_IS_ANON = 0x05 и MP_BOOL\n" +"IPROTO_BALLOT_IS_BOOTED = 0x06 и MP_BOOL" msgid "" "IPROTO_BALLOT_IS_RO_CFG and IPRO_BALLOT_VCLOCK and IPROTO_BALLOT_GC_VCLOCK " @@ -2502,6 +2691,27 @@ msgid "" "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 "" +"ce 00 00 00 1b MP_UINT = 27, десятичное число = число байт после этого\n" +"82 MP_MAP, размер 2 (назовем это Main-Map)\n" +"01 IPROTO_SYNC (1-й элемент Main-Map)\n" +"04 MP_INT = 4 = число, которое увеличивается на 1 с каждым запросом\n" +"00 IPROTO_REQUEST_TYPE (2-й элемент Main-Map)\n" +"01 IPROTO_SELECT\n" +"86 MP_MAP, размер 6 (назовем это Select-Map)\n" +"10 IPROTO_SPACE_ID (1-й элемент Select-Map)\n" +"cd 02 00 MP_UINT = 512, десятичное число = id tspace (может быть больше)\n" +"11 IPROTO_INDEX_ID (2-й элемент Select-Map)\n" +"00 MP_INT = 0 = id индекса в tspace\n" +"14 IPROTO_ITERATOR (3-й элемент Select-Map)\n" +"00 MP_INT = 0 = константа Tarantool iterator_type.h ITER_EQ\n" +"13 IPROTO_OFFSET (4-й элемент Select-Map)\n" +"00 MP_INT = 0 = смещение\n" +"12 IPROTO_LIMIT (5-й элемент Select-Map)\n" +"ce ff ff ff ff MP_UINT = 4294967295 = наибольший возможный предел\n" +"20 IPROTO_KEY (6-й элемент Select-Map)\n" +"91 MP_ARRAY, размер 1 (назовем это Key-Array)\n" +"cd 01 18 MP_UINT = 280 (6-й элемент Select-Map, 1-й элемент Key-Array)\n" +" -- 280, ключевое значение, которое мы ищем" msgid "" "Now read the source code file `net_box.c " @@ -2569,10 +2779,27 @@ msgid "" "91 MP_ARRAY, size 1, for array of key values\n" "02 MP_UINT = primary-key value = 2" msgstr "" +"04 IPROTO_UPDATE\n" +"85 IPROTO_MAP, размер 5\n" +"10 IPROTO_SPACE_ID, 1-й элемент ассоциативного массива\n" +"cd 02 00 MP_UINT 256\n" +"11 IPROTO_INDEX_ID, 2-й элемент ассоциативного массива\n" +"00 MP_INT 0 = номер индекса первичного ключа\n" +"15 IPROTO_INDEX_BASE, 3-й элемент ассоциативного массива\n" +"01 MP_INT = 1, т.е. нумерация полей начинается с 1\n" +"21 IPROTO_TUPLE, 4-й элемент ассоциативного массива\n" +"91 MP_ARRAY, размер 1, для массива операций\n" +"93 MP_ARRAY, размер 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, 5--й элемент ассоциативного массива\n" +"91 MP_ARRAY, размер 1, для массива ключей\n" +"02 MP_UINT = значение первичного ключа = 2" msgid "" "Byte codes for the :ref:`IPROTO_EXECUTE ` example:" -msgstr "" +msgstr "Пример байт-кода :ref:`IPROTO_EXECUTE `:" msgid "" "0b IPROTO_EXECUTE\n" @@ -2586,15 +2813,27 @@ msgid "" "2b IPROTO_OPTIONS Map Item#3\n" "90 MP_ARRAY, size 0 (there are no options)" msgstr "" +"0b IPROTO_EXECUTE\n" +"83 MP_MAP, размер 3\n" +"43 IPROTO_STMT_ID 1-й элемент ассоциативного массива\n" +"ce d7 aa 74 1b MP_UINT значение n.stmt_id\n" +"41 IPROTO_SQL_BIND 2-й элемент ассоциативного массива\n" +"92 MP_ARRAY, размер 2\n" +"01 MP_INT = 1 = значение первого параметра\n" +"a1 61 MP_STR = 'a' = значение второго параметра\n" +"2b IPROTO_OPTIONS 3-й элемент ассоциативного массива\n" +"90 MP_ARRAY, размер 0 (никакие опции не выбраны)" msgid "" "Byte codes for the response to the " ":codenormal:`box.space.`:codeitalic:`space-name`:codenormal:`:insert{6}` " "example:" msgstr "" +"Пример байт-кода ответа на запрос " +":codenormal:`box.space.`:codeitalic:`space-name`:codenormal:`:insert{6}`:" msgid "" -"ce 00 00 00 20 MP_UINT = HEADER + BODY SIZE\n" +"ce 00 00 00 20 MP_UINT = HEADER AND BODY SIZE\n" "83 MP_MAP, size 3\n" "00 Response-Code-Indicator\n" "ce 00 00 00 00 MP_UINT = IPROTO_OK\n" @@ -2608,14 +2847,29 @@ msgid "" "91 MP_ARRAY, size 1 (field count)\n" "06 MP_INT = 6 = the value that was inserted" msgstr "" +"ce 00 00 00 20 MP_UINT = размер заголовка и тела\n" +"83 MP_MAP, размер 3\n" +"00 индикатор кода ответа\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 = значение синхронизации\n" +"05 IPROTO_SCHEMA_VERSION\n" +"ce 00 00 00 68 MP_UINT = версия схемы\n" +"81 MP_MAP, размер 1\n" +"30 IPROTO_DATA\n" +"dd 00 00 00 01 MP_ARRAY, размер 1 (число строк)\n" +"91 MP_ARRAY, размер 1 (число полей)\n" +"06 MP_INT = 6 = добавленное значение" msgid "" "Byte codes for the response to the " "``conn:eval([[box.schema.space.create('_space');]])`` example:" msgstr "" +"Пример байт-кода ответа на запрос " +"``conn:eval([[box.schema.space.create('_space');]])``:" msgid "" -"ce 00 00 00 3b MP_UINT = HEADER + BODY SIZE\n" +"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 Response-Code-Indicator\n" " ce 00 00 80 0a MP_UINT = hexadecimal 800a\n" @@ -2627,6 +2881,17 @@ msgid "" " 31 IPROTO_ERROR_24\n" " db 00 00 00 1d 53 70 61 63 etc. MP_STR = \"Space '_space' already exists\"" msgstr "" +"ce 00 00 00 3b MP_UINT = размер заголовка и тела\n" +"83 MP_MAP, размер 3 (3 элемента в заголовке)\n" +" 00 индикатор кода ответа\n" +" ce 00 00 80 0a MP_UINT = шестнадцатеричное значение 800a\n" +" 01 IPROTO_SYNC\n" +" cf 00 00 00 00 00 00 00 26 MP_UINT = значение синхронизации\n" +" 05 IPROTO_SCHEMA_VERSION\n" +" ce 00 00 00 78 MP_UINT = версия схемы \n" +" 81 MP_MAP, размер 1\n" +" 31 IPROTO_ERROR_24\n" +" db 00 00 00 1d 53 70 61 63 ... MP_STR = \"Space '_space' already exists\"" msgid "" "Byte codes, if we use the same net.box connection that we used for " @@ -2640,6 +2905,16 @@ msgid "" " from net.box which users will not see); (2) the final bytes of the response" " to the INSERT will be:" msgstr "" +"Подключимся через то же соединение net.box, что приводилось в разделе " +":ref:`Бинарный протокол --- примеры `, и выполним" +" следующее: |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| " +"Результат вывода tcpdump покажет два интересных момента: (1) инструкция " +"CREATE привела к изменению схемы, так что в ответе указано новое значение " +"IPROTO_SCHEMA_VERSION. При этом тело включает новое содержимое некоторых " +"системных таблиц, полученное в результате невидимых для пользователя " +"запросов от net.box; (2) последние байты ответа на INSERT будут следующими:" msgid "" "81 MP_MAP, size 1\n" @@ -2652,6 +2927,15 @@ msgid "" "01 first autoincrement number\n" "02 second autoincrement number" msgstr "" +"81 MP_MAP, размер 1\n" +"42 IPROTO_SQL_INFO\n" +"82 MP_MAP, размер 2\n" +"00 константа Tarantool (не из iproto_constants.h) = SQL_INFO_ROW_COUNT\n" +"02 1 = число строк\n" +"01 константа Tarantool (не из iproto_constants.h) = SQL_INFO_AUTOINCREMENT_ID\n" +"92 MP_ARRAY, размер 2\n" +"01 первое число с автоинкрементом\n" +"02 второе число с автоинкрементом" msgid "" "Byte codes for the SQL SELECT example, if we ask for full metadata by saying" @@ -2660,23 +2944,28 @@ msgid "" "just created |br| :code:`conn:execute([[SELECT dd, дд AS д FROM t1;]])` |br|" " then tcpdump will show this response, after the header:" msgstr "" +"Пример байт-кода SQL SELECT. Запросим полные метаданные, вызвав " +":code:`conn.space._session_settings:update('sql_full_metadata', {{'=', " +"'value', true}})`, и выберем две строки из только что созданной таблицы: " +":code:`conn:execute([[SELECT dd, дд AS д FROM t1;]])`. tcpdump выдаст " +"следующий ответ (после заголовка):" 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 + 'DD'\n" -"01 a7 69 6e 74 65 67 65 72 IPROTO_FIELD_TYPE + 'integer'\n" -"03 c2 IPROTO_FIELD_IS_NULLABLE + false\n" -"04 c3 IPROTO_FIELD_IS_AUTOINCREMENT + true\n" -"05 c0 PROTO_FIELD_SPAN + nil\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 + 'Д' upper case\n" -"01 a6 73 74 72 69 6e 67 IPROTO_FIELD_TYPE + 'string'\n" -"02 a7 75 6e 69 63 6f 64 65 IPROTO_FIELD_COLL + 'unicode'\n" -"03 c3 IPROTO_FIELD_IS_NULLABLE + true\n" -"05 a4 d0 b4 d0 b4 IPROTO_FIELD_SPAN + 'дд' lower case\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" @@ -2686,16 +2975,59 @@ msgid "" "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 "" +"82 MP_MAP, размер 2 (метаданные и строки)\n" +"32 IPROTO_METADATA\n" +"92 MP_ARRAY, размер 2 (2 столбца)\n" +"85 MP_MAP, размер 5 (5 элементов для столбца 1)\n" +"00 a2 44 44 IPROTO_FIELD_NAME и 'DD'\n" +"01 a7 69 6e 74 65 67 65 72 IPROTO_FIELD_TYPE и 'integer'\n" +"03 c2 IPROTO_FIELD_IS_NULLABLE и false\n" +"04 c3 IPROTO_FIELD_IS_AUTOINCREMENT и true\n" +"05 c0 PROTO_FIELD_SPAN и nil\n" +"85 MP_MAP, размер 5 (5 элементов для столбца 2)\n" +"00 a2 d0 94 IPROTO_FIELD_NAME и 'Д' в верхнем регистре\n" +"01 a6 73 74 72 69 6e 67 IPROTO_FIELD_TYPE и 'string'\n" +"02 a7 75 6e 69 63 6f 64 65 IPROTO_FIELD_COLL и 'unicode'\n" +"03 c3 IPROTO_FIELD_IS_NULLABLE и true\n" +"05 a4 d0 b4 d0 b4 IPROTO_FIELD_SPAN и 'дд' в нижнем регистре\n" +"30 IPROTO_DATA\n" +"92 MP_ARRAY, размер 2\n" +"92 MP_ARRAY, размер 2\n" +"01 MP_INT = 1: содержимое строки 1, столбца 1\n" +"a1 61 MP_STR = 'a': содержимое строки 1, столбца 2\n" +"92 MP_ARRAY, размер 2\n" +"02 MP_INT = 2: содержимое строки 2, столбца 1\n" +"a1 62 MP_STR = 'b': содержимое строки 2, столбца 2" msgid "" "Byte code for the SQL PREPARE example. If we said |br| " ":code:`conn:prepare([[SELECT dd, дд AS д FROM t1;]])` |br| then tcpdump " -"would should show almost the same response, but there would be no " -"IPROTO_DATA and there would be two additional items: |br| :code:`34 00 = " -"IPROTO_BIND_COUNT + MP_UINT = 0` (there are no parameters to bind), |br| " -":code:`33 90 = IPROTO_BIND_METADATA + MP_ARRAY`, size 0 (there are no " -"parameters to bind)." +"would show almost the same response, but there would be no IPROTO_DATA. " +"Instead, additional items will appear:" +msgstr "" +"Пример байт-кода SQL PREPARE. Если вызвать :code:`conn:prepare([[SELECT dd, " +"дд AS д FROM t1;]])`, вывод tcpdump будет почти таким же, но исчезнет " +"IPROTO_DATA. Вместо этого появятся дополнительные байты:" + +msgid "" +"34 IPROTO_BIND_COUNT\n" +"00 MP_UINT = 0\n" +"\n" +"33 IPROTO_BIND_METADATA\n" +"90 MP_ARRAY, size 0" +msgstr "" +"34 IPROTO_BIND_COUNT\n" +"00 MP_UINT = 0\n" +"\n" +"33 IPROTO_BIND_METADATA\n" +"90 MP_ARRAY, размер 0" + +msgid "" +"``MP_UINT = 0`` and ``MP_ARRAY`` has size 0 because there are no parameters " +"to bind. Full output:" msgstr "" +"``MP_UINT = 0``. Массив ``MP_ARRAY`` имеет размер 0, поскольку параметров " +"нет. Вывод целиком:" msgid "" "84 MP_MAP, size 4\n" @@ -2708,21 +3040,44 @@ msgid "" "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 + 'DD'\n" -"01 a7 69 6e 74 65 67 65 72 IPROTO_FIELD_TYPE + 'integer'\n" -"03 c2 IPROTO_FIELD_IS_NULLABLE + false\n" -"04 c3 IPROTO_FIELD_IS_AUTOINCREMENT + true\n" -"05 c0 PROTO_FIELD_SPAN + nil\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 + 'Д' upper case\n" -"01 a6 73 74 72 69 6e 67 IPROTO_FIELD_TYPE + 'string'\n" -"02 a7 75 6e 69 63 6f 64 65 IPROTO_FIELD_COLL + 'unicode'\n" -"03 c3 IPROTO_FIELD_IS_NULLABLE + true\n" -"05 a4 d0 b4 d0 b4 IPROTO_FIELD_SPAN + 'дд' lower case" +"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 "" +"84 MP_MAP, размер 4\n" +"43 IPROTO_STMT_ID\n" +"ce c2 3c 2c 1e MP_UINT = ID инструкции\n" +"34 IPROTO_BIND_COUNT\n" +"00 MP_INT = 0 = число привязываемых параметров\n" +"33 IPROTO_BIND_METADATA\n" +"90 MP_ARRAY, размер 0 = нет привязываемых параметров\n" +"32 IPROTO_METADATA\n" +"92 MP_ARRAY, размер 2 (2 столбца)\n" +"85 MP_MAP, размер 5 (5 элементов для столбца 1)\n" +"00 a2 44 44 IPROTO_FIELD_NAME и 'DD'\n" +"01 a7 69 6e 74 65 67 65 72 IPROTO_FIELD_TYPE и 'integer'\n" +"03 c2 IPROTO_FIELD_IS_NULLABLE и false\n" +"04 c3 IPROTO_FIELD_IS_AUTOINCREMENT и true\n" +"05 c0 PROTO_FIELD_SPAN и nil\n" +"85 MP_MAP, размер 5 (5 элементов для столбца 2)\n" +"00 a2 d0 94 IPROTO_FIELD_NAME + 'Д' в верхнем регистре\n" +"01 a6 73 74 72 69 6e 67 IPROTO_FIELD_TYPE и 'string'\n" +"02 a7 75 6e 69 63 6f 64 65 IPROTO_FIELD_COLL и 'unicode'\n" +"03 c3 IPROTO_FIELD_IS_NULLABLE и true\n" +"05 a4 d0 b4 d0 b4 IPROTO_FIELD_SPAN и 'дд' в нижнем регистре" msgid "Byte code for the heartbeat example. The master might send this body:" msgstr "" +"Пример байт-кода контрольного сигнала. Мастер может отправить следующее " +"тело:" msgid "" "83 MP_MAP, size 3\n" @@ -2734,10 +3089,20 @@ msgid "" "cb MP_DOUBLE (MessagePack \"Float 64\")\n" "41 d7 ba 06 7b 3a 03 21 8-byte timestamp" msgstr "" +"83 MP_MAP, размер 3\n" +"00 1-й элемент Main-Map IPROTO_REQUEST_TYPE\n" +"00 MP_UINT = 0\n" +"02 2-й элемент Main-Map IPROTO_REPLICA_ID\n" +"02 MP_UINT = 2 = id\n" +"04 3-й элемент Main-Map IPROTO_TIMESTAMP\n" +"cb MP_DOUBLE (MessagePack \"Float 64\")\n" +"41 d7 ba 06 7b 3a 03 21 8-байтовая временная отметка" msgid "" "Byte code for the heartbeat example. The replica might send back this body" msgstr "" +"Пример байт-кода ответа на контрольный сигнал. Реплика может вернуть " +"следующее тело:" msgid "" "81 MP_MAP, size 1\n" @@ -2749,6 +3114,14 @@ msgid "" "01 MP_UINT = 1 = id (part 1 of vclock)\n" "06 MP_UINT = 6 = lsn (part 2 of vclock)" msgstr "" +"81 MP_MAP, размер 1\n" +"00 1-й элемент Main-Map: индикатор кода ответа\n" +"00 MP_UINT = 0 = IPROTO_OK\n" +"81 2-й элемент Main-Map: MP_MAP, размер 1 (Sub-Map)\n" +"26 1-й элемент Sub-Map: IPROTO_VCLOCK\n" +"81 2-й элемент Sub-Map: MP_MAP, размер 1\n" +"01 MP_UINT = 1 = id (1-я часть vclock)\n" +"06 MP_UINT = 6 = lsn (2-я часть vclock)" msgid "XLOG / SNAP" msgstr "XLOG / SNAP" @@ -2799,6 +3172,20 @@ msgid "" "+============+ +===================================+\n" " MP_MAP MP_MAP" msgstr "" +"0 3 4 17\n" +"+-------------+========+============+===========+=========+\n" +"| | | | | |\n" +"| 0xd5ba0bab | LENGTH | CRC32 PREV | CRC32 CUR | PADDING |\n" +"| | | | | |\n" +"+-------------+========+============+===========+=========+\n" +" MP_FIXEXT2 MP_INT MP_INT MP_INT ---\n" +"\n" +"+============+ +===================================+\n" +"| | | |\n" +"| HEADER | | BODY |\n" +"| | | |\n" +"+============+ +===================================+\n" +" MP_MAP MP_MAP" msgid "" "See the example in the :ref:`File formats ` " diff --git a/locale/ru/LC_MESSAGES/dev_guide/reference_capi/index.po b/locale/ru/LC_MESSAGES/dev_guide/reference_capi/index.po index 011d1b1f1a..b5f2c818ff 100644 --- a/locale/ru/LC_MESSAGES/dev_guide/reference_capi/index.po +++ b/locale/ru/LC_MESSAGES/dev_guide/reference_capi/index.po @@ -1,6 +1,6 @@ -msgid "C API reference" -msgstr "Справочник по C API" - msgid "List of C API headers" msgstr "Список API для языка C" + +msgid "C API reference" +msgstr "Справочник по C API" diff --git a/locale/ru/LC_MESSAGES/getting_started/getting_started_cartridge.po b/locale/ru/LC_MESSAGES/getting_started/getting_started_cartridge.po index c2e7e43d7f..fa4a0e4264 100644 --- a/locale/ru/LC_MESSAGES/getting_started/getting_started_cartridge.po +++ b/locale/ru/LC_MESSAGES/getting_started/getting_started_cartridge.po @@ -20,12 +20,12 @@ msgstr "$ cartridge create --name myapp" msgid "" "This will create a Tarantool Cartridge application in the ``./myapp`` " -"directory, with a handful of :ref:`template files and directories " -"` inside." +"directory, with a handful of :doc:`template files and directories " +"` inside." msgstr "" "Эта команда создает новое Tarantool Cartridge-приложение в директории " -"``./myapp``. Там теперь содержатся созданные по шаблону :ref:`файлы и " -"директории `." +"``./myapp``. Там теперь содержатся созданные по шаблону :doc:`файлы и " +"директории `." msgid "Go inside and make a dry run:" msgstr "Войдите внутрь этой директории и запустите ваше приложение:" @@ -392,10 +392,10 @@ msgstr "" " для вашей роли." msgid "" -":ref:`Pack ` your application for easy" -" distribution. Choose what you like: a DEB or RPM package, a TGZ archive, or" -" a Docker image." +":doc:`Pack ` your application " +"for easy distribution. Choose what you like: a DEB or RPM package, a TGZ " +"archive, or a Docker image." msgstr "" -":ref:`Упакуйте ` ваше приложение для " -"дальнейшего распространения. Вы можете выбрать любой из поддерживаемых видов" -" пакетов: DEB, RPM, архив TGZ или Docker-образ." +":doc:`Упакуйте ` ваше " +"приложение для дальнейшего распространения. Вы можете выбрать любой из " +"поддерживаемых видов пакетов: DEB, RPM, архив TGZ или Docker-образ." diff --git a/locale/ru/LC_MESSAGES/index.po b/locale/ru/LC_MESSAGES/index.po index 5656f9cb7c..3e27ab4b15 100644 --- a/locale/ru/LC_MESSAGES/index.po +++ b/locale/ru/LC_MESSAGES/index.po @@ -1,4 +1,10 @@ +msgid "CRUD operations" +msgstr "" + +msgid "Streams" +msgstr "" + msgid "Tarantool - Documentation" msgstr "Документация по Tarantool" @@ -17,30 +23,3 @@ msgstr "" "вводной информации и упражнений для начинающих -- до продвинутых инструкций " "и подробных справочников для опытных пользователей и сторонних " "разработчиков." - -msgid "**Other formats:**" -msgstr "**Другие форматы:**" - -msgid "`Single-page HTML `__" -msgstr "`HTML одной страницей `__" - -msgid "`PDF `__" -msgstr "`PDF `__" - -msgid "**See also:**" -msgstr "**См. также:**" - -msgid "`Documentation archive `__" -msgstr "`Архив документации `__" - -msgid "`Articles `__" -msgstr "`Статьи `__" - -msgid "**Support:**" -msgstr "**Поддержка:**" - -msgid "`Google forum `__" -msgstr "`Форум в Google `__" - -msgid "`Telegram chat `__" -msgstr "`Чат в Telegram `__" diff --git a/locale/ru/LC_MESSAGES/reference/reference_lua/index.po b/locale/ru/LC_MESSAGES/reference/reference_lua/index.po index 81e7c31dba..682af5df1c 100644 --- a/locale/ru/LC_MESSAGES/reference/reference_lua/index.po +++ b/locale/ru/LC_MESSAGES/reference/reference_lua/index.po @@ -1,4 +1,7 @@ +msgid "List of Lua modules" +msgstr "Перечень Lua-модулей" + msgid "Built-in modules reference" msgstr "Справочник по встроенным модулям" @@ -15,6 +18,3 @@ msgstr "" "`стандартных Lua-библиотек `_. Для достижения " "наилучшего результата мы рекомендуем использовать функции из встроенных " "модулей Tarantool'а." - -msgid "List of Lua modules" -msgstr "Перечень Lua-модулей" diff --git a/locale/ru/LC_MESSAGES/reference/reference_lua/key_def.po b/locale/ru/LC_MESSAGES/reference/reference_lua/key_def.po index c3e6e81313..1105dcabaa 100644 --- a/locale/ru/LC_MESSAGES/reference/reference_lua/key_def.po +++ b/locale/ru/LC_MESSAGES/reference/reference_lua/key_def.po @@ -1,54 +1,69 @@ msgid "Module `key_def`" -msgstr "" +msgstr "Модуль `key_def`" msgid "" "The `key_def` module has a function for making a definition of the field " "numbers and types of a tuple. The definition is usually used in conjunction " "with an index definition to extract or compare the index key values." msgstr "" +"В модуле `key_def` есть функция, позволяющая создавать определение номеров и" +" типов полей кортежа. Это определение обычно используется вместе с " +"определением индекса, чтобы извлекать или сравнивать значения ключей " +"индекса." msgid "Create a new key_def instance." -msgstr "" +msgstr "Создание нового экземпляра key_def." msgid "Parameters" msgstr "Параметры" msgid "" -"field numbers and types. There must be at least one part and it must have at" -" least fieldno and type." +"field numbers and types. There must be at least one part. Every part must " +"have the attributes ``type`` and ``fieldno``/``field``. Other attributes are" +" optional." msgstr "" +"типы и номера полей. В таблице ``parts`` должен быть хотя бы один элемент. " +"Для каждого элемента обязательны только атрибуты ``type`` и " +"``fieldno``/``field``." msgid "returns" msgstr "возвращает" msgid "key_def-object :ref:`a key_def object `" -msgstr "" +msgstr ":ref:`объект key_def `" msgid "" "The parts table has components which are the same as the ``parts`` option in" " :ref:`Options for space_object:create_index() `." msgstr "" +"Таблица parts содержит компоненты, аналогичные тем, что указываются в " +"параметре ``parts`` :ref:`при создании объекта space_object:create_index() " +"`:" msgid "" -"fieldno (integer) for example fieldno = 1. It is legal to say field instead " -"of fieldno." +"``fieldno`` (integer) for example ``fieldno = 1``. It is legal to use " +"``field`` instead of ``fieldno``." msgstr "" +"``fieldno`` (целое число), например ``fieldno = 1``. Вместо ``fieldno`` " +"можно использовать ``field``." -msgid "type (string) for example type = 'string'." -msgstr "" +msgid "``type`` (string) for example ``type = 'string'``." +msgstr "``type`` (строка), например ``type = 'string'``." msgid "Other components are optional." -msgstr "" +msgstr "Остальные компоненты необязательны." msgid "Example: ``key_def.new({{type = 'unsigned', fieldno = 1}})``" -msgstr "" +msgstr "Пример №1: ``key_def.new({{type = 'unsigned', fieldno = 1}})``" msgid "" "Example: ``key_def.new({{type = 'string', collation = 'unicode', field = " "2}})``" msgstr "" +"Пример №2: ``key_def.new({{type = 'string', collation = 'unicode', field = " +"2}})``" msgid "" "A key_def object is an object returned by :ref:`key_def.new() `, :ref:`merge() `, :ref:`totable() " "`." msgstr "" +"Объект key_def возвращается функцией :ref:`key_def.new() `. У " +"него есть следующие методы: :ref:`extract_key() `, " +":ref:`compare() `, :ref:`compare_with_key() `, :ref:`merge() `, :ref:`totable() " +"`." -msgid "Return a tuple containing only the fields of the key_def object." -msgstr "" +msgid "Return a tuple containing only the fields of the ``key_def`` object." +msgstr "Получение кортежа, содержащего только поля объекта ``key_def``." msgid "tuple or Lua table with field contents" -msgstr "" +msgstr "кортеж или Lua-таблица с содержимым поля" msgid "return" msgstr "возвращает" -msgid "the fields that were defined for the key_def object" -msgstr "" +msgid "the fields that were defined for the ``key_def`` object" +msgstr "поля, определенные для объекта ``key_def``," msgid "**Example #1:**" msgstr "**Пример №1:**" @@ -86,7 +106,7 @@ msgid "" "...\n" "\n" "tarantool> k = key_def.new({{type = 'string', fieldno = 3},\n" -"> {type = 'unsigned', fieldno =1 }})\n" +"> {type = 'unsigned', fieldno = 1}})\n" "---\n" "...\n" "\n" @@ -95,6 +115,26 @@ msgid "" "- ['X', 1]\n" "..." msgstr "" +"-- Предположим, что у некоторого элемента пять полей:\n" +"-- 1, 99.5, 'X', nil, 99.5\n" +"-- и нас интересуют только два из них:\n" +"-- третье (строка) и первое (целое число).\n" +"-- Мы можем определить эти поля инструкцией k = key_def.new\n" +"-- и извлечь значения командой k:extract_key.\n" +"\n" +"tarantool> key_def = require('key_def')\n" +"---\n" +"...\n" +"\n" +"tarantool> k = key_def.new({{type = 'string', fieldno = 3},\n" +"> {type = 'unsigned', fieldno = 1}})\n" +"---\n" +"...\n" +"\n" +"tarantool> k:extract_key({1, 99.5, 'X', nil, 99.5})\n" +"---\n" +"- ['X', 1]\n" +"..." msgid "**Example #2**" msgstr "**Пример №2**" @@ -107,11 +147,22 @@ msgid "" "-- The result will be the same.\n" "key_def = require('key_def')\n" "box.schema.space.create('T')\n" -"i = box.space.T:create_index('I',{parts={3,'string',1,'unsigned'}})\n" +"i = box.space.T:create_index('I', {parts={3, 'string', 1, 'unsigned'}})\n" "box.space.T:insert{1, 99.5, 'X', nil, 99.5}\n" "k = key_def.new(i.parts)\n" "k:extract_key(box.space.T:get({'X', 1}))" msgstr "" +"-- Теперь предположим, что элемент является кортежем в спейсе.\n" +"-- У спейса есть составной индекс, построенный по полям 3 и 1.\n" +"-- Мы можем передать определение индекса в качестве аргумента функции key_def.new,\n" +"-- а не заполнять определение, как в примере №1.\n" +"-- Результат будет тот же.\n" +"key_def = require('key_def')\n" +"box.schema.space.create('T')\n" +"i = box.space.T:create_index('I', {parts={3, 'string', 1, 'unsigned'}})\n" +"box.space.T:insert{1, 99.5, 'X', nil, 99.5}\n" +"k = key_def.new(i.parts)\n" +"k:extract_key(box.space.T:get({'X', 1}))" msgid "**Example #3**" msgstr "**Пример №3**" @@ -133,19 +184,42 @@ msgid "" " pk:delete(key)\n" "end" msgstr "" +"-- Проходим по всем кортежам во вторичном неуникальном индексе\n" +"-- и извлекаем из них значения по первичному ключу.\n" +"-- Затем удаляем значения, используя уникальный индекс.\n" +"-- Этот код должен входить в Lua-функцию.\n" +"local key_def_lib = require('key_def')\n" +"local s = box.schema.space.create('test')\n" +"local pk = s:create_index('pk')\n" +"local sk = s:create_index('test', {unique = false, parts = {\n" +" {2, 'number', path = 'a'}, {2, 'number', path = 'b'}}})\n" +"s:insert{1, {a = 1, b = 1}}\n" +"s:insert{2, {a = 1, b = 2}}\n" +"local key_def = key_def_lib.new(pk.parts)\n" +"for _, tuple in sk:pairs({1})) do\n" +" local key = key_def:extract_key(tuple)\n" +" pk:delete(key)\n" +"end" msgid "" -"Compare the key fields of tuple_1 to the key fields of tuple_2. This is a " -"tuple-by-tuple comparison so users do not have to write code which compares " -"a field at a time. Each field's type and collation will be taken into " -"account. In effect it is a comparison of extract_key(tuple_1) with " -"extract_key(tuple_2)." +"Compare the key fields of ``tuple_1`` to the key fields of ``tuple_2``. This" +" is a tuple-by-tuple comparison so users do not have to write code which " +"compares a field at a time. Each field's type and collation will be taken " +"into account. In effect it is a comparison of ``extract_key(tuple_1)`` with " +"``extract_key(tuple_2)``." msgstr "" +"Сравнение полей кортежей ``tuple_1`` и ``tuple_2`` по определённому ключу. " +"Пользователю не нужно писать код для сравнения отдельных полей. Учитываются " +"типы полей и параметры сортировки. Фактически сравниваются значения " +"``extract_key(tuple_1)`` и ``extract_key(tuple_2)``." msgid "" "> 0 if tuple_1 key fields > tuple_2 key fields, = 0 if tuple_1 key fields = " "tuple_2 key fields, < 0 if tuple_1 key fields < tuple_2 key fields" msgstr "" +"положительное число, если значения полей tuple_1 больше значений полей " +"tuple_2 по ключу; 0, если они равны; отрицательное число, если значения " +"полей tuple_1 меньше значений полей tuple_2 по ключу" msgid "**Example:**" msgstr "**Пример:**" @@ -153,74 +227,113 @@ msgstr "**Пример:**" msgid "" "-- This will return 0\n" "key_def = require('key_def')\n" -"k = key_def.new({{type='string',fieldno=3,collation='unicode_ci'},\n" -" {type='unsigned',fieldno=1}})\n" +"k = key_def.new({{type = 'string', fieldno = 3, collation = 'unicode_ci'},\n" +" {type = 'unsigned', fieldno = 1}})\n" "k:compare({1, 99.5, 'X', nil, 99.5}, {1, 99.5, 'x', nil, 99.5})" msgstr "" +"-- Результат этого кода будет 0\n" +"key_def = require('key_def')\n" +"k = key_def.new({{type = 'string', fieldno = 3, collation = 'unicode_ci'},\n" +" {type = 'unsigned', fieldno = 1}})\n" +"k:compare({1, 99.5, 'X', nil, 99.5}, {1, 99.5, 'x', nil, 99.5})" msgid "" -"Compare the key fields of tuple_1 to all the fields of tuple_2. This is the " -"same as :ref:`key_def_object:compare() ` except that " -"tuple_2 contains only the key fields. In effect it is a comparison of " -"extract_key(tuple_1) with tuple_2." +"Compare the key fields of ``tuple_1`` to all the fields of ``tuple_2``. This" +" is the same as :ref:`key_def_object:compare() ` except " +"that ``tuple_2`` contains only the key fields. In effect it is a comparison " +"of ``extract_key(tuple_1)`` with ``tuple_2``." msgstr "" +"Сравнение полей кортежей ``tuple_1`` с полями кортежа ``tuple_2`` по " +"заданному ключу. Аналогично :ref:`key_def_object:compare() `, за исключением того, что ``tuple_2`` содержит только поля ключа. " +"Фактически это сравнение ``extract_key(tuple_1)`` с ``tuple_2``." msgid "" "> 0 if tuple_1 key fields > tuple_2 fields, = 0 if tuple_1 key fields = " "tuple_2 fields, < 0 if tuple_1 key fields < tuple_2 fields" msgstr "" +"положительное число, если значения полей tuple_1 больше значений полей " +"tuple_2 по ключу; 0, если они равны; отрицательное число, если значения " +"полей tuple_1 меньше значений полей tuple_2 по ключу" msgid "" "-- This will return 0\n" "key_def = require('key_def')\n" -"k = key_def.new({{type='string',fieldno=3,collation='unicode_ci'},\n" -" {type='unsigned',fieldno=1}})\n" +"k = key_def.new({{type = 'string', fieldno = 3, collation = 'unicode_ci'},\n" +" {type = 'unsigned', fieldno = 1}})\n" "k:compare_with_key({1, 99.5, 'X', nil, 99.5}, {'x', 1})" msgstr "" +"-- Результат этого кода будет 0\n" +"key_def = require('key_def')\n" +"k = key_def.new({{type = 'string', fieldno = 3, collation = 'unicode_ci'},\n" +" {type = 'unsigned', fieldno = 1}})\n" +"k:compare_with_key({1, 99.5, 'X', nil, 99.5}, {'x', 1})" msgid "" -"Combine the main key_def_object with other_key_def_object. The return value " -"is a new key_def_object containing all the fields of the main " -"key_def_object, then all the fields of other_key_def_object which are not in" -" the main key_def_object." +"Combine the main ``key_def_object`` with ``other_key_def_object``. The " +"return value is a new ``key_def_object`` containing all the fields of the " +"main ``key_def_object``, then all the fields of ``other_key_def_object`` " +"which are not in the main ``key_def_object``." msgstr "" +"Объединение основного объекта ``key_def_object`` с другим объектом " +"``other_key_def_object``. Возвращает новый объект ``key_def_object``, " +"содержащий сначала все поля основного объекта ``key_def_object``, а потом те" +" поля объекта ``other_key_def_object``, которых не было в основном объекте " +"``key_def_object``." msgid "definition of fields to add" -msgstr "" +msgstr "определение полей, которые нужно добавить" msgid "key_def_object" -msgstr "" +msgstr "key_def_object" msgid "" -"-- This will return a key definition with fieldno=3 and fieldno=1.\n" +"-- This will return a key definition with fieldno = 3 and fieldno = 1.\n" "key_def = require('key_def')\n" "k = key_def.new({{type = 'string', fieldno = 3}})\n" "k2= key_def.new({{type = 'unsigned', fieldno = 1},\n" " {type = 'string', fieldno = 3}})\n" "k:merge(k2)" msgstr "" +"-- Результатом этого кода будет определение ключа\n" +"-- по полям с fieldno = 3 и fieldno = 1\n" +"key_def = require('key_def')\n" +"k = key_def.new({{type = 'string', fieldno = 3}})\n" +"k2= key_def.new({{type = 'unsigned', fieldno = 1},\n" +" {type = 'string', fieldno = 3}})\n" +"k:merge(k2)" msgid "" -"Return a table containing what is in the key_def_object. This is the reverse" -" of ``key_def.new()``:" +"Return a table containing what is in the ``key_def_object``. This is the " +"reverse of ``key_def.new()``:" msgstr "" +"Возвращает таблицу с содержимым ``key_def_object``. Функция противоположна " +"функции ``key_def.new()``:" -msgid "``key_def.new()`` takes a table and returns a key_def object," -msgstr "" +msgid "``key_def.new()`` takes a table and returns a ``key_def`` object," +msgstr "``key_def.new()`` принимает таблицу, а возвращает объект ``key_def``." msgid "" -"``key_def_object:totable()`` takes a key_def object and returns a table." +"``key_def_object:totable()`` takes a ``key_def`` object and returns a table." msgstr "" +"``key_def_object:totable()`` принимает объект ``key_def``, а возвращает " +"таблицу." msgid "This is useful for input to ``_serialize`` methods." msgstr "" +"Это удобно при подготовке входных данных для методов сериализации " +"(``_serialize``)." msgid "table" msgstr "таблица" msgid "" -"-- This will return a table with type='string', fieldno=3\n" +"-- This will return a table with type = 'string', fieldno = 3\n" "key_def = require('key_def')\n" "k = key_def.new({{type = 'string', fieldno = 3}})\n" "k:totable()" msgstr "" +"-- Результатом этого кода будет таблица с type = 'string', fieldno = 3\n" +"key_def = require('key_def')\n" +"k = key_def.new({{type = 'string', fieldno = 3}})\n" +"k:totable()" diff --git a/locale/ru/LC_MESSAGES/release/major-features.po b/locale/ru/LC_MESSAGES/release/major-features.po index 179a1d9272..29acb75ee5 100644 --- a/locale/ru/LC_MESSAGES/release/major-features.po +++ b/locale/ru/LC_MESSAGES/release/major-features.po @@ -153,11 +153,9 @@ msgid "2.4.1" msgstr "2.4.1" msgid "" -":ref:`UUID type for field and index <_index-box_uuid>` (:tarantool-" +":ref:`UUID type for field and index ` (:tarantool-" "issue:`4268`, :tarantool-issue:`2916`)" msgstr "" -":ref:`Поддержка UUID для полей и индексов<_index-box_uuid>` (:tarantool-" -"issue:`4268`, :tarantool-issue:`2916`)" msgid "" ":doc:`popen ` built-in module (:tarantool-"