Skip to content
Snippets Groups Projects
Commit 2b76e749 authored by ocelot-inc's avatar ocelot-inc
Browse files

Resolving a merge conflict

parents c6a75728 92a979b0
No related branches found
No related tags found
No related merge requests found
Showing
with 224 additions and 190 deletions
.. _box-internals:
-------------------------------------------------------------------------------
Appendix B - Internals
Appendix B. Internals
-------------------------------------------------------------------------------
This section is for advanced users or users who wish to
......@@ -60,25 +60,25 @@ in the WAL, or discarded completely. Let's clarify how this happens, using the
REPLACE request as an example:
1. The server attempts to locate the original tuple by primary key. If found, a
reference to the tuple is retained for later use.
reference to the tuple is retained for later use.
2. The new tuple is validated. If for example it does not contain an
indexed field, or it has an indexed field whose type does not match the type
according to the index definition, the change is aborted.
2. The new tuple is validated. If for example it does not contain an indexed
field, or it has an indexed field whose type does not match the type
according to the index definition, the change is aborted.
3. The new tuple replaces the old tuple in all existing indexes.
4. A message is sent to WAL writer running in a separate thread, requesting that
the change be recorded in the WAL. The server switches to work on the next
request until the write is acknowledged.
the change be recorded in the WAL. The server switches to work on the next
request until the write is acknowledged.
5. On success, a confirmation is sent to the client. On failure, a rollback
procedure is begun. During the rollback procedure, the transaction processor
rolls back all changes to the database which occurred after the first failed
change, from latest to oldest, up to the first failed change. All rolled back
requests are aborted with :errcode:`ER_WAL_IO <ER_WAL_IO>` error. No new
change is applied while rollback is in progress. When the rollback procedure
is finished, the server restarts the processing pipeline.
procedure is begun. During the rollback procedure, the transaction processor
rolls back all changes to the database which occurred after the first failed
change, from latest to oldest, up to the first failed change. All rolled back
requests are aborted with :errcode:`ER_WAL_IO <ER_WAL_IO>` error. No new
change is applied while rollback is in progress. When the rollback procedure
is finished, the server restarts the processing pipeline.
One advantage of the described algorithm is that complete request pipelining is
achieved, even for requests on the same value of the primary key. As a result,
......@@ -140,45 +140,44 @@ make a checkpoint, and the snapshot operation is rolled back if
anything goes wrong, so sophia's checkpoint is at least as fresh
as the snapshot file.)
Step 1: Read the configuration parameters in the box.cfg{} request.
Parameters which affect recovery may include
:confval:`work_dir`, :confval:`wal_dir`, :confval:`snap_dir`,
:confval:`sophia_dir`,
:confval:`panic_on_snap_error`, and :confval:`panic_on_wal_error`.
Step 2: Find the latest snapshot file. Use its data to reconstruct
the in-memory databases. Instruct the sophia engine to recover to
the latest checkpoint.
There are actually two variations of the reconstruction procedure
for the memtx databases, depending whether the recovery process is "default".
If it is default (panic_on_snap_error is true and panic_on_wal_error is true),
memtx can read data in
the snapshot with all indexes disabled. First, all tuples are read into memory.
Then, primary keys are built
in bulk, taking advantage of the fact that the data is already sorted
by primary key within each space.
If it is not default (panic_on_snap_error is false or panic_on_wal_error is false),
Tarantool performs additional checking.
Indexes are enabled at the start, and tuples are added one by one.
This means that any unique-key constraint violations will be caught,
and any duplicates will be skipped.
Normally there will be no constraint violations or duplicates,
so these checks are only made if an error has occurred.
Step 2: Find the WAL file that was made at the time of, or after,
the snapshot file. Read its log entries until the log-entry LSN is greater
than the LSN of the snapshot, or greater than the LSN of the sophia checkpoint.
This is the recovery process's "start position"; it matches the current
state of the engines.
Step 3: Redo the log entries, from the start position to the end of
the WAL. The engine skips a redo instruction if it is older than
the engine's checkpoint.
Step 4: For the memtx engine, re-create all secondary indexes.
Step 1
Read the configuration parameters in the ``box.cfg{}`` request.
Parameters which affect recovery may include :confval:`work_dir`,
:confval:`wal_dir`, :confval:`snap_dir`, :confval:`sophia_dir`,
:confval:`panic_on_snap_error`, and :confval:`panic_on_wal_error`.
Step 2
Find the latest snapshot file. Use its data to reconstruct the in-memory
databases. Instruct the sophia engine to recover to the latest checkpoint.
There are actually two variations of the reconstruction procedure for the memtx
databases, depending whether the recovery process is "default".
If it is default (``panic_on_snap_error`` is ``true`` and ``panic_on_wal_error``
is ``true``), memtx can read data in the snapshot with all indexes disabled.
First, all tuples are read into memory. Then, primary keys are built in bulk,
taking advantage of the fact that the data is already sorted by primary key
within each space.
If it is not default (``panic_on_snap_error`` is ``false`` or ``panic_on_wal_error``
is ``false``), Tarantool performs additional checking. Indexes are enabled at
the start, and tuples are added one by one. This means that any unique-key
constraint violations will be caught, and any duplicates will be skipped.
Normally there will be no constraint violations or duplicates, so these checks
are only made if an error has occurred.
Step 2
Find the WAL file that was made at the time of, or after, the snapshot file.
Read its log entries until the log-entry LSN is greater than the LSN of the
snapshot, or greater than the LSN of the sophia checkpoint. This is the
recovery process's "start position"; it matches the current state of the engines.
Step 3
Redo the log entries, from the start position to the end of the WAL. The
engine skips a redo instruction if it is older than the engine's checkpoint.
Step 4
For the memtx engine, re-create all secondary indexes.
.. _internals-replication:
......@@ -186,92 +185,86 @@ Step 4: For the memtx engine, re-create all secondary indexes.
Server Startup With Replication
===============================
In addition to the recovery process described above,
the server must take additional steps and precautions
if :ref:`replication <box-replication>` is enabled.
Once again the startup procedure is initiated by the
:code:`box.cfg{}` request. One of the box.cfg parameters
may be :confval:`replication_source`. We will refer to
this server, which is starting up due to box.cfg, as the
"local" server to distinguish it from the other servers
in a cluster, which we will refer to as "distant" servers.
*If there is no snapshot .snap file and replication_source is empty*:
then the local server
assumes it is an unreplicated "standalone" server,
or is the first server of a new replication cluster.
It will generate new UUIDs
for itself and for the cluster. The server UUID is
stored in the _cluster space; the cluster UUID is stored in
the _schema space. Since a snapshot contains all the data
in all the spaces, that means the local server's snapshot will
contain the server UUID and the cluster UUID.
Therefore, when the local server restarts on later occasions,
it will be able to recover these UUIDs when it reads the .snap file.
In addition to the recovery process described above, the server must take
additional steps and precautions if :ref:`replication <box-replication>` is
enabled.
Once again the startup procedure is initiated by the ``box.cfg{}`` request.
One of the box.cfg parameters may be :confval:`replication_source`. We will
refer to this server, which is starting up due to box.cfg, as the "local" server
to distinguish it from the other servers in a cluster, which we will refer to as
"distant" servers.
*If there is no snapshot .snap file and replication_source is empty*: |br|
then the local server assumes it is an unreplicated "standalone" server, or is
the first server of a new replication cluster. It will generate new UUIDs for
itself and for the cluster. The server UUID is stored in the _cluster space; the
cluster UUID is stored in the _schema space. Since a snapshot contains all the
data in all the spaces, that means the local server's snapshot will contain the
server UUID and the cluster UUID. Therefore, when the local server restarts on
later occasions, it will be able to recover these UUIDs when it reads the .snap
file.
*If there is no snapshot .snap file and replication_source is not empty
and the _cluster space contains no other server UUIDs*:
then the local server assumes it is not a standalone server,
but is not yet part of a cluster. It must now join the cluster.
It will send its server UUID to the first distant server which is listed
in replication_source, which will act as a master. This is called the "join request".
When a distant server receives a join request, it will send back: |br|
(1) the distant server's cluster UUID, |br|
and the _cluster space contains no other server UUIDs*: |br|
then the local server assumes it is not a standalone server, but is not yet part
of a cluster. It must now join the cluster. It will send its server UUID to the
first distant server which is listed in replication_source, which will act as a
master. This is called the "join request". When a distant server receives a join
request, it will send back:
(1) the distant server's cluster UUID,
(2) the contents of the distant server's .snap file. |br|
When the local server receives this information, it puts the
cluster UUID in its _schema space, puts the distant server's
UUID and connection information in its _cluster space, and
makes a snapshot containing all the data sent by the distant server.
Then, if the local server has data in its WAL .xlog files, it sends that data to
the distant server. The distant server will receive this and
update its own copy of the data, and add the local server's
UUID to its _cluster space.
When the local server receives this information, it puts the cluster UUID in
its _schema space, puts the distant server's UUID and connection information
in its _cluster space, and makes a snapshot containing all the data sent by
the distant server. Then, if the local server has data in its WAL .xlog
files, it sends that data to the distant server. The distant server will
receive this and update its own copy of the data, and add the local server's
UUID to its _cluster space.
*If there is no snapshot .snap file and replication_source is not empty
and the _cluster space contains other server UUIDs*:
then the local server assumes it is not a standalone server,
and is already part of a cluster.
It will send its server UUID and cluster UUID to all the distant servers
which are listed in replication_source. This is called the
"on-connect handshake".
When a distant server receives an on-connect handshake: |br|
(1) the distant server compares its own copy of the cluster UUID to
the one in the on-connect handshake. If there is no match,
then the handshake fails and the local server will display an error. |br|
(2) the distant server looks for a record of the connecting instance in
its _cluster space. If there is none, then the handshake fails. |br|
Otherwise the handshake is successful.
The distant server will read any new information from its own .snap and .xlog files, and send
the new requests to the local server.
In the end ... the local server knows what cluster it belongs to,
the distant server knows that the local server is a member of
the cluster, and both servers have the same database contents.
*If there is a snapshot file and replication source is not empty*:
first the local server goes through the recovery process described
in the previous section, using its own .snap and .xlog files.
Then it sends a "subscribe" request to all the other servers of the cluster.
The subscribe request contains the server vector clock.
The vector clock has a collection of pairs 'server id, lsn' for every server
in the _cluster system space.
Each distant server, upon receiving a subscribe request, will
read its .xlog files' requests and send them to the local server
if (lsn of .xlog file request) is greater than (lsn of the
vector clock in the subscribe request).
After all the other servers of the cluster have responded to
the local server's subscribe request, the server startup is complete.
The following temporary limitations apply for version 1.6: |br|
and the _cluster space contains other server UUIDs*: |br|
then the local server assumes it is not a standalone server, and is already part
of a cluster. It will send its server UUID and cluster UUID to all the distant
servers which are listed in replication_source. This is called the "on-connect
handshake". When a distant server receives an on-connect handshake: |br|
(1) the distant server compares its own copy of the cluster UUID to the one in
the on-connect handshake. If there is no match, then the handshake fails and
the local server will display an error.
(2) the distant server looks for a record of the connecting instance in its
_cluster space. If there is none, then the handshake fails. |br|
Otherwise the handshake is successful. The distant server will read any new
information from its own .snap and .xlog files, and send the new requests to
the local server.
In the end ... the local server knows what cluster it belongs to, the distant
server knows that the local server is a member of the cluster, and both servers
have the same database contents.
*If there is a snapshot file and replication source is not empty*: |br|
first the local server goes through the recovery process described in the
previous section, using its own .snap and .xlog files. Then it sends a
"subscribe" request to all the other servers of the cluster. The subscribe
request contains the server vector clock. The vector clock has a collection of
pairs 'server id, lsn' for every server in the _cluster system space. Each
distant server, upon receiving a subscribe request, will read its .xlog files'
requests and send them to the local server if (lsn of .xlog file request) is
greater than (lsn of the vector clock in the subscribe request). After all the
other servers of the cluster have responded to the local server's subscribe
request, the server startup is complete.
The following temporary limitations apply for version 1.6:
* The URIs in replication_source should all be in the same order on all servers.
This is not mandatory but is an aid to consistency. |br|
This is not mandatory but is an aid to consistency.
* The servers of a cluster should be started up at slightly different times.
This is not mandatory but prevents a situation where each server is waiting
for the other server to be ready. |br|
This is not mandatory but prevents a situation where each server is waiting
for the other server to be ready.
* The maximum number of entries in the _cluster space is 32. Tuples for
out-of-date replicas are not automatically re-used, so if this 32-replica
limit is reached, users may have to reorganize the _cluster space manually.
out-of-date replicas are not automatically re-used, so if this 32-replica
limit is reached, users may have to reorganize the _cluster space manually.
.. _MsgPack: https://en.wikipedia.org/wiki/MessagePack
.. _doc/box-protocol.html: http://tarantool.org/doc/box-protocol.html
......@@ -595,7 +595,6 @@ on /usr. The PostgreSQL server is already running on the local host 127.0.0.1.
.. code-block:: console
$ # Check that the include subdirectory exists
$ # by looking for /usr/include/postgresql/libpq-fe-h.
$ [ -f /usr/include/postgresql/libpq-fe.h ] && echo "OK" || echo "Error"
......
......@@ -342,8 +342,8 @@ purposes are:
.. cssclass:: highlight
.. parsed-literal::
box.session.uid() -- returns the id of the current user
box.session.user() -- returns the name of the current user
box.session.uid() -- returns the id of the current user
box.session.user() -- returns the name of the current user
box.session.su(*user-name*) -- allows changing current user to 'user-name'
If a user types requests directly on the Tarantool server in its interactive
......
......@@ -90,10 +90,12 @@ A list of all ``box.space`` functions follows, then comes a list of all
first created index, which will be used as the primary-key index, must be
unique.
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
:codeitalic:`index_name` (type = string) = name of index, which should not be a number and
should not contain special characters;
:codeitalic:`options`.
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
* :codeitalic:`index_name` (type = string) = name of index, which should
not be a number and should not contain special characters;
* :codeitalic:`options`.
:return: index object
:rtype: index_object
......@@ -148,8 +150,10 @@ A list of all ``box.space`` functions follows, then comes a list of all
Insert a tuple into a space.
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
:codeitalic:`tuple` (type = Lua table or tuple) = tuple to be inserted.
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
* :codeitalic:`tuple` (type = Lua table or tuple) = tuple to be inserted.
:return: the inserted tuple
:rtype: tuple
......@@ -172,9 +176,11 @@ A list of all ``box.space`` functions follows, then comes a list of all
Search for a tuple or a set of tuples in the given space.
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
:codeitalic:`key` (type = Lua table or scalar) = key to be matched against the index
key, which may be multi-part.
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
* :codeitalic:`key` (type = Lua table or scalar) = key to be matched
against the index key, which may be multi-part.
:return: the tuples whose primary-key fields are equal to the passed
field-values. If the number of passed field-values is less
......@@ -243,9 +249,11 @@ A list of all ``box.space`` functions follows, then comes a list of all
Search for a tuple in the given space.
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
:codeitalic:`key` (type = Lua table or scalar) = key to be matched against the index
key, which may be multi-part.
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
* :codeitalic:`key` (type = Lua table or scalar) = key to be matched
against the index key, which may be multi-part.
:return: the tuple whose index key matches :codeitalic:`key`, or null.
:rtype: tuple
......@@ -273,7 +281,9 @@ A list of all ``box.space`` functions follows, then comes a list of all
Drop a space.
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
:return: nil
......@@ -292,8 +302,10 @@ A list of all ``box.space`` functions follows, then comes a list of all
Rename a space.
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
:codeitalic:`space-name` (type = string) = new name for space.
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
* :codeitalic:`space-name` (type = string) = new name for space.
:return: nil
......@@ -319,8 +331,10 @@ A list of all ``box.space`` functions follows, then comes a list of all
``box.space...:put()`` have the same effect; the latter is sometimes used
to show that the effect is the converse of ``box.space...:get()``.
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
:codeitalic:`tuple` (type = Lua table or tuple) = tuple to be inserted.
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
* :codeitalic:`tuple` (type = Lua table or tuple) = tuple to be inserted.
:return: the inserted tuple.
:rtype: tuple
......@@ -372,22 +386,24 @@ A list of all ``box.space`` functions follows, then comes a list of all
For ``!`` and ``=`` operations the field number can be ``-1``, meaning the last field in the tuple.
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
:codeitalic:`key` (type = Lua table or scalar) = primary-key field values, must be passed as a Lua
table if key is multi-part;
:codeitalic:`{operator, field_no, value}` (type = table): a group of arguments for each
operation, indicating what the operation is, what field the
operation will apply to, and what value will be applied. The
field number can be negative, meaning the position from the
end of tuple (#tuple + negative field number + 1).
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
* :codeitalic:`key` (type = Lua table or scalar) = primary-key field
values, must be passed as a Lua table if key is multi-part;
* :codeitalic:`{operator, field_no, value}` (type = table): a group of
arguments for each operation, indicating what the operation is, what
field the operation will apply to, and what value will be applied. The
field number can be negative, meaning the position from the end of
tuple (#tuple + negative field number + 1).
:return: the updated tuple.
:rtype: tuple
Possible errors: it is illegal to modify a primary-key field.
**Complexity Factors:** Index size, Index type, number of indexes accessed, WAL
settings.
**Complexity Factors:** Index size, Index type, number of indexes
accessed, WAL settings.
Note re storage engine: sophia will return nil, rather than the updated tuple.
......@@ -397,11 +413,11 @@ A list of all ``box.space`` functions follows, then comes a list of all
s:update(44, {{'+', 1, 55 }, {'=', 3, 'x'}})
the primary-key value is ``44``, the operators are ``'+'`` and ``'='`` meaning
*add a value to a field and then assign a value to a field*, the first
affected field is field ``1`` and the value which will be added to it is
``55``, the second affected field is field ``3`` and the value which will be
assigned to it is ``'x'``.
the primary-key value is ``44``, the operators are ``'+'`` and ``'='``
meaning *add a value to a field and then assign a value to a field*, the
first affected field is field ``1`` and the value which will be added to
it is ``55``, the second affected field is field ``3`` and the value
which will be assigned to it is ``'x'``.
**Example:**
......@@ -519,15 +535,16 @@ A list of all ``box.space`` functions follows, then comes a list of all
error checks before returning -- this is a design feature which
enhances throughput but requires more caution on the part of the user.
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
:samp:`{tuple_value}` (type = Lua table or scalar) =
field values, must be passed as a Lua
table if tuple_value contains more than one field;
:codeitalic:`{operator, field_no, value}` (type = Lua table) = a group of arguments for each
operation, indicating what the operation is, what field the
operation will apply to, and what value will be applied. The
field number can be negative, meaning the position from the
end of tuple (#tuple + negative field number + 1).
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
* :samp:`{tuple_value}` (type = Lua table or scalar) = field values,
must be passed as a Lua table if tuple_value contains more than one field;
* :codeitalic:`{operator, field_no, value}` (type = Lua table) = a group
of arguments for each operation, indicating what the operation is,
what field the operation will apply to, and what value will be applied.
The field number can be negative, meaning the position from the end of
tuple (#tuple + negative field number + 1).
:return: null.
......@@ -546,9 +563,11 @@ A list of all ``box.space`` functions follows, then comes a list of all
Delete a tuple identified by a primary key.
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
:codeitalic:`key` (type = Lua table or scalar) = key to be matched against the index
key, which may be multi-part.
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`
* :codeitalic:`key` (type = Lua table or scalar) = key to be matched
against the index key, which may be multi-part.
:return: the deleted tuple
:rtype: tuple
......@@ -581,7 +600,9 @@ A list of all ``box.space`` functions follows, then comes a list of all
``box.space.tester:insert{0}`` and ``box.space[800]:insert{0}``
are equivalent requests.
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
**Example:**
......@@ -597,7 +618,9 @@ A list of all ``box.space`` functions follows, then comes a list of all
Whether or not this space is enabled.
The value is ``false`` if the space has no index.
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
.. _space-object-field-count:
......@@ -617,7 +640,9 @@ A list of all ``box.space`` functions follows, then comes a list of all
The default value is ``0``, which means there is no required field count.
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
**Example:**
......@@ -634,7 +659,9 @@ A list of all ``box.space`` functions follows, then comes a list of all
:mod:`box.index` with methods to search tuples and iterate over them in
predefined order.
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
:rtype: table
......@@ -674,7 +701,9 @@ A list of all ``box.space`` functions follows, then comes a list of all
.. method:: len()
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
:return: Number of tuples in the space.
......@@ -693,7 +722,9 @@ A list of all ``box.space`` functions follows, then comes a list of all
Deletes all tuples.
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
**Complexity Factors:** Index size, Index type, Number of tuples accessed.
......@@ -722,8 +753,11 @@ A list of all ``box.space`` functions follows, then comes a list of all
value set to ``1``.
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
:codeitalic:`field-value(s)` (type = Lua table or scalar) = values which must match the primary key.
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
* :codeitalic:`field-value(s)` (type = Lua table or scalar) = values
which must match the primary key.
:return: the new counter value
:rtype: number
......@@ -760,8 +794,11 @@ A list of all ``box.space`` functions follows, then comes a list of all
``field-value(s)``, a new one is not inserted. If the counter value drops
to zero, the tuple is deleted.
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
:codeitalic:`field-value(s)` (type = Lua table or scalar) = values which must match the primary key.
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
* :codeitalic:`field-value(s)` (type = Lua table or scalar) = values
which must match the primary key.
:return: the new counter value
:rtype: number
......@@ -803,8 +840,11 @@ A list of all ``box.space`` functions follows, then comes a list of all
primary-key field will be incremented before the insert.
Note re storage engine: sophia does not support auto_increment.
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
:codeitalic:`field-value(s)` (type = Lua table or scalar) = tuple's fields, other than the primary-key field.
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
* :codeitalic:`field-value(s)` (type = Lua table or scalar) = tuple's
fields, other than the primary-key field.
:return: the inserted tuple.
:rtype: tuple
......@@ -831,7 +871,9 @@ A list of all ``box.space`` functions follows, then comes a list of all
A helper function to prepare for iterating over all tuples in a space.
Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
Parameters:
* :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
:return: function which can be used in a for/end loop. Within the loop, a value is returned for each iteration.
:rtype: function, tuple
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment