|
| 1 | +Tarantool 3.5 |
| 2 | +============= |
| 3 | + |
| 4 | +Release date: 2025-08-27 |
| 5 | + |
| 6 | +Releases on GitHub: :tarantool-release:`3.5.0` |
| 7 | + |
| 8 | +The 3.5 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 | + * Fixed-point decimal types ``decimal32``, ``decimal64`` are supported. |
| 14 | + * Memtx: new O(n) sorting algorithm for sorting secondary keys on startup. |
| 15 | + * New ``fail_if`` tag for roles and scripts. |
| 16 | + * Faster large (500+) clusters reload. |
| 17 | + |
| 18 | +* **Enterprise Edition (EE)** |
| 19 | + |
| 20 | + * Quorum synchronous replication setup in three availability zones is supported by ``failover = 'supervised'``. |
| 21 | + * Supervised failover coordinator skips RW switch in presence of dead instances. |
| 22 | + * Fixed-point decimal types are supported in MemCS. |
| 23 | + * BRIN indexes are supported in MemCS. |
| 24 | + * Performance is improved in MemCS. |
| 25 | + * Secondary index batch insertion performance is improved in MemCS. |
| 26 | + * Storage format and string scanning performance improvements in MemCS. |
| 27 | + |
| 28 | +.. _3-5-fixed-point-decimals-ce: |
| 29 | + |
| 30 | +[CE] Support for fixed-point decimal types ``decimal32``, ``decimal64`` |
| 31 | +----------------------------------------------------------------------- |
| 32 | + |
| 33 | +Fixed-point decimal types are now supported: ``decimal32``, ``decimal64``, ``decimal128``, and ``decimal256``. |
| 34 | +They differ in their number of significant decimal digits: |
| 35 | + |
| 36 | +* ``decimal32`` - 9 |
| 37 | +* ``decimal64`` - 18 |
| 38 | +* ``decimal128`` - 38 |
| 39 | +* ``decimal256`` - 76 |
| 40 | + |
| 41 | +These types also have an additional parameter, ``scale``, which defines the position of the decimal point. |
| 42 | +This can also be interpreted as an implied decimal exponent with a value of ``-scale``. |
| 43 | + |
| 44 | +For example: |
| 45 | + |
| 46 | +* A ``decimal32`` type with ``scale = 4`` can represent values from ``-99999.9999`` to ``99999.9999``. |
| 47 | +* A ``decimal32`` type with ``scale = -2`` can represent values from ``-999999999 × 10²`` to ``999999999 × 10²``. |
| 48 | + |
| 49 | +Example 1. Creating a space with a field of a fixed decimal type: |
| 50 | + |
| 51 | +.. code-block:: lua |
| 52 | +
|
| 53 | + s = box.schema.create_space('test', {format = { |
| 54 | + {'a', 'unsigned'}, {'b', 'decimal32', scale = 4}, |
| 55 | + }}) |
| 56 | +
|
| 57 | +Decimal values can be created using the ``decimal`` module. It has been updated the following way to support |
| 58 | +representing values of the new types: |
| 59 | + |
| 60 | +* The limitation on exponent has been removed. |
| 61 | +* Precision has been increased to 76 decimal digits. |
| 62 | +* Printing is now done in scientific notation. |
| 63 | + |
| 64 | +.. code-block:: lua |
| 65 | +
|
| 66 | + local decimal = require('decimal') |
| 67 | + s = box.schema.create_space('test', {format = { |
| 68 | + {'a', 'unsigned'}, {'b', 'decimal32', scale = 4}, |
| 69 | + }}) |
| 70 | + s:create_index('pk') |
| 71 | + s:insert({1, decimal.new(13333)}) |
| 72 | + s:insert({2, decimal.new(0.0017)}) |
| 73 | +
|
| 74 | +.. _3-5-memtx-sorting-secondary: |
| 75 | + |
| 76 | +[CE] Memtx: new O(n) sorting algorithm for sorting secondary keys |
| 77 | +----------------------------------------------------------------- |
| 78 | + |
| 79 | +Now it is possible to sort secondary keys using a new O(n) sorting |
| 80 | +algorithm that uses additional data written into the snapshot. The |
| 81 | +feature can be enabled with a new ``memtx_use_sort_data`` option |
| 82 | +in ``box.cfg`` or ``memtx.use_sort_data`` in the instance configuration. |
| 83 | + |
| 84 | +With the option set to ``true``, additional data is saved into a |
| 85 | +separate ``.sortdata`` file during snapshot creation and is used during recovery. |
| 86 | +The default value is ``false``, so the behavior must be explicitly enabled by the user if required. |
| 87 | + |
| 88 | +The option can be changed at runtime. For example, you can enable |
| 89 | +it during recovery to use the new secondary key sorting approach, but disable it |
| 90 | +before creating a new snapshot, so only the ``.snap`` file will be created |
| 91 | +and the O(n) secondary key sort will not be available for that snapshot. |
| 92 | + |
| 93 | +The performance impact of the option depends on the persistent |
| 94 | +storage read/write speed and the number of tuples and secondary |
| 95 | +keys in spaces (the more tuples and keys, the more beneficial the new approach is). |
| 96 | +Additionally, the approach only utilizes a single CPU core. |
| 97 | + |
| 98 | +As a downside, it creates additional footprint overhead during |
| 99 | +recovery (up to ~45 bytes per tuple) and overhead during |
| 100 | +snapshot creation (due to writing the sort data to persistent storage). |
| 101 | + |
| 102 | +.. _3-5-role-script-tag: |
| 103 | + |
| 104 | +[CE] ``fail_if`` tag for roles and scripts |
| 105 | +------------------------------------------ |
| 106 | + |
| 107 | +A ``fail_if`` tag has been added for roles and scripts. |
| 108 | +If the tag ``fail_if`` is set to an expression string, loading a role/script will raise an error |
| 109 | +if the ``fail_if`` expression evaluates to ``true``. |
| 110 | + |
| 111 | +.. _3-5-fast-reload: |
| 112 | + |
| 113 | +[CE] Faster large (500+) clusters reload |
| 114 | +---------------------------------------- |
| 115 | + |
| 116 | +The new patch processes an instance's configuration only when it is explicitly accessed, |
| 117 | +such as through a ``config:get(<...>, {instance = <...>})`` call. This significantly speeds up startup and |
| 118 | +configuration reloads, especially for large clusters. |
| 119 | + |
| 120 | +.. _3-5-quorum-synchronous-replication: |
| 121 | + |
| 122 | +[EE] Support of the quorum synchronous replication setup in three availability zones |
| 123 | +------------------------------------------------------------------------------------ |
| 124 | + |
| 125 | +A new patchset makes the ``replication.failover = supervised`` mode supports the quorum synchronous |
| 126 | +replication setup in three availability zones. |
| 127 | + |
| 128 | +The patchset includes several preliminary patches, which make the ``appoint_commit`` logic more safe |
| 129 | +in regards to various possible situations, and the main patch, which adds the ``box.ctl.promote()`` call to |
| 130 | +``appoint_commit`` if the ``failover.replicasets.<replicaset_name>.synchro_mode`` is set to ``true``. |
| 131 | + |
| 132 | +.. _3-5-skip-rw-switch: |
| 133 | + |
| 134 | +[EE] Supervised failover coordinator skips RW switch in presence of dead instances |
| 135 | +---------------------------------------------------------------------------------- |
| 136 | + |
| 137 | +When applying centralized configuration updates, Tarantool supervised failover coordinator no longer performs RW |
| 138 | +switch within the replicaset if there are dead instances. |
| 139 | + |
| 140 | +A new patch introduces a smarter configuration update process for the Tarantool supervised failover |
| 141 | +coordinator. Previously, any change would trigger a full restart of all services, causing unnecessary downtime. |
| 142 | +Now, the system intelligently differentiates between option types: most settings can be applied dynamically without |
| 143 | +any restart. A restart will only occur if you modify critical core parameters, specifically any options under |
| 144 | +``failover.*`` or ``failover.stateboard.*`` (with the exception of ``failover.replicasets``). This targeted |
| 145 | +approach minimizes disruptive restarts and significantly improves the coordinator's availability. |
| 146 | + |
| 147 | +.. _3-5-memcs-fixed-point-decimals: |
| 148 | + |
| 149 | +[EE] Fixed-point decimal types are supported in MemCS |
| 150 | +----------------------------------------------------- |
| 151 | + |
| 152 | +It is now possible to define a field with the ``decimal32/64/128/256`` type (fixed-point decimal): |
| 153 | + |
| 154 | +* ``Insert/Replace/Get/Select`` operations for fixed point decimal values are represented as standard decimals |
| 155 | + (``MP_DECIMAL``) in all engines (MemTX, Vinyl, MemCS, Quiver (if applicable)). |
| 156 | +* The internal representation of fixed point decimal values remains the same as the exisitng decimal |
| 157 | + type (decNumber) in all engines except MemCS and Quiver. |
| 158 | +* It is now possible to batch insert and scan fixed point decimal values in the Arrow format |
| 159 | + in MemCS and Quiver engines. |
| 160 | + |
| 161 | +.. _3-5-memcs-brin-indexes: |
| 162 | + |
| 163 | +[EE] BRIN indexes are supported in MemCS |
| 164 | +------------------------------------------- |
| 165 | + |
| 166 | +This release introduces a new family of ArrowStream filters named logical combinators, which allow |
| 167 | +combining other filters using logical ``AND`` and ``OR`` operations. Validation occurs recursively from the |
| 168 | +root. Note that complex filters are not optimized; each child filter is evaluated sequentially until |
| 169 | +the overall condition is satisfied. |
| 170 | + |
| 171 | +.. _3-5-memcs-performance: |
| 172 | + |
| 173 | +[EE] Performance is improved in MemCS |
| 174 | +------------------------------------- |
| 175 | + |
| 176 | +This release brings performance enhancements to the MemCS engine, focusing on interoperability and insertion |
| 177 | +speed. A fix for Arrow array ``null_count`` calculation resolves an issue for users of the Rust Arrow C API. |
| 178 | +Furthermore, batch insertion into RLE-formatted columns is now dramatically faster, showing performance |
| 179 | +improvements of 2.5x for 10% filled columns and 11x for 1% filled columns. |
| 180 | + |
| 181 | +.. _3-5-memcs-index-batch-insertion: |
| 182 | + |
| 183 | +Secondary index batch insertion performance is improved in MemCS |
| 184 | +---------------------------------------------------------------- |
| 185 | + |
| 186 | +This release introduces a new ``next_row`` method that significantly accelerates batch insertion and secondary |
| 187 | +index building. The method replaces the old tuple-based iterator, using a column mask to process only necessary |
| 188 | +data and returning raw row information to eliminate costly MsgPack conversions. Performance for secondary |
| 189 | +index insertion has improved by over 550%, with rates jumping from ~10k to 62k rows per second. |
| 190 | + |
| 191 | +.. _3-5-memcs-storage-string-scanning: |
| 192 | + |
| 193 | +Storage format and string scanning performance improvements in MemCS |
| 194 | +-------------------------------------------------------------------- |
| 195 | + |
| 196 | +This release combines a new optimized storage format for short strings with a powerful Arrow view layout to |
| 197 | +deliver huge performance improvements for string scanning. |
| 198 | + |
| 199 | +Storage format updates: |
| 200 | + |
| 201 | +* Strings shorter than 13 characters are now stored inline within a 16-byte vector, significantly improving |
| 202 | + access speed for common short-string data. |
| 203 | +* New ``force_view_types`` parameter for Arrow streams (disabled by default) allows switching to a |
| 204 | + "variable-size binary view layout," which unlocks major performance gains when used with a read-view. |
| 205 | +* The ``memcs_column_data_size()`` API function has been split into ``memcs_column_int_data_size()`` |
| 206 | + and ``memcs_column_ext_data_size()`` to account for the new dual storage format. |
| 207 | + |
| 208 | +Scan performance for 3 different sets of strings (the lengths are randomly distributed in the range 1-12, 1-100, 1-1000) |
| 209 | +and 2 different modes, ``notouch`` and ``touch``. In the ``notouch`` mode strings are only scanned as a batch, without |
| 210 | +accessing them; in the ``touch`` mode, strings are scanned and the first external character is checked: |
| 211 | + |
| 212 | +* Strings 1-12 chars: Up to 4.8x faster in the ``notouch`` mode, and 3.2x faster in the ``touch`` mode. |
| 213 | +* Strings 1-100 chars: Up to 3.1x faster in the ``notouch`` mode, and 1.8x faster in the ``touch`` mode. |
| 214 | +* Strings 1-1000 chars: Up to 10x faster in the ``notouch`` mode, and 2.9x faster in the ``touch`` mode. |
0 commit comments