Skip to content

Commit 14a2007

Browse files
committed
Merge remote-tracking branch 'origin/latest' into gh-1025-releases-lifetime-table
2 parents 8dbc948 + b093c87 commit 14a2007

File tree

6 files changed

+155
-25
lines changed

6 files changed

+155
-25
lines changed

doc/reference/configuration/cfg_basic.rst

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,29 @@
6161
.. confval:: listen
6262

6363
Since version 1.6.4.
64+
6465
The read/write data port number or :ref:`URI <index-uri>` (Universal
6566
Resource Identifier) string. Has no default value, so **must be specified**
66-
if connections will occur from remote clients that do not use the
67-
:ref:`admin port <admin-security>`. Connections made with
67+
if connections occur from the remote clients that don't use the
68+
:ref:`"admin port" <admin-security>`. Connections made with
6869
:samp:`listen = {URI}` are called "binary port" or "binary protocol"
6970
connections.
7071

7172
A typical value is 3301.
7273

73-
.. NOTE::
74+
.. code-block:: lua
75+
76+
box.cfg { listen = 3301 }
77+
78+
box.cfg { listen = "127.0.0.1:3301" }
79+
80+
.. NOTE::
7481

7582
A replica also binds to this port, and accepts connections, but these
7683
connections can only serve reads until the replica becomes a master.
7784

85+
Starting from version 2.10.0, you can specify :ref:`several URIs <index-uri-several>`.
86+
7887
| Type: integer or string
7988
| Default: null
8089
| Dynamic: yes

doc/reference/configuration/cfg_replication.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@
3232

3333
:extsamp:`box.cfg{ replication = { {*{'uri1'}*}, {*{'uri2'}*} } }`
3434

35-
If one of the URIs is "self" -- that is, if one of the URIs is for the
36-
instance where ``box.cfg{}`` is being executed on -- then it is ignored.
37-
Thus it is possible to use the same ``replication`` specification on
35+
.. note::
36+
37+
Starting from version 2.10.0, there is a number of other ways for specifying several URIs. See :ref:`syntax examples <index-uri-several>`.
38+
39+
If one of the URIs is "self"---that is, if one of the URIs is for the
40+
instance where ``box.cfg{}`` is being executed on---then it is ignored.
41+
Thus, it is possible to use the same ``replication`` specification on
3842
multiple server instances, as shown in
3943
:ref:`these examples <replication-bootstrap>`.
4044

doc/reference/configuration/cfg_storage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
| Type: integer
4444
| Default: 1024 * 1024 = 1048576 bytes
45-
| Dynamic: no
45+
| Dynamic: **yes**
4646
4747
.. _cfg_storage-memtx_min_tuple_size:
4848

doc/reference/configuration/index.rst

Lines changed: 128 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,25 @@ Command options
6969
URI
7070
--------------------------------------------------------------------------------
7171

72-
Some configuration parameters and some functions depend on a URI, or
73-
"Universal Resource Identifier". The URI string format is similar to the
72+
Some configuration parameters and some functions depend on a URI (Universal Resource Identifier).
73+
The URI string format is similar to the
7474
`generic syntax for a URI schema <https://en.wikipedia.org/wiki/List_of_URI_schemes>`_.
75-
So it may contain (in order) a user name
76-
for login, a password, a host name or host IP address, and a port number. Only
77-
the port number is always mandatory. The password is mandatory if the user
78-
name is specified, unless the user name is 'guest'. So, formally, the URI
75+
It may contain (in order):
76+
77+
* user name for login
78+
* password
79+
* host name or host IP address
80+
* port number.
81+
82+
Only a port number is always mandatory. A password is mandatory if a user
83+
name is specified, unless the user name is 'guest'.
84+
85+
Formally, the URI
7986
syntax is ``[host:]port`` or ``[username:password@]host:port``.
80-
If host is omitted, then '0.0.0.0' or '[::]' is assumed,
81-
meaning respectively any IPv4 address or any IPv6 address,
87+
If host is omitted, then "0.0.0.0" or "[::]" is assumed
88+
meaning respectively any IPv4 address or any IPv6 address
8289
on the local machine.
83-
If username:password is omitted, then 'guest' is assumed. Some examples:
90+
If ``username:password`` is omitted, then the "guest" user is assumed. Some examples:
8491

8592
.. container:: table
8693

@@ -97,12 +104,122 @@ If username:password is omitted, then 'guest' is assumed. Some examples:
97104
| username:password@host:port | notguest:[email protected]:3301 |
98105
+-----------------------------+------------------------------+
99106

100-
In certain circumstances a Unix domain socket may be used
101-
where a URI is expected, for example "unix/:/tmp/unix_domain_socket.sock" or
107+
In code, the URI value can be passed as a number (if only a port is specified) or a string:
108+
109+
.. code-block:: lua
110+
111+
box.cfg { listen = 3301 }
112+
113+
box.cfg { listen = "127.0.0.1:3301" }
114+
115+
In certain circumstances, a Unix domain socket may be used
116+
where a URI is expected, for example, "unix/:/tmp/unix_domain_socket.sock" or
102117
simply "/tmp/unix_domain_socket.sock".
103118

104119
A method for parsing URIs is illustrated in :ref:`Module uri <uri-parse>`.
105120

121+
.. _index-uri-several:
122+
123+
Specifying several URIs
124+
~~~~~~~~~~~~~~~~~~~~~~~
125+
126+
Starting from version 2.10.0, a user can open several listening iproto sockets on a Tarantool instance
127+
and, consequently, can specify several URIs in the configuration parameters
128+
such as :ref:`box.cfg.listen <cfg_basic-listen>` and :ref:`box.cfg.replication <cfg_replication-replication>`.
129+
130+
URI values can be set in a number of ways:
131+
132+
* As a string with URI values separated by commas.
133+
134+
.. code-block:: lua
135+
136+
box.cfg { listen = "127.0.0.1:3301, /unix.sock, 3302" }
137+
138+
* As a table that contains URIs in the string format.
139+
140+
.. code-block:: lua
141+
142+
box.cfg { listen = {"127.0.0.1:3301", "/unix.sock", "3302"} }
143+
144+
* As an array of tables with the ``uri`` field.
145+
146+
.. code-block:: lua
147+
148+
box.cfg { listen = {
149+
{uri = "127.0.0.1:3301"},
150+
{uri = "/unix.sock"},
151+
{uri = 3302}
152+
}
153+
}
154+
155+
* In a combined way---an array that contains URIs in both the string and the table formats.
156+
157+
.. code-block:: lua
158+
159+
box.cfg { listen = {
160+
"127.0.0.1:3301",
161+
{ uri = "/unix.sock" },
162+
{ uri = 3302 }
163+
}
164+
}
165+
166+
Also, starting from version 2.10.0, it is possible to specify additional parameters for URIs.
167+
You can do this in different ways:
168+
169+
* Using the ``?`` delimiter when URIs are specified in a string format.
170+
171+
.. code-block:: lua
172+
173+
box.cfg { listen = "127.0.0.1:3301?p1=value1&p2=value2, /unix.sock?p3=value3" }
174+
175+
* Using the ``params`` table: a URI is passed in a table with additional parameters in the "params" table.
176+
Parameters in the "params" table overwrite the ones from a URI string ("value2" overwries "value1" for ``p1`` in the example below).
177+
178+
.. code-block:: lua
179+
180+
box.cfg { listen = {
181+
"127.0.0.1:3301?p1=value1",
182+
params = {p1 = "value2", p2 = "value3"}
183+
}
184+
}
185+
186+
* Using the ``default_params`` table for specifying default parameter values.
187+
188+
In the example below, two URIs are passed in a table.
189+
The default value for the ``p3`` parameter is defined in the ``default_params`` table
190+
and used if this parameter is not specified in URIs.
191+
Parameters in the ``default_params`` table are applicable to all the URIs passed in a table.
192+
193+
.. code-block:: lua
194+
195+
box.cfg { listen = {
196+
"127.0.0.1:3301?p1=value1",
197+
{ uri = "/unix.sock", params = { p2 = "value2" } },
198+
default_params = { p3 = "value3" }
199+
}
200+
}
201+
202+
The recommended way for specifying URI with additional parameters is the following:
203+
204+
.. code-block:: lua
205+
206+
box.cfg { listen = {
207+
{uri = "127.0.0.1:3301", params = {p1 = "value1"}},
208+
{uri = "/unix.sock", params = {p2 = "value2"}},
209+
{uri = 3302, params = {p3 = "value3"}}
210+
}
211+
}
212+
213+
In case of a single URI, the following syntax also works:
214+
215+
.. code-block:: lua
216+
217+
box.cfg { listen = {
218+
uri = "127.0.0.1:3301",
219+
params = { p1 = "value1", p2 = "value2" }
220+
}
221+
}
222+
106223
.. _index-init_label:
107224

108225
--------------------------------------------------------------------------------

doc/reference/reference_lua/box_null.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ For example: you can't correctly assess the length of a table that is not a sequ
99

1010
**Example:**
1111

12-
.. code-block:: tarantoolsession
12+
.. code-block:: tarantoolsession
1313
1414
tarantool> t = {0, nil, 1, 2, nil}
1515
---
@@ -41,9 +41,9 @@ To avoid this problem, use Tarantool's ``box.NULL`` constant instead of **nil**.
4141
``box.NULL`` is a placeholder for a **nil** value in tables to preserve a key
4242
without a value.
4343

44-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44+
4545
Using box.NULL
46-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46+
~~~~~~~~~~~~~~
4747

4848
``box.NULL`` is a value of the cdata type representing a NULL pointer.
4949
It is similar to ``msgpack.NULL``, ``json.NULL`` and ``yaml.NULL``. So it is
@@ -99,9 +99,9 @@ Use ``box.NULL`` only with capitalized NULL (``box.null`` is incorrect).
9999
will always execute the function ``func()`` (because the condition ``box.NULL`` will
100100
always be neither **false** nor **nil**).
101101

102-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
103-
Distinction of nil and `box.NULL`
104-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
102+
103+
Distinction of nil and box.NULL
104+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
105105

106106
Use the expression ``if x == nil`` to check if the ``x`` is either a **nil**
107107
or a ``box.NULL``.

doc/release/1.10.7.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Tarantool 1.10.7
33

44
Release: :tarantool-release:`1.10.7`
55

6-
Date: 2019-07-17 Tag: 1.10.7-1-gb93a33a
6+
Date: 2020-07-17 Tag: 1.10.7-1-gb93a33a
77

88
Overview
99
--------

0 commit comments

Comments
 (0)