Skip to content

Commit 2dcb019

Browse files
authored
Release 3.4.0: add review + amend release calendar (#5082)
1 parent 61c7421 commit 2dcb019

File tree

3 files changed

+259
-5
lines changed

3 files changed

+259
-5
lines changed

doc/release/3.4.0.rst

+247
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
Tarantool 3.4
2+
=============
3+
4+
Release date: April 14, 2024
5+
6+
Releases on GitHub: :tarantool-release:`3.4.0`
7+
8+
The 3.4 release of Tarantool adds the following main product features and improvements
9+
for the Community and Enterprise editions:
10+
11+
* **Community Edition (CE)**
12+
13+
* Memtx-vinyl cross-engine transactions.
14+
* New ``index:quantile()`` function for finding a quantile key in an indexed data range.
15+
* Functional indexes in the MVCC transaction manager.
16+
* Vinyl now supports ``np`` (next prefix) and ``pp`` (previous prefix) iterators.
17+
* Fixed incorrect number comparisons and duplicates in unique indexes.
18+
* Runtime priviledges for ``lua_call`` are now granted before ``box.cfg()``.
19+
* The ``stop`` callbacks for the roles are now called during graceful shutdown,
20+
in the reverse order of roles startup.
21+
* New ``has_role``, ``is_router``, and ``is_storage`` methods in the
22+
``config`` module to check if a role is enabled on an instance.
23+
* LuaJIT profilers are now more user-friendly.
24+
* Built-in logger now encodes table arguments in the JSON format.
25+
* Multiple bugfixes for MVCC, vinyl, WAL, and snapshotting.
26+
* Fixed memory overgrowing for cdata-intensive workloads.
27+
28+
* **Enterprise Edition (EE)**
29+
30+
* New in-memory columnar storage engine: ``memcs``.
31+
* New bootstrap strategy in failover: ``native``.
32+
* New public API for accessing remote ``config.storage`` clusters as key-value storages.
33+
* Two-phase appointment process to avoid incorrect behavior of the failover coordinator.
34+
35+
.. _3-4-memcs:
36+
37+
[EE] New in-memory columnar storage engine: ``memcs``
38+
-----------------------------------------------------
39+
40+
The engine stores data in the memtx arena but in contrast to memtx it doesn't
41+
organize data in tuples. Instead, it stores data in columns. Each format field
42+
is assigned its own BPS tree-like structure (BPS vector), which stores values
43+
only of that field. If the field type fits in 8 bytes, raw field values are
44+
stored directly in tree leaves without any encoding. For values larger than 8
45+
bytes, like decimal, uuid or strings, the leaves store pointers to
46+
MsgPack-encoded data.
47+
48+
The main benefit of such data organization is a significant performance boost
49+
of columnar data sequential scans compared to memtx thanks to CPU cache
50+
locality. That's why memcs supports a special C api for such columnar scans:
51+
see `box_index_arrow_stream()` and `box_raw_read_view_arrow_stream()`.
52+
Peak performance is achieved when scanning embedded field types.
53+
54+
Querying full tuples, like in memtx, is also supported, but the performance is
55+
worse compared to memtx, because a tuple has to be constructed on the runtime
56+
arena from individual field values gathered from each column tree.
57+
58+
Other features include:
59+
* Point lookup.
60+
* Stable iterators.
61+
* Insert/replace/delete/update.
62+
* Batch insertion in the Arrow format.
63+
* Transactions, including cross-engine transactions with memtx
64+
(with ``memtx_use_mvcc_engine = false``).
65+
* Read view support.
66+
* Secondary indexes with an ability to specify covered columns and sequentially scan
67+
indexed + covered columns.
68+
69+
Embedded field types include only fixed-width types:
70+
* Integer: (u)int8/16/32/64.
71+
* Floating point: float32/64.
72+
73+
Types with external storage include:
74+
* Strings.
75+
* All the other types supported by Tarantool: UUID, Decimal, Datetime, etc.
76+
77+
By default, NULL values are stored explicitly and use up the same space as
78+
any other valid column value (1, 2, 4 or 8 bytes depending on an exact field
79+
type), however RLE encoding of NULLs is also supported. For reference,
80+
RLE-encoding of a column with 90% evenly distributed NULL values reduces
81+
memory consumption of that column by around 5 times.
82+
83+
.. _3-4-cross-engine:
84+
85+
[CE] Memtx-vinyl cross-engine transactions
86+
-----------------------------------------------
87+
88+
Tarantool now supports mixing statements for memtx and vinyl in the same transaction,
89+
for example:
90+
91+
.. code-block:: lua
92+
93+
local memtx = box.schema.space.create('memtx', {engine = 'memtx'})
94+
memtx:create_index('primary')
95+
local vinyl = box.schema.space.create('vinyl', {engine = 'vinyl'})
96+
vinyl:create_index('primary')
97+
98+
memtx:insert({1, 'a'})
99+
vinyl:insert({2, 'b'})
100+
101+
box.begin()
102+
memtx:replace(vinyl:get(2))
103+
vinyl:replace(memtx:get(1))
104+
box.commit()
105+
106+
.. note::
107+
108+
* Accessing a vinyl space may trigger a fiber yield (to read a file from the disk),
109+
so MVCC must be enabled in memtx to make use of the new feature:
110+
111+
.. code-block:: lua
112+
113+
box.cfg{memtx_use_mvcc_engine = true}
114+
115+
* Vinyl operations may yield implicitly, so a transaction may be aborted
116+
with TRANSACTION_CONFLICT in case of concurrent transactions.
117+
118+
.. _3-4-native:
119+
120+
[EE] New boostrap strategy in failover: ``native``
121+
--------------------------------------------------
122+
123+
Now supervised failover coordinator supports three bootstrap strategies:
124+
native, supervised, auto.
125+
126+
The new ``native`` strategy relaxes the limitations of the ``auto`` strategy,
127+
but has different under-the-hood implementation (based on the ``supervised`` strategy).
128+
Otherwise, it acts similar to the ``auto`` strategy.
129+
130+
In effect, it helps resolve these two problems:
131+
* Avoid the error ``Some replica set members were not specified in box.cfg.replication``
132+
in the following cases:
133+
* several replicas join at the same time,
134+
* the replica set includes non-anonymous CDC instances,
135+
* ``_cluster`` contains old unneeded replicas.
136+
* Make the database get bootstrapped upon the coordinator's command rather than
137+
let the instances boostrap it on their own.
138+
139+
This strategy is the recommended choice for highly dynamic clusters with automatic
140+
scaling, as well as in most other cases.
141+
142+
To enable the ``native`` bootstrap strategy, set it in the ``replication`` section
143+
of the cluster's configuration, together with a proper failover strategy
144+
(for ``native``, you can choose any failover strategy you like, for example ``supervised``):
145+
146+
.. code-block:: yaml
147+
148+
replication:
149+
failover: supervised
150+
bootstrap_strategy: native
151+
152+
.. _3-4-runtime-priv:
153+
154+
[CE] Runtime priviledges for ``lua_call`` granted before ``box.cfg()``
155+
----------------------------------------------------------------------
156+
157+
It is now possible to grant execution privileges for Lua functions
158+
through the declarative configuration, even when the database is in
159+
read-only mode or has an outdated schema version. You might also
160+
permit ``guest`` to execute Lua functions before the initial bootstrap.
161+
162+
You can specify function permissions using the ``lua_call`` option in
163+
the configuration, for example:
164+
165+
.. code-block:: lua
166+
167+
credentials:
168+
users:
169+
alice:
170+
privileges:
171+
- permissions: [execute]
172+
lua_call: [my_func]
173+
174+
This grants the ``alice`` user permission to execute the ``my_func`` Lua
175+
function, regardless of the database's mode or status. The special option
176+
``lua_call: [all]`` is also supported, granting access to all global Lua
177+
functions except built-in ones, bypassing database restrictions.
178+
179+
Privileges will still be written to the database when possible to
180+
maintain compatibility and consistency with other privilege types.
181+
182+
[CE] New methods in the ``config`` module to check instance roles
183+
-----------------------------------------------------------------
184+
185+
Three new methods are now available in the ``config`` module:
186+
187+
* ``config:has_role('myrole')`` tells whether the current instance has the role ``myrole``, and
188+
``config:has_role('myrole', {instance = 'i-001'})`` does the same for the specified instance (``i-001``).
189+
190+
* ``config:is_router()`` tells whether the current instance is a vshard router, and
191+
``config:is_router({instance = 'i-002'})`` does the same for the specified instance (``i-002``).
192+
193+
* ``config:is_storage()`` tells whether the current instance is a vshard storage, and
194+
``config:is_storage({instance = 'i-003'})`` does the same for the specified instance (``i-003``).
195+
196+
.. _3-4-storage-client-api:
197+
198+
[EE] New public API: ``config.storage_client``
199+
----------------------------------------------
200+
201+
Remote ``config.storage`` clusters can now be accessed by using the
202+
``config.storage_client.connect(endpoints[, {options}])`` method.
203+
The returned object represents a connection to a remote key-value
204+
storage accessed through the ``:get()``, ``:put()``, ``:info()``, ``:txn()``
205+
methods with the same signature as in the server
206+
:ref:`config.storage <config_module_api_reference>` API.
207+
208+
The ``config.storage_client`` API has also several specific methods:
209+
``:is_connected()``, ``:watch()``, ``:reconnect()``, ``:close()``.
210+
211+
Here are some usage examples:
212+
213+
.. code-block:: lua
214+
215+
-- Connect to a config.storage cluster using the endpoints
216+
-- configured in the `config.storage` section.
217+
--
218+
-- You can provide endpoints as a Lua table:
219+
--
220+
-- local endpoints = {
221+
-- {
222+
-- uri = '127.0.0.1:4401',
223+
-- login = 'sampleuser',
224+
-- password = '123456',
225+
-- }
226+
-- }
227+
228+
local endpoints = config:get('config.storage.endpoints')
229+
local client = config.storage_client.connect(endpoints)
230+
231+
-- Put a value to the connected client.
232+
client:put('/v', 'a')
233+
234+
-- Get all stored values.
235+
local values = client:get('/')
236+
237+
-- Clean the storage.
238+
local response = client:delete('/')
239+
240+
-- Watch for key changes.
241+
local log = require('log')
242+
local w = client:watch('/config/main', function()
243+
log.info('config has been updated')
244+
end)
245+
246+
-- Unregister a watcher.
247+
w:unregister()

doc/release/_images/releases_calendar.svg

+1-1
Loading

doc/release/index.rst

+11-4
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ For information about earlier versions, see :doc:`eol_versions`.
6161
- End of support
6262
- Versions
6363

64+
* - :doc:`3.4 </release/3.4.0>`
65+
- **April 14, 2025**
66+
- **April 14, 2027**
67+
- **Not planned yet**
68+
- | :tarantool-release:`3.4.0`
69+
6470
* - :doc:`3.3 </release/3.3.0>`
6571
- **November 29, 2024**
6672
- **November 29, 2026**
@@ -77,16 +83,16 @@ For information about earlier versions, see :doc:`eol_versions`.
7783
7884
* - :doc:`3.1 </release/3.1.0>`
7985
- **April 16, 2024**
80-
- **April 16, 2026**
81-
- **Not planned yet**
86+
- **August 26, 2024**
87+
- **August 26, 2024**
8288
- | :tarantool-release:`3.1.2`
8389
| :tarantool-release:`3.1.1`
8490
| :tarantool-release:`3.1.0`
8591
8692
* - :doc:`3.0 </release/3.0.0>`
8793
- **December 26, 2023**
88-
- **December 26, 2025**
89-
- **Not planned yet**
94+
- **April 17, 2024**
95+
- **April 17, 2024**
9096
- | :tarantool-release:`3.0.2`
9197
| :tarantool-release:`3.0.1`
9298
| :tarantool-release:`3.0.0`
@@ -120,6 +126,7 @@ For information about earlier versions, see :doc:`eol_versions`.
120126
.. toctree::
121127
:maxdepth: 1
122128

129+
3.4.0
123130
3.3.0
124131
3.2.0
125132
3.1.0

0 commit comments

Comments
 (0)