Tarantool Versions Save

Get your data in RAM. Get compute close to data. Enjoy the performance.

2.11.1

9 months ago

Date: 2023-08-17 Tag: 2.11.1

Overview

2.11.1 is the 2nd stable version of the 2.11 release series. It introduces 10 improvements and resolves 70 bugs since 2.11.0.

The "stable" label means that we have all planned features implemented and we see no high-impact issues. However, if you encounter an issue, feel free to report it on GitHub.

Compatibility

Tarantool 2.x is backward compatible with Tarantool 1.10.x in the binary data layout, client-server protocol, and replication protocol.

Please upgrade using the box.schema.upgrade() procedure to unlock all the new features of the 2.x series.

Functionality added or changed

Core

  • The _schema.max_id field in the box.space._schema function is now deprecated. Now the _space:max() function is used instead of _schema.max_id (gh-5997).
  • Added the new function box.malloc.info() for reporting memory usage of Tarantool internal data structures allocated with malloc(). The function is available only on Linux (gh-7311).

Replication

  • Implemented correct recovery of mixed transactions. To do this, set box.cfg.force_recovery to true. If you need to revert to the old behavior, don't set the force_recovery option (gh-7932).

Lua

  • Embedded the tarantool/metrics module for metrics aggregation and export (gh-7725).
  • Metrics can now be configured using the box.cfg() function (gh-7725).
  • Added the :is_new() and :is_old() helpers to tarantool.compat options to simplify effective value checks (gh-8807).

Box

  • Allowed truncation of temporary and local spaces in the read-only mode (gh-5616).

Cfg

  • Implemented a way to set a table as box.cfg{} options value via environment variables (gh-8051).

Test

Fuzz

  • LuaJIT now can be fuzzed using a grammar-based fuzzer (gh-4823).

Build

  • Added tt weak dependency. The tt command line utility combines tarantoolctl and cartridge-cli functionality into one tool. This change is a part of pushing tt to the public (tarantool/tt#286).
  • Hardening against memory corruption attacks is now enabled by default on FreeBSD (gh-7536).
  • Added the CMake option FIBER_STACK_SIZE to set the default fiber stack size.

Bugs fixed

Core

  • Fixed a crash in the net.box client when a remote space had a field type that the client version did not support (gh-4632).
  • Fixed a bug when a space creation failed with a duplication error. The issue occurred if the explicit and implicit space IDs were mixed. Now the actual maximal space id is used to generate a new one (gh-8036).
  • Relaxed the tuple format requirements on tuples passed as the page starting position to index:tuple_pos() or to the after option of index:select. Now, Tarantool validates only the key parts of the index being used and all primary indexes (gh-8511).
  • Fixed a crash that could happen when preparing a crash report on macOS (gh-8445).
  • Fixed an integer overflow issue in net.box (ghs-121).
  • An IPROTO_EVENT packet now has the same sync number as the last corresponding IPROTO_WATCH request (gh-8393).
  • Fixed a bug because of which a dirty (not committed to WAL) DDL record could be written to a snapshot and cause a recovery failure (gh-8530).
  • Fixed a bug when a tuple could be inserted even if it violates a unique constraint of a functional index that has a nullable part (gh-8587).
  • Fixed a bug when Tarantool failed to decode a request containing an unknown IPROTO key. The bug resulted in broken connectivity between Tarantool 2.10 and 2.11 (gh-8745).
  • Fixed the node writing an empty 00000000000000000000.xlog file regardless of the actual vclock when interrupted during the initial box.cfg() call (gh-8704).
  • Fixed a bug causing the ER_CURSOR_NO_TRANSACTION failure for transactions on synchronous spaces when the on_commit/on_rollback triggers are set (gh-8505).
  • Fixed a bug causing the effective session and user are not propagated to box.on_commit and box.on_rollback trigger callbacks when the transaction is synchronous (gh-8742).
  • Fixed a bug when MVCC sometimes lost a gap record (gh-8326).
  • Fixed a bug when MVCC rollback of a prepared statement could break internal invariants (gh-8648).
  • Now MVCC engine automatically aborts a transaction if it reads changes of a prepared transaction and this transaction is aborted (gh-8654).
  • Disabled the backtrace collection feature on the AArch64 Linux platform (gh-8572).
  • Fixed a crash that could happen when Tarantool is started in the background mode (gh-6128).
  • Fixed the collection of fiber backtraces on the M1/M2 macOS platform (gh-8074).
  • Fixed a bug that caused writing incorrect values into the stream_id field of xlog headers (gh-8783).
  • Fixed a bug when a space that is referenced by a foreign key could not be truncated even if the referring space was empty (gh-8946).
  • Now foreign keys from non-temporary to temporary and from non-local to local spaces are prohibited since they can potentially break foreign key consistency (gh-8936).
  • Fixed a crash when a collation used by a space was deleted (gh-4544).
  • Fixed a crash that could happen when Tarantool is compiled by clang version 15 and above with enabled AddressSanitizer (tarantool/tarantool-qa#321).
  • Fixed a bug because of which it was impossible to set the hint option to true for TREE indexes (gh-8937).

Memtx

  • Fixed the ability for the memtx_memory parameter to specify a memory size less than required for the stable operation of the engine (gh-7389).
  • Fixed a heap-use-after-free bug in the transaction manager, which could occur when performing a DDL operation concurrently with a transaction on the same space (gh-8781).

Vinyl

  • Vinyl space and index directories are now created on demand. They are removed as soon as they become empty (gh-8441).
  • Fixed a heap-use-after-free bug in the Vinyl read iterator caused by a race between a disk read and a memory dump task. The bug could lead to a crash or an invalid query result (gh-8852).

Replication

  • Fixed an issue when the nodes synchronizing with a hung leader reported the leader as alive. This behavior led to the delay of the new elections (gh-7515).
  • Fixed a bug that occurred on applier failure: a node could start an election without having a quorum to do this (gh-8433).
  • Fixed a possible failure to promote the desired node by box.ctl.promote() on a cluster with nodes configured with election_mode = "candidate" (gh-8497).
  • Fixed nodes configured with election_mode = 'candidate' spuriously detecting a split-vote when another candidate should win with exactly a quorum of votes for it (gh-8698).
  • Fixed a crash when using transactions with the linearizable isolation level during a replica reconnect (gh-7991).
  • Fixed a possible crash on bootstrap with box.cfg.bootstrap_strategy = 'auto' when some of the bootstrapping nodes were stopped (gh-8757).

LuaJIT

Backported patches from the vanilla LuaJIT trunk (gh-8069). The following issues were fixed as part of this activity:

  • Fixed successful math.min/math.max call with no args (gh-6163).

  • Fixed inconsistencies in math.min/math.max calls with a NaN arg (gh-6163).

  • Fixed pcall() call without arguments on arm64.

  • Fixed assembling of IR_{AHUV}LOAD specialized to boolean for aarch64.

  • Fixed constant rematerialization on arm64.

  • Fixed emit_rma() for the x64/GC64 mode for non-mov instructions.

  • Limited Lua C library path with the default PATH_MAX value of 4096 bytes. Backported patches from the vanilla LuaJIT trunk (gh-8516). The following issues were fixed as part of this activity:

  • Fixed IR_LREF assembling for the GC64 mode on x86_64.

  • Fixed canonicalization of +-0.0 keys for IR_NEWREF.

  • Fixed result truncation for bit.rol on x86_64 platforms.

  • Fixed saved bytecode encapsulated in ELF objects.

  • Fixed lua_yield() invocation inside C hooks.

  • Fixed memory chunk allocation beyond the memory limit.

  • Fixed TNEW load forwarding with instable types.

  • Fixed use-def analysis for BC_VARG, BC_FUNCV. Backported patches from the vanilla LuaJIT trunk (gh-8825). The following issues were fixed as part of this activity:

  • Fixed BC_UCLO insertion for returns.

  • Fixed recording of BC_VARG with unused vararg values.

  • Initialization instructions on trace are now emitted only for the first member of a union.

Lua

  • The box.stat.memtx function is now callable, it returns all memtx statistics. The box.stat.memtx.tx() function is now equivalent to the box.stat.memtx().tx function (gh-8448).
  • Exported the missing AUTH_TYPE key to box.iproto.key (gh-8574).
  • Stripped the unwanted IPROTO_ prefix from the POSITION, AFTER_POSITION, and AFTER_TUPLE keys exported to box.iproto.key (gh-8577).
  • Fixed the xlog reader Lua module to show unknown row header fields. Before this change the xlog reader silently skipped them.

Http client

  • Fixed the Transfer-Encoding: chunked setting being enabled even if the Content-Length header exists for stream requests (gh-8744).

Netbox

  • Fixed a heap-use-after-free bug in the function creating a tuple format Lua object for net.box (gh-8889).

SQL

  • The ANY field type now supports collation in SQL (gh-8070).
  • Now the ARRAY, MAP, and INTERVAL values cannot be used as arguments in the ORDER BY clause (gh-6668).
  • Fixed incorrect conversion of an integer greater than INT64_MAX or less than 0 to a decimal number during SQL arithmetic operations (gh-8460).
  • Fixed an assertion when selecting tuples with incomplete internal format (gh-8418).
  • Fixed integer overflow issues in built-in functions (ghs-119).
  • Fixed a possible assertion or segmentation fault when optimizing INSERT INTO ... SELECT FROM (gh-8661).
  • Fixed an integer overflow issue and added a check for the printf() failure due to too large size (ghs-122).

Box

  • Fixed a bug when large numbers were encoded incorrectly by msgpackffi. It could lead to wrong select results with large number keys (gh-6119).
  • Fixed a crash on an unknown option of the function (gh-8463).
  • The takes_raw_args option is now handled correctly during downgrading (gh-8457).
  • Fixed several memory leaks on tuple encoding failures (gh-7939).
  • Fixed a bug (bad error message) in pagination related to the validation of the after position option of the :select and :pairs methods of space and index objects (gh-8716).
  • Fixed the memory leaks caused by the multi-statement transaction errors in the space index building and the space format checking operations (gh-8773).
  • Fixed the privilege check when using spaces with functional indexes and constraints (gh-7873).
  • Fixed a bug in the box console implementation because of which the language parameter was shared between connected clients (gh-8817).
  • Fixed the inability to insert an integral number into a double-formatted field (gh-7483).
  • Fixed the invalid memory access in a corner case of a specialized comparison function (gh-8899).
  • Fixed a crash when box.iproto.override was called with unconfigured box. Now, an error is raised instead (gh-8975).

Console

  • Fixed console.local_print() failing on non-string arguments, which led to some rare errors. For example, when connecting via tarantoolctl to cartridged tarantool with incorrect credentials, a cdata error was passed through the local_print(), which failed to interpret it (gh-8374).

Datetime

  • Fixed an error in datetime.set when timestamp is passed along with nsec, usec, or msec (gh-8583).
  • Fixed errors when the string representation of a datetime object had a negative nanosecond part (gh-8570).
  • Fixed a bug with buffer overflow in tnt_strptime (gh-8502).
  • Fixed a bug raising a false positive error when creating new intervals with range boundary values (gh-8878).

Msgpack

  • Fixed decoding datetime intervals with fields larger than possible int32 values (gh-8887).

Build

  • Enabled compiler optimizations for static build dependencies, which were erroneously disabled in version 2.10.3 (gh-8606).

3.0.0-alpha1

10 months ago

Date: 2023-07-05 Tag: 3.0.0-alpha1

Overview

3.0.0-alpha1 is the alpha version of the 3.0 release series.

This release introduces 42 new features and resolves 70 bugs since the 2.11 version. There can be bugs in less common areas. If you find any, feel free to report an issue on GitHub.

Notable changes are:

  • New configuration capabilities (gh-8724)

Compatibility

Tarantool 3.x is backward compatible with Tarantool 2.x in the binary data layout, client-server protocol, and replication protocol.

Please upgrade using the box.schema.upgrade() procedure to unlock all the new features of the 3.x series.

Functionality added or changed

Core

  • [Breaking change] Disabled DDL operations with an old system schema. Now you have to run box.schema.upgrade() before you can execute any DDL operations (gh-7149).
  • The _schema.max_id field in the box.space._schema function is now deprecated. Now the _space:max() function is used instead of _schema.max_id (gh-5997).
  • Added the new function box.malloc.info() for reporting memory usage of Tarantool internal data structures allocated with malloc(). The function is available only on Linux (gh-7311).
  • Now index_object.parts contains the following methods, similar to the key_def Lua module: extract_key(), compare(), compare_with_key(), merge() (gh-7356).
  • Introduced the box.watch_once() function to get the value currently associated with a notification key on the local instance without subscribing to future changes (gh-6493).
  • Introduced the new IPROTO_WATCH_ONCE request to get the value currently associated with a notification key on a remote instance without subscribing to future changes (gh-6493).
  • Introduced the conn:watch_once() net.box connection method to get the value currently associated with a notification key on a remote instance without subscribing to future changes. The new method is implemented using the IPROTO_WATCH_ONCE request type (gh-6493).
  • Introduced the default field values in the space format (gh-8157).

Memtx

  • Added memtx read view statistics to box.stat.memtx() (gh-8501).

Replication

  • Added a new bootstrap_leader configuration option to specify the node from which a replica should bootstrap. To do this, set box.cfg.bootstrap_strategy to 'config' and set bootstrap_leader value to either the URI or UUID of the desired bootstrap leader. For example:

      box.cfg{
          bootstrap_strategy = 'config',
          bootstrap_leader = 'localhost:3301',
          replication = {
              'localhost:3301',
              'localhost:3302',
          },
          listen = '3302',
      }
    

    (gh-7999).

  • You may now control which node new replicas choose as a bootstrap leader without touching node config. To do so, set box.cfg.bootstrap_strategy to 'supervised', and the nodes will only bootstrap off the node on which you called box.ctl.make_bootstrap_leader() last. This works on an empty replica set bootstrap as well: start the admin console before configuring the nodes. Then configure the nodes:

    box.cfg{
        bootstrap_strategy = 'supervised',
        replication = ...,
        listen = ...,
    }
    

    Finally, call box.ctl.make_bootstrap_leader() through the admin console on the node you want to promote. All the nodes will bootstrap off that node (gh-8509).

  • A new option box.cfg.cluster_name allows assigning a human-readable name to the entire cluster. It has to match in all instances and is displayed in box.info.cluster.name (gh-5029).

  • A new option box.cfg.replicaset_name allows assigning a human-readable name to the replicaset. It works the same as box.cfg.replicaset_uuid. Its value must be the same across all instances of one replicaset. The replicaset name is displayed in box.info.replicaset.name (gh-5029).

  • A new option box.cfg.instance_name allows assigning a human-readable name to the instance. It works the same as box.cfg.instance_uuid. Its value must be unique in the replicaset. The instance name is displayed in box.info.name. Names of other replicas in the same replicaset are visible in box.info.replication[id].name (gh-5029).

  • Instance at rebootstrap can change its UUID while keeping its numeric ID if it has the same non-empty instance name (gh-5029).

  • Added the ability to set the bootstrap_leader configuration option to the instance name of the desired bootstrap leader:

      box.cfg{
          bootstrap_strategy = 'config',
          bootstrap_leader = 'leader-name',
          replication = {
              ...
          },
          ...
      }
    

    (gh-7999, gh-8539).

  • Implemented correct recovery of mixed transactions. To do this, set box.cfg.force_recovery to true. If you need to revert to the old behavior, don't set the force_recovery option (gh-7932).

LuaJIT

  • LuaJIT now can handle exceptions on traces (gh-7745).

Lua

  • Embedded the tarantool/metrics module for metrics aggregation and export (gh-7725).
  • Metrics can now be configured using the box.cfg() function (gh-7725).
  • [Breaking change] Added the new varbinary type to Lua. An object of this type is similar to a plain string but encoded in MsgPack as MP_BIN so it can be used for storing binary blobs in the database. This also works the other way round: data fields stored as MP_BIN are now decoded in Lua as varbinary objects, not as plain strings, as they used to be. Since the latter may cause compatibility issues, the new compat option binary_data_decoding was introduced to revert the built-in decoder to the old behavior (gh-1629).

SQL

  • Introduced the SHOW CREATE TABLE statement (gh-8098).

Box

  • Non-system spaces in a snapshot file are now sorted by their IDs. As before, all non-system spaces are stored after system spaces (gh-7954).
  • [Breaking change] Dropped support for IPROTO_CALL16 from net.box (i.e., the call_16 option and the call_16 method for net.box connections) (gh-8636).
  • Added support for square brackets in procedure resolution for Lua calls (gh-8604).
  • Added support for accepting IPROTO requests with a space or index name instead of an identifier (gh-8146).
  • Added a new box.info parameter hostname (gh-8605).
  • Added the box.cfg.memtx_sort_threads parameter that specifies the number of threads used to sort indexes keys on loading a memtx database. OpenMP is not used to sort keys anymore (gh-3389).
  • Changed the output of the fselect index method from a table of strings to a multi-line string and dropped the print and use_nbsp options. With the yaml_pretty_multiline compat option enabled by default, multi-line strings now look good in the console, so there's no need to return a table of strings to prettify the fselect output anymore.
  • Allowed multiple updates to the same tuple field in a single call (gh-8226).
  • Introduced box.tuple.format that enables format definition for tuples created via box.tuple.new (standalone tuples) (gh-4693).
  • [Breaking change] Disabled argument list syntax of box.tuple.new (this was needed for gh-4693). It is possible to switch to the old behavior using the compatibility option box_tuple_new_vararg.

Cfg

  • Implemented a way to set a table as box.cfg{} options value via environment variables (gh-8051).

Cli

  • [Behavior change] Disabled starting the Lua REPL by default when running Tarantool. Now, Tarantool yields the message that shows the command usage. To run the Lua REPL, just set the -i flag. To pass a Lua script contents via stdin, use dash (-) as the script name. For more information see a help message by running tarantool -h (gh-8613).
  • Introduced new command-line options --name and --config (gh-8613).

Compat

  • The following compatibility options' defaults were switched to new behavior:

    • yaml_pretty_multiline
    • sql_seq_scan_default
    • json_escape_forward_slash
    • fiber_channel_close_mode
    • fiber_slice_default
    • box_cfg_replication_sync_timeout

    More information on the new behavior can be found on the Module compat page.

Console

  • Now multiline commands can be used by setting continuation marker using the \set continuation command.

Test

Fuzz

  • Now LuaJIT can be fuzzed using grammar-based fuzzer (gh-4823).
  • Added a grammar-based SQL fuzzer (gh-4826).

Build

  • The zstd version was updated to pre-1.5.5 (gh-8391).
  • Added tt weak dependency. The tt command line utility combines tarantoolctl and cartridge-cli functionality into one tool. The change is a part of pushing tt to the public (tarantool/tt#286).
  • Tarantool does not depend on libgomp anymore (gh-7689).
  • Hardening against memory corruption attacks is now enabled by default on FreeBSD (gh-7536).
  • Hardening against memory corruption attacks is now enabled by default on AArch64 systems (gh-7536).
  • Added building static deb and rpm packages.
  • Dropped building distro-specific deb and rpm Tarantool packages.
  • Dropped building Tarantool packages with GC32. Now only GC64 packages are shipped.

Bugs fixed

Core

  • Fixed various bugs related to unsafe (i.e., from an unknown source) decoding and validating of MsgPack extensions (ghs-73).
  • Fixed a crash in the net.box client when a remote space had a field type that the client version did not support (gh-4632).
  • Fixed a bug when a space creation failed with a duplication error. The issue occurred if the explicit and implicit space IDs were mixed. Now the actual maximal space id is used to generate a new one (gh-8036).
  • Relaxed the tuple format requirements on tuples passed as the page starting position to index:tuple_pos() or to the after option of index:select. Now, Tarantool validates only the key parts of the index being used and all primary indexes (gh-8511).
  • Fixed a crash that could happen when preparing a crash report on macOS (gh-8445).
  • Fixed an integer overflow issue in net.box (ghs-121).
  • An IPROTO_EVENT packet now has the same sync number as the last corresponding IPROTO_WATCH request (gh-8393).
  • Fixed a bug because of which a dirty (not committed to WAL) DDL record could be written to a snapshot and cause a recovery failure (gh-8530).
  • [Breaking change] The key box.space._schema['cluster'] is renamed to 'replicaset_uuid'. That is not expected to be breaking because _schema is an internal system space, but the key was visible in public and documented (gh-5029).
  • [Breaking change] The table box.info.cluster is renamed to box.info.replicaset. The behaviour can be reverted using the compat option box_info_cluster_meaning (https://tarantool.io/compat/box_info_cluster_meaning) (gh-5029).
  • Fixed a bug when a tuple could be inserted even if it violates a unique constraint of a functional index that has a nullable part (gh-8587).
  • Fixed a bug when Tarantool failed to decode a request containing an unknown IPROTO key. The bug resulted in broken connectivity between Tarantool 2.10 and 2.11 (gh-8745).
  • Fixed the node writing an empty 00000000000000000000.xlog file regardless of the actual vclock when interrupted during the initial box.cfg() call (gh-8704).
  • Fixed a bug causing the ER_CURSOR_NO_TRANSACTION failure for transactions on synchronous spaces when the on_commit/on_rollback triggers are set (gh-8505).
  • Fixed a bug causing the effective session and user are not propagated to box.on_commit and box.on_rollback trigger callbacks when transaction is synchronous (gh-8742).
  • Eliminated implicit conversion of unprintable utf-8 strings to binary blobs when encoded in YAML. Now unprintable characters are encoded as escaped utf-8 code points, for example, \x80 or \u200B (gh-8756).
  • Fixed a bug when MVCC sometimes lost gap record (gh-8326).
  • Fixed a bug when MVCC rollback of prepared statement could break internal invariants (gh-8648).
  • Now MVCC engine automatically aborts a transaction if it reads changes of a prepared transaction and this transaction is aborted (gh-8654).
  • Disabled the backtrace collection feature on the AArch64 Linux platform (gh-8572).
  • Fixed a crash that could happen when Tarantool is started in the background mode (gh-6128).
  • Fixed the collection of fiber backtraces on the M1/M2 macOS platform (gh-8074).
  • Fixed a bug that caused writing incorrect values into the stream_id field of xlog headers (gh-8783).
  • Fixed decoding of escape sequences for single-byte character codes from YAML. Before the fix, single-byte character codes between 0x80 and 0xff would be erroneously converted to two-byte UTF-8 code points, for example, \x80 would be decoded as \uC280 (gh-8782).

Memtx

  • Fixed the ability for the memtx_memory parameter to specify a memory size less than required for the stable operation of the engine (gh-7389).
  • Fixed a heap-use-after-free bug in the transaction manager, which could occur when performing a DDL operation concurrently with a transaction on the same space (gh-8781).

Vinyl

  • Vinyl space and index directories are now created on demand. They are removed as soon as they become empty (gh-8441).

Replication

  • Fixed a bug related to box.info.replication[...].upstream being stuck in the "connecting" state for several minutes after a replica DNS record change (gh-7294).
  • Fixed an issue when the nodes synchronizing with a hung leader reported the leader as alive. This behavior led to the delay of the new elections (gh-7515).
  • Fixed a bug that occurred on applier failure: a node could start an election without having a quorum to do this (gh-8433).
  • Fixed a bug that allowed to change replicaset UUID via _schema space.
  • Fixed a bug when new instances could try to register via an anon instance which previously failed to apply box.cfg{replication_anon = false}.
  • Fixed a possible failure to promote the desired node by box.ctl.promote() on a cluster with nodes configured with election_mode = "candidate" (gh-8497).
  • Fixed nodes configured with election_mode = 'candidate' spuriously detecting a split-vote when another candidate should win with exactly a quorum of votes for it (gh-8698).
  • Fixed a crash when using transactions with the linearizable isolation level during a replica reconnect (gh-7991).
  • Fixed a possible crash on bootstrap with box.cfg.bootstrap_strategy = 'auto' when some of the bootstrapping nodes were stopped (gh-8757).

LuaJIT

Backported patches from the vanilla LuaJIT trunk (gh-8069). The following issues were fixed as part of this activity:

  • Fixed successful math.min/math.max call with no args (gh-6163).

  • Fixed inconsistencies in math.min/math.max calls with a NaN arg (gh-6163).

  • Fixed pcall() call without arguments on arm64.

  • Fixed assembling of IR_{AHUV}LOAD specialized to boolean for aarch64.

  • Fixed constant rematerialization on arm64.

  • Fixed emit_rma() for the x64/GC64 mode for non-mov instructions.

  • Limited Lua C library path with the default PATH_MAX value of 4096 bytes.

  • The JIT engine was disabled by default on macOS platforms to improve the user experience. If necessary, you can enable it with jit.on (gh-8252). Backported patches from the vanilla LuaJIT trunk (gh-8516). The following issues were fixed as part of this activity:

  • Fixed IR_LREF assembling for the GC64 mode on x86_64.

  • Fixed canonicalization of +-0.0 keys for IR_NEWREF.

  • Fixed result truncation for bit.rol on x86_64 platforms.

  • Fixed saved bytecode encapsulated in ELF objects.

  • Fixed lua_yield() invocation inside C hooks.

  • Fixed memory chunk allocation beyond the memory limit.

  • Fixed TNEW load forwarding with instable types.

  • Fixed use-def analysis for BC_VARG, BC_FUNCV.

Lua

  • The box.stat.memtx function is now callable, it returns all memtx statistics. The box.stat.memtx.tx() function is now equivalent to the box.stat.memtx().tx function (gh-8448).
  • Exported the missing AUTH_TYPE key to box.iproto.key (gh-8574).
  • Stripped the unwanted IPROTO_ prefix from the POSITION, AFTER_POSITION, and AFTER_TUPLE keys exported to box.iproto.key (gh-8577).
  • Fixed the xlog reader Lua module to show unknown row header fields. Before this change the xlog reader silently skipped them.

Fio

  • The default permission mode for fio.open() was changed for newly created files to 0666 (before umask) (gh-7981).

Http client

  • Fixed a bug where a response body cannot be decoded (gh-8363).
  • Fixed the Transfer-Encoding: chunked setting being enabled even if the Content-Length header exists for stream requests (gh-8744).

SQL

  • The ANY field type now supports collation in SQL (gh-8070).
  • Now the ARRAY, MAP, and INTERVAL values cannot be used as arguments in the ORDER BY clause (gh-6668).
  • Fixed incorrect conversion of an integer greater than INT64_MAX or less than 0 to a decimal number during SQL arithmetic operations (gh-8460).
  • Fixed an assertion when selecting tuples with incomplete internal format (gh-8418).
  • Fixed integer overflow issues in built-in functions (ghs-119).
  • Fixed a Use-After-Free vulnerability in the WITH RECURSIVE clause (ghs-119).
  • Fixed a possible assertion or segmentation fault when optimizing INSERT INTO ... SELECT FROM (gh-8661).
  • Fixed an integer overflow issue and added check for the printf() failure due to too large size (ghs-122).

Box

  • Fixed a bug where box.cfg.force_recovery doesn't work when there are no user spaces in a snapshot (gh-7974).
  • Fixed a bug when large numbers were encoded incorrectly by msgpackffi. It could lead to wrong select results with large number keys (gh-6119).
  • Fixed a crash on an unknown option of the function (gh-8463).
  • The takes_raw_args option is now handled correctly during downgrading (gh-8457).
  • Fixed several memory leaks on tuple encoding failures (gh-7939).
  • Fixed the ability to drop _vinyl_deferred_delete system space (gh-5279).
  • Fixed a bug (bad error message) in pagination related to the validation of the after position option of the :select and :pairs methods of space and index objects (gh-8716).
  • Fixed a bug when it was not possible to access spaces named _stream and _stream_space_cache and indexes named _space using the net.box stream objects (gh-8598).
  • Fixed the memory leaks caused by the multi-statement transaction errors in the space index building and the space format checking operations (gh-8773).
  • [Breaking change] The cord_slab_cache symbol was removed from the public API export (gh-7124).
  • Fixed the privilege check when using spaces with functional indexes and constraints (gh-7873).

Console

  • Fixed console.local_print() failing on non-string arguments, which led to some rare errors. For example, when connecting via tarantoolctl to cartridged tarantool with incorrect credentials, a cdata error was passed through the local_print(), which failed to interpret it (gh-8374).

Datetime

  • Fixed a bug with buffer overflow in tnt_strptime (gh-8502).
  • Fixed an error in datetime.set when timestamp is passed along with nsec, usec, or msec (gh-8583).
  • Fixed errors when the string representation of a datetime object had a negative nanosecond part (gh-8570).

Build

  • Enabled compiler optimizations for static build dependencies, which were erroneously disabled in version 2.10.3 (gh-8606).

2.11.0

1 year ago

Date: 2023-05-24

Tag: 2.11.0

Overview

2.11.0 is the first stable release in the long-term support (LTS) version 2.11 release series.

The label "stable" means there are 2.11.x-based applications running in production for quite a while without known crashes, incorrect results or other showstopper bugs.

This release introduces 58 new features and resolves 33 bugs since the 2.10.5 version. There can be bugs in less common areas. If you find any, feel free to report an issue on GitHub.

Notable changes are:

  • Features for application developers
    • Limitation of fiber execution time slice
    • Linearizable isolation level
    • Result set pagination
    • Per-module logging
    • Streaming in HTTP client
    • Encoding HTTP query parameters
    • Native foreign keys in the SQL engine
    • Interactive debugger for Lua code
  • Enhancements for administration
    • Replica join retry
    • New bootstrap strategy
    • Strict fencing in RAFT

Compatibility

Tarantool 2.11 is backward compatible with Tarantool 2.10 in the binary data layout, client-server protocol, and replication protocol.

Please upgrade using the box.schema.upgrade() procedure to unlock all the new features of the 2.x series.

Functionality added or changed

Core

  • The cpu_misses entry in fiber.top() output is deprecated (gh-5869).

  • Implemented fiber.top() for ARM64 (gh-4573).

  • Introduced the mechanism for catching fibers running without yielding for too long. Now box operations, such as select and replace, will throw an error if the fiber execution time since yield exceeds the limit. The limit can also be checked from the application code with fiber.check_slice(). The default limit is controlled by the new compat option fiber_slice_default. The old default is no limit. The new default is one second. You can overwrite it with fiber.set_slice() (gh-6085).

  • Now if a join fails with a non-critical error, such as ER_READONLY, ER_ACCESS_DENIED, or a network-related error, the instance tries to find a new master to join to and tries again (gh-6126).

  • Renamed replication states when a replica is joining. Now when querying box.info.replication[id].upstream.status during join, you will see either wait_snapshot or fetch_snapshot instead of initial_join (gh-6126).

  • fiber_set_cancellable() C API function is deprecated and now does nothing (gh-7166).

  • Introduced a new transaction isolation level linearizable. Transactions started with box.begin{txn_isolation = "linearizable"} always see the latest data confirmed by the quorum (gh-6707).

  • The box error C API (box_error_set(), box_error_last(), and so on) can now be used in threads started by user modules with the pthread library (gh-7814).

  • box.info() can now be called before box.cfg() (gh-7255).

  • Introduced pagination support for memtx and vinyl tree indexes. It is now possible to resume pairs and select from the position where the last call stopped (gh-7639).

  • Now the log message contains the name of a Lua module from which the logging function was called (gh-3211).

  • Now the log level can be set for specific modules using log.cfg{modules = {...}} or box.cfg{log_modules = {...}} (gh-3211).

  • Reduced recovery time from a snapshot by up to 2x on the systems with a hard disk drive (gh-8108).

  • Disabled automatic invocation of box.schema.upgrade on box.cfg for read-write instances that don't set up replication. Now, box.schema.upgrade may only be called manually by the admin (gh-8207).

  • Added the new function box.read_view.list() that returns a list of all active database read views. The list includes both system read views (created to make a checkpoint or join a replica) and read views created by application code (available only in Enterprise Edition) (gh-8260).

  • The zstd version was updated to pre-1.5.5 (gh-8391).

  • Now the fiber_channel:close() closes the channel gracefully: closing it for writing leaving the possibility to read existing events from it. Previously, channel:close() was closing the channel completely and discarding all unread events.

    A new compat option fiber_channel_close_mode is added for switching to the new behavior (gh-7746).

Vinyl

  • [Breaking change] Added support of transaction isolation levels for the Vinyl engine. The txn_isolation option passed to box.begin() now has the same effect for Vinyl and memtx. Note, this effectively changes the default isolation level of Vinyl transactions from 'read-committed' to 'best-effort', which may cause more conflicts (gh-5522).

Replication

  • Introduced the new configuration option bootstrap_strategy. The default value of this option - "auto" - brings the new behavior of replica on:

    • replica set bootstrap
    • replica join to an existing replica set
    • recovery
    • replication reconfiguration.

    To return to the old behavior, set the option to "legacy".

    The new value "auto" will be in effect only when no value for replication_connect_quorum is passed. If a value is present, bootstrap_strategy is automatically set to "legacy" to preserve backward compatibility.

    Note that if you leave the options untouched (that is, bootstrap_strategy defaults to "auto"), the following behavior will noticeably change: during the recovery from local files and during replication reconfiguration box.cfg{replication = ...} will not fail even if some (or all) of the remote peers listed in box.cfg.replication are unavailable. Instead, the node will try to connect to them for a period of replication_connect_timeout and then transition to box.info.status == "running" as soon as it syncs with all the reached peers (gh-5272).

  • [Breaking change] Joining a new replica to a working replica set. If neither of the configuration options bootstrap_strategy and replication_connect_quorum is passed explicitly, or if bootstrap_strategy is set to "auto", bootstrapping a new replica in an existing replica set will only succeed if all the replica set members are listed in the replica's box.cfg.replication. For example, when joining a fresh replica to a replica set of 3 nodes, all 3 node URIs must be present in the replica's box.cfg.replication parameter. When joining 2 new replicas to a single master, both replicas must have each other's URIs (alongside with master's URI) in their box.cfg.replication (gh-5272).

  • A new compat option box_cfg_replication_sync_timeout was added to control the default value of replication_sync_timeout option of box.cfg. The old default is 300 seconds, and new default is 0. The noticeable difference in the new behavior is that box.cfg{replication = ""} call now returns before the node is synced with remote instances. If you need the node to be writable once box.cfg returns, you can achieve it with new behavior by calling box.ctl.wait_rw() after box.cfg{replication=...}.

    By default, the option value is "old" and will be switched to "new" in the next major release. To switch to the new behavior, set the option to "new" before the initial box.cfg{} call in your application (gh-5272).

Raft

  • Introduced strict fencing, which tries its best to allow at most one leader in cluster in any moment in time. This is achieved by setting connection death timeout on the current leader to half the time compared to followers (assuming the replication_timeout is the same on every replica) (gh-7110).

LuaJIT

Backported patches from vanilla LuaJIT trunk (gh-7230). In the scope of this activity, the following features is completed:

  • assert() now accepts any type of error object (from Lua 5.3).
  • Enabled LuaJIT CMake option LUAJIT_ENABLE_CHECKHOOK for checking instruction and line hooks for compiled code (gh-7762).

Lua

  • Introduced the Tarantool compatibility module compat. It is used for transparent management of behavior changes. compat stores options that reflect behavior changes. Possible option values are old, new, and default. By default, compat contains options for certain Tarantool changes that may break compatibility with previous versions. Users can also add their own compatibility options in runtime (gh-7000).

  • It is now possible to run scripts or load modules before the main script by specifying them in the TT_PRELOAD environment variable. For example:

    $ TT_PRELOAD=/path/to/foo.lua tarantool main.lua
    

    (gh-7714).

  • Embedded the tarantool/checks module for function input validation (gh-7726).

  • Introduced the -b and -j flags that can be passed to LuaJIT runtime for debugging and runtime configuration purposes (gh-5541).

  • Added the ability to override a built-in module by an external one (gh-7774).

  • Default module search paths now include the main script directory (gh-8182).

Console

  • Prevent mixing of background print and log output with the current user's input in the interactive console (gh-7169).

Http client

  • Now the HTTP client is able to encode Lua objects automatically when it is possible. The encoding format depends on the request content type. The following content types are supported by default: application/json, application/yaml, application/msgpack. Users can define encoding rules for other content types by writing their own encoding functions (gh-6833).
  • Added a new method response:decode(). It decodes an HTTP response body to a Lua object. The decoding result depends on the response content type. The following content types are supported by default: application/json, application/yaml, application/msgpack. Users can define decoding rules for other content types by writing their own decoding functions (gh-6833).
  • Added a new option params to add query parameters to URI using a Lua table. These parameters are encoded to a query string and passed to the HTTP request (gh-6832).
  • Query parameters passed into a URI using the params option are now percent-encoded automatically. Parameters are encoded with uri.QUERY_PART when GET, DELETE, or HEAD HTTP methods are used, and with uri.FORM_URLENCODED in other cases (gh-7931).
  • Introduced stream input/output interface for http.client (gh-7845).

Msgpack

  • Added the __index metamethod and the get method to msgpack.object. They both perform indexation of MsgPack data stored in the object similar to tuple from box.tuple: __index resolves collisions in favor of msgpack.object methods, whereas get ignores methods (gh-7898).

Uri

  • Added a new method uri.values() for representing multivalue parameters (gh-6832).
> params = {q1 = uri.values("v1", "v2")}}
> uri.parse({"/tmp/unix.sock", params = params)
---
- host: unix/
  service: /tmp/unix.sock
  unix: /tmp/unix.sock
  params:
    q1:
    - v1
    - v2
...

  • Added functions uri.escape() and uri.unescape() for percent-encoding and decoding URI parts (gh-3682).

SQL

  • Introduced a new function type SQL_EXPR (gh-6986).
  • SQL foreign key constraints and check constraints were replaced by tuple constraints (gh-6986).
  • Introduced the new keyword SEQSCAN for SQL SELECT queries. You may now use a scanning SQL SELECT query without the SEQSCAN keyword only if the sql_seq_scan session setting is set to true. A new compat option sql_seq_scan_default is added for managing the default value of sql_seq_scan (gh-7747).

Box

  • Exported box_schema_version to public API and Lua via box.info.schema_version (gh-7904).
  • Exported IPROTO constants and features to Lua (gh-7894).
  • It is now possible to register triggers for various recovery stages: use box.ctl.on_recovery_state() before the initial box.cfg() call. The trigger has one parameter – a string that shows the reached recovery stage: snapshot_recovered, wal_recovered, indexes_built, or synced (gh-3159).
  • Exported current session identifier to C API via box_session_id (gh-7895).
  • Environment variables (TT_LOG, TT_LOG_LEVEL, and other) are taken into account if logging is configured using log.cfg before box.cfg is called (gh-6011).
  • Added the IPROTO_AUTH_TYPE key to the IPROTO_ID response. The key contains the name of the authentication method that is currently used on the server for generating user authentication data (gh-7989).
  • Added an API for sending arbitrary IPROTO packets from server to client: box.iproto.send in Lua and box_iproto_send in C (gh-7897).
  • It is now possible to set IPROTO request handler callbacks from Lua (using box.iproto.override) and from C (using box_iproto_override) (gh-7901).
  • Introduced transaction options in box.atomic() by analogy with box.begin() (gh-7202).
  • Added the support for downgrading system spaces to make them compatible with older Tarantool versions (gh-7718).
  • The feedback daemon now collects metrics if the required version of the metrics module is installed (gh-8192). feedback_version is updated to 8.
  • Add fiber_set_ctx and fiber_get_ctx C API functions to pass data to fibers without yielding immediately (gh-7669).

Console

  • Introduced a way to configure the printed End Of Stream (EOS) symbol in the Lua console. Changed the default printed EOS from ';' to '' (gh-7031).

Debugger

  • Introduced a new console debugger luadebug.lua for debugging external and builtin Lua modules.

Note: the debugger REPL is not yet compatible with Tarantool console. This means that this code will hang in the console:

tarantool> dbg = require 'luadebug'
---
...

tarantool> dbg()
---

Users should call debugger activation only in their instrumented code, not from the interactive console.

  • Introduced a new Lua API tarantool.debug.getsources() which allows seeing sources of builtin modules in any external debugger.

  • Swapped 'up' and 'down' commands in the debugger to make them behave similar to those in gdb and lldb.

  • Added the support for breakpoints to the builtin console debugger luadebug.lua.

  • Made is easier to debug files with the same name (such as init.lua) by handling partial path lookup in breakpoints:

    break B/init.lua:10
    break A/init.lua:20
    break ./main.lua:30
    break ../a/b/c/leaf.lua:40
    
  • Introduced the -d command-line option which runs the debugger console instead of the standard interactive console (gh-7456).

    $ tarantool -d debug-target.lua
    Tarantool debugger 2.11.0-entrypoint-852-g9e6ed28ae
    type 'help' for interactive help
    luadebug: Loaded for 2.11.0-entrypoint-852-g9e6ed28ae
    break via debug-target.lua => debug-target.lua:1 in chunk at debug-target.lua:0
       1 => local date = require 'datetime'
       4
    luadebug>
    

    This is a more convenient way to initiate a debugger session instead of an older, more invasive approach of instrumenting the code with a require 'luadebug'() call.

Doxygen

  • Doxygen module API documentation is now published automatically on every merge to the master branch.

Yaml

  • Now yaml.encode can encode multiline strings in literal-scalar style for better readability. A new compat option yaml_pretty_multiline is added for switching to the new behavior (gh-3012).

Bugs fixed

Core

  • Added the fiber_join_timeout symbol to exports (gh-7125).
  • Allowed spurious wakeup of a fiber that is waiting for WAL write completion (gh-6506).
  • Now box_latch_lock guarantees the order in which it is acquired by fibers requesting it (gh-7166).
  • A proper error in now raised on incorrect syslog log configuration through log.cfg (gh-7447).
  • Fixed a bug with Tarantool C API freeing fiber region allocations it does not allocate. This could lead to use-after-free in client code which allocates memory on fiber region. (gh-5665).
  • Errors thrown on specifying invalid index parts or format fields are now more verbose. They include the bad index part or field number (gh-7933).
  • Fixed a potential crash when SIGTERM was received before box.cfg execution is completed (gh-7743).
  • Fixed a bug when direct assignments of box.cfg parameters (such as box.cfg.background = true) were silently ignored. Now such assignments result in errors. The correct way to set box.cfg parameters is this: box.cfg{ background=true } (gh-7350).
  • Fixed various bugs related to unsafe (i.e., coming from an unknown source) decoding and validating of MsgPack extensions (ghs-73).

Memtx

  • Deprecated the GT iterator type for HASH indexes (gh-7231).

Replication

  • Fixed replicaset bootstrap getting stuck on some nodes with ER_READONLY when there are connectivity problems (gh-7737).
  • Fixed a bug when a replicaset state machine that tracks the number of appliers in different states could become inconsistent during reconfiguration (gh-7590).
  • Fixed a bug related to box.info.replication[...].upstream being stuck in the "connecting" state for several minutes after a replica DNS record change (gh-7294).

Raft

  • Fixed a bug when a replicaset could be split into parts if an old leader started a new synchronous txn shortly before a new leader was going to be elected. This was possible if the old leader hadn't learned the new term yet (gh-7253).

Lua

  • Fixed a bug that prevented using C module API methods luaL_iscallable(), luaL_checkcdata(), and luaL_setcdatagc() with the upvalue indexes (gh-8249).

Json

  • A new compat option json_escape_forward_slash was added. This option configures whether the internal JSON encoder escapes the forward slash character (old behavior) or not (new behavior). This option affects the json.encode() Lua function and the JSON logger (gh-6200).

SQL

  • Now SQL queries with subqueries and quoted names return the correct column names in projection (gh-7063).
  • Now the ROUND() functions works correctly on arguments with big precision (gh-6650).
  • Fixed assertion in the % (modulo) operation when the left value is negative and the result is 0 (gh-6575).
  • Now NaN is always considered NULL (gh-6572).
  • [Breaking change in the SQL engine] Dropped the session setting sql_defer_foreign_keys and rules reference trigger action, constraint check time, and match type (gh-6986).

Box

  • Fixed an incorrect error message on granting privileges to the admin user. Such attempts now fail with proper error messages such as "User 'admin' already has read access on universe" (gh-7226).
  • Fixed accidental exposure of the _collation space to public (ghs-5).
  • Now box.execute cannot be called before box.cfg (gh-4726).
  • Fixed the error message for wrong options provided to a function definition (gh-7972).
  • Fixed a bug where box.cfg.force_recovery doesn't work when there are no user spaces in a snapshot (gh-7974).

LuaJIT

  • The JIT engine was disabled by default on macOS platforms to improve the user experience. If necessary, you can enable it with jit.on (gh-8252).

Console

  • Fixed console ignoring -i flag in case stdin is not a tty (gh-5064).

Lib

  • Fixed http.client to properly parse HTTP status header such as HTTP/2 200 when the HTTP version does not have a minor part (gh-7319).

Tarantoolctl

  • Added a description for the --format flag of the tarantoolctl cat command.

URI

  • Optimized addition of URI parameters and their values (gh-7155).

Build

  • Fixed libunwind.h search in testing files (gh-6877).

Http client

  • Fixed a bug where a response body cannot be decoded (gh-8363).

2.10.7

1 year ago

Date: 2023-05-24 Tag: 2.10.7

Overview

2.10.7 is the 8th stable version of the 2.10 release series. It resolves 17 bugs since 2.10.6.

The "stable" label means that we have all planned features implemented and we see no high-impact issues. However, if you encounter an issue, feel free to report it on GitHub.

Compatibility

Tarantool 2.x is backward compatible with Tarantool 1.10.x in the binary data layout, client-server protocol, and replication protocol.

Please upgrade using the box.schema.upgrade() procedure to unlock all the new features of the 2.x series.

Bugs fixed

Core

  • Fixed a crash that could happen when preparing a crash report on macOS (gh-8445).
  • Fixed an integer overflow issue in net.box (ghs-121).
  • An IPROTO_EVENT packet now has the same sync number as the last corresponding IPROTO_WATCH request (gh-8393).
  • Fixed a bug because of which a dirty (not committed to WAL) DDL record could be written to a snapshot and cause a recovery failure (gh-8530).

Replication

  • Fixed a bug that occurred on applier failure: a node could start an election without having a quorum to do this (gh-8433).

  • Now if a join fails with some non-critical error, such as ER_READONLY, ER_ACCESS_DENIED, or something network-related, the instance tries to find a new master to join off and tries again (gh-6126, gh-8681).

  • States when joining a replica are renamed. Now the value of box.info.replication[id].upstream.status during join can be either wait_snapshot or fetch_snapshot instead of initial_join (gh-6126).

  • Fixed replicaset bootstrap getting stuck on some nodes with ER_READONLY when there are connectivity problems (gh-7737, gh-8681).

  • Fixed a bug when a replicaset state machine that is tracking the number of appliers according to their states could become inconsistent during reconfiguration (gh-7590).

LuaJIT

Backported patches from vanilla LuaJIT trunk (gh-8069). In the scope of this activity, the following issues have been resolved:

  • Fixed emit_rma() for x64/GC64 mode for non-mov instructions.

  • Limited Lua C library path with the default PATH_MAX value of 4096 bytes. Backported patches from the vanilla LuaJIT trunk (gh-8516). The following issues were fixed as part of this activity:

  • Fixed assembling of IR_LREF assembling for GC64 mode on x86_64.

SQL

  • Fixed an assertion when selecting tuples with incomplete internal format (gh-8418).
  • Fixed integer overflow issues in built-in functions (ghs-119).
  • Fixed a possible assertion or segmentation fault when optimizing INSERT INTO ... SELECT FROM (gh-8661).
  • Fixed an integer overflow issue and added check for the printf() failure due to too large size (ghs-122).

Datetime

  • Fixed an error in datetime.set when timestamp is passed along with nsec, usec, or msec (gh-8583).
  • Fixed errors when the string representation of a datetime object had a negative nanosecond part (gh-8570).

Build

  • Enabled compiler optimizations for static build dependencies, which were erroneously disabled in version 2.10.3 (gh-8606).

2.10.6

1 year ago

Date: 2023-03-22 Tag: 2.10.6

Overview

2.10.6 is the 7th stable version of the 2.10 release series. It resolves 3 bugs since 2.10.5.

The "stable" label means that we have all planned features implemented and we see no high-impact issues. However, if you encounter an issue, feel free to report it on GitHub.

Compatibility

Tarantool 2.x is backward compatible with Tarantool 1.10.x in the binary data layout, client-server protocol, and replication protocol.

Please upgrade using the box.schema.upgrade() procedure to unlock all the new features of the 2.x series.

Bugs fixed

Core

  • Fixed various bugs related to unsafe (i.e., coming from an unknown source) decoding and validating of MsgPack extensions (ghs-73).

LuaJIT

Backported patches from the vanilla LuaJIT trunk (gh-8069). The following issues were fixed as part of this activity:

  • Fixed successful math.min/math.max call with no args (gh-6163).
  • Fixed inconsistencies in math.min/math.max calls with a NaN arg (gh-6163).
  • Fixed pcall() call without arguments on arm64.
  • Fixed assembling of IR_{AHUV}LOAD specialized to boolean for aarch64.
  • Fixed constant rematerialization on arm64.

Box

  • Fixed a bug where box.cfg.force_recovery doesn't work when there is no user spaces in a snapshot (gh-7974).

2.11.0-rc2

1 year ago

Date: 2023-03-07 Tag: 2.11.0-rc2

Overview

2.11.0-rc1 is the release candidate version of the 2.11 release series.

This release introduces 58 new features and resolves 33 bugs since the 2.10.5 version. There can be bugs in less common areas. If you find any, feel free to report an issue on GitHub.

Notable changes are:

  • Features for application developers
    • Limitation of fiber execution time slice
    • Linearizable isolation level
    • Result set pagination
    • Per-module logging
    • Streaming in HTTP client
    • Encoding HTTP query parameters
    • Native foreign keys in the SQL engine
    • Interactive debugger for Lua code
  • Enhancements for administration
    • Replica join retry
    • New bootstrap strategy
    • Strict fencing in RAFT

Changes since 2.11.0-rc1 (assorted):

  • Fixed a bug where box.cfg.force_recovery doesn't work when there are no user spaces in a snapshot (gh-7974).
  • The zstd version was updated to pre-1.5.5 (gh-8391).
  • Fixed various bugs related to unsafe (i.e., coming from an unknown source) decoding and validating of MsgPack extensions (ghs-73).
  • Fixed a bug related to box.info.replication[...].upstream being stuck in the "connecting" state for several minutes after a replica DNS record change (gh-7294).
  • The JIT engine was disabled by default on macOS platforms to improve the user experience. If necessary, you can enable it with jit.on (gh-8252).
  • [http client] Fixed a bug where a response body cannot be decoded (gh-8363).

Compatibility

Tarantool 2.11 is backward compatible with Tarantool 2.10 in the binary data layout, client-server protocol, and replication protocol.

Please upgrade using the box.schema.upgrade() procedure to unlock all the new features of the 2.x series.

Functionality added or changed

Core

  • The cpu_misses entry in fiber.top() output is deprecated (gh-5869).

  • Implemented fiber.top() for ARM64 (gh-4573).

  • Introduced the mechanism for catching fibers running without yielding for too long. Now box operations, such as select and replace, will throw an error if the fiber execution time since yield exceeds the limit. The limit can also be checked from the application code with fiber.check_slice(). The default limit is controlled by the new compat option fiber_slice_default. The old default is no limit. The new default is one second. You can overwrite it with fiber.set_slice() (gh-6085).

  • Now if a join fails with a non-critical error, such as ER_READONLY, ER_ACCESS_DENIED, or a network-related error, the instance tries to find a new master to join to and tries again (gh-6126).

  • Renamed replication states when a replica is joining. Now when querying box.info.replication[id].upstream.status during join, you will see either wait_snapshot or fetch_snapshot instead of initial_join (gh-6126).

  • fiber_set_cancellable() C API function is deprecated and now does nothing (gh-7166).

  • Introduced a new transaction isolation level linearizable. Transactions started with box.begin{txn_isolation = "linearizable"} always see the latest data confirmed by the quorum (gh-6707).

  • The box error C API (box_error_set(), box_error_last(), and so on) can now be used in threads started by user modules with the pthread library (gh-7814).

  • box.info() can now be called before box.cfg() (gh-7255).

  • Introduced pagination support for memtx and vinyl tree indexes. It is now possible to resume pairs and select from the position where the last call stopped (gh-7639).

  • Now the log message contains the name of a Lua module from which the logging function was called (gh-3211).

  • Now the log level can be set for specific modules using log.cfg{modules = {...}} or box.cfg{log_modules = {...}} (gh-3211).

  • Reduced recovery time from a snapshot by up to 2x on the systems with a hard disk drive (gh-8108).

  • Disabled automatic invocation of box.schema.upgrade on box.cfg for read-write instances that don't set up replication. Now, box.schema.upgrade may only be called manually by the admin (gh-8207).

  • Added the new function box.read_view.list() that returns a list of all active database read views. The list includes both system read views (created to make a checkpoint or join a replica) and read views created by application code (available only in Enterprise Edition) (gh-8260).

  • The zstd version was updated to pre-1.5.5 (gh-8391).

  • Now the fiber_channel:close() closes the channel gracefully: closing it for writing leaving the possibility to read existing events from it. Previously, channel:close() was closing the channel completely and discarding all unread events.

    A new compat option fiber_channel_close_mode is added for switching to the new behavior (gh-7746).

Vinyl

  • [Breaking change] Added support of transaction isolation levels for the Vinyl engine. The txn_isolation option passed to box.begin() now has the same effect for Vinyl and memtx. Note, this effectively changes the default isolation level of Vinyl transactions from 'read-committed' to 'best-effort', which may cause more conflicts (gh-5522).

Replication

  • Introduced the new configuration option bootstrap_strategy. The default value of this option - "auto" - brings the new behavior of replica on:

    • replica set bootstrap
    • replica join to an existing replica set
    • recovery
    • replication reconfiguration.

    To return to the old behavior, set the option to "legacy".

    The new value "auto" will be in effect only when no value for replication_connect_quorum is passed. If a value is present, bootstrap_strategy is automatically set to "legacy" to preserve backward compatibility.

    Note that if you leave the options untouched (that is, bootstrap_strategy defaults to "auto"), the following behavior will noticeably change: during the recovery from local files and during replication reconfiguration box.cfg{replication = ...} will not fail even if some (or all) of the remote peers listed in box.cfg.replication are unavailable. Instead, the node will try to connect to them for a period of replication_connect_timeout and then transition to box.info.status == "running" as soon as it syncs with all the reached peers (gh-5272).

  • [Breaking change] Joining a new replica to a working replica set. If neither of the configuration options bootstrap_strategy and replication_connect_quorum is passed explicitly, or if bootstrap_strategy is set to "auto", bootstrapping a new replica in an existing replica set will only succeed if all the replica set members are listed in the replica's box.cfg.replication. For example, when joining a fresh replica to a replica set of 3 nodes, all 3 node URIs must be present in the replica's box.cfg.replication parameter. When joining 2 new replicas to a single master, both replicas must have each other's URIs (alongside with master's URI) in their box.cfg.replication (gh-5272).

  • A new compat option box_cfg_replication_sync_timeout was added to control the default value of replication_sync_timeout option of box.cfg. The old default is 300 seconds, and new default is 0. The noticeable difference in the new behavior is that box.cfg{replication = ""} call now returns before the node is synced with remote instances. If you need the node to be writable once box.cfg returns, you can achieve it with new behavior by calling box.ctl.wait_rw() after box.cfg{replication=...}.

    By default, the option value is "old" and will be switched to "new" in the next major release. To switch to the new behavior, set the option to "new" before the initial box.cfg{} call in your application (gh-5272).

Raft

  • Introduced strict fencing, which tries its best to allow at most one leader in cluster in any moment in time. This is achieved by setting connection death timeout on the current leader to half the time compared to followers (assuming the replication_timeout is the same on every replica) (gh-7110).

LuaJIT

Backported patches from vanilla LuaJIT trunk (gh-7230). In the scope of this activity, the following features is completed:

  • assert() now accepts any type of error object (from Lua 5.3).
  • Enabled LuaJIT CMake option LUAJIT_ENABLE_CHECKHOOK for checking instruction and line hooks for compiled code (gh-7762).

Lua

  • Introduced the Tarantool compatibility module compat. It is used for transparent management of behavior changes. compat stores options that reflect behavior changes. Possible option values are old, new, and default. By default, compat contains options for certain Tarantool changes that may break compatibility with previous versions. Users can also add their own compatibility options in runtime (gh-7000).

  • It is now possible to run scripts or load modules before the main script by specifying them in the TT_PRELOAD environment variable. For example:

    $ TT_PRELOAD=/path/to/foo.lua tarantool main.lua
    

    (gh-7714).

  • Embedded the tarantool/checks module for function input validation (gh-7726).

  • Introduced the -b and -j flags that can be passed to LuaJIT runtime for debugging and runtime configuration purposes (gh-5541).

  • Added the ability to override a built-in module by an external one (gh-7774).

  • Default module search paths now include the main script directory (gh-8182).

Console

  • Prevent mixing of background print and log output with the current user's input in the interactive console (gh-7169).

Http client

  • Now the HTTP client is able to encode Lua objects automatically when it is possible. The encoding format depends on the request content type. The following content types are supported by default: application/json, application/yaml, application/msgpack. Users can define encoding rules for other content types by writing their own encoding functions (gh-6833).
  • Added a new method response:decode(). It decodes an HTTP response body to a Lua object. The decoding result depends on the response content type. The following content types are supported by default: application/json, application/yaml, application/msgpack. Users can define decoding rules for other content types by writing their own decoding functions (gh-6833).
  • Added a new option params to add query parameters to URI using a Lua table. These parameters are encoded to a query string and passed to the HTTP request (gh-6832).
  • Query parameters passed into a URI using the params option are now percent-encoded automatically. Parameters are encoded with uri.QUERY_PART when GET, DELETE, or HEAD HTTP methods are used, and with uri.FORM_URLENCODED in other cases (gh-7931).
  • Introduced stream input/output interface for http.client (gh-7845).

Msgpack

  • Added the __index metamethod and the get method to msgpack.object. They both perform indexation of MsgPack data stored in the object similar to tuple from box.tuple: __index resolves collisions in favor of msgpack.object methods, whereas get ignores methods (gh-7898).

Uri

  • Added a new method uri.values() for representing multivalue parameters (gh-6832).
> params = {q1 = uri.values("v1", "v2")}}
> uri.parse({"/tmp/unix.sock", params = params)
---
- host: unix/
  service: /tmp/unix.sock
  unix: /tmp/unix.sock
  params:
    q1:
    - v1
    - v2
...

  • Added functions uri.escape() and uri.unescape() for percent-encoding and decoding URI parts (gh-3682).

SQL

  • Introduced a new function type SQL_EXPR (gh-6986).
  • SQL foreign key constraints and check constraints were replaced by tuple constraints (gh-6986).
  • Introduced the new keyword SEQSCAN for SQL SELECT queries. You may now use a scanning SQL SELECT query without the SEQSCAN keyword only if the sql_seq_scan session setting is set to true. A new compat option sql_seq_scan_default is added for managing the default value of sql_seq_scan (gh-7747).

Box

  • Exported box_schema_version to public API and Lua via box.info.schema_version (gh-7904).
  • Exported IPROTO constants and features to Lua (gh-7894).
  • It is now possible to register triggers for various recovery stages: use box.ctl.on_recovery_state() before the initial box.cfg() call. The trigger has one parameter – a string that shows the reached recovery stage: snapshot_recovered, wal_recovered, indexes_built, or synced (gh-3159).
  • Exported current session identifier to C API via box_session_id (gh-7895).
  • Environment variables (TT_LOG, TT_LOG_LEVEL, and other) are taken into account if logging is configured using log.cfg before box.cfg is called (gh-6011).
  • Added the IPROTO_AUTH_TYPE key to the IPROTO_ID response. The key contains the name of the authentication method that is currently used on the server for generating user authentication data (gh-7989).
  • Added an API for sending arbitrary IPROTO packets from server to client: box.iproto.send in Lua and box_iproto_send in C (gh-7897).
  • It is now possible to set IPROTO request handler callbacks from Lua (using box.iproto.override) and from C (using box_iproto_override) (gh-7901).
  • Introduced transaction options in box.atomic() by analogy with box.begin() (gh-7202).
  • Added the support for downgrading system spaces to make them compatible with older Tarantool versions (gh-7718).
  • The feedback daemon now collects metrics if the required version of the metrics module is installed (gh-8192). feedback_version is updated to 8.
  • Add fiber_set_ctx and fiber_get_ctx C API functions to pass data to fibers without yielding immediately (gh-7669).

Console

  • Introduced a way to configure the printed End Of Stream (EOS) symbol in the Lua console. Changed the default printed EOS from ';' to '' (gh-7031).

Debugger

  • Introduced a new console debugger luadebug.lua for debugging external and builtin Lua modules.

Note: the debugger REPL is not yet compatible with Tarantool console. This means that this code will hang in the console:

tarantool> dbg = require 'luadebug'
---
...

tarantool> dbg()
---

Users should call debugger activation only in their instrumented code, not from the interactive console.

  • Introduced a new Lua API tarantool.debug.getsources() which allows seeing sources of builtin modules in any external debugger.

  • Swapped 'up' and 'down' commands in the debugger to make them behave similar to those in gdb and lldb.

  • Added the support for breakpoints to the builtin console debugger luadebug.lua.

  • Made is easier to debug files with the same name (such as init.lua) by handling partial path lookup in breakpoints:

    break B/init.lua:10
    break A/init.lua:20
    break ./main.lua:30
    break ../a/b/c/leaf.lua:40
    
  • Introduced the -d command-line option which runs the debugger console instead of the standard interactive console (gh-7456).

    $ tarantool -d debug-target.lua
    Tarantool debugger 2.11.0-entrypoint-852-g9e6ed28ae
    type 'help' for interactive help
    luadebug: Loaded for 2.11.0-entrypoint-852-g9e6ed28ae
    break via debug-target.lua => debug-target.lua:1 in chunk at debug-target.lua:0
       1 => local date = require 'datetime'
       4
    luadebug>
    

    This is a more convenient way to initiate a debugger session instead of an older, more invasive approach of instrumenting the code with a require 'luadebug'() call.

Doxygen

  • Doxygen module API documentation is now published automatically on every merge to the master branch.

Yaml

  • Now yaml.encode can encode multiline strings in literal-scalar style for better readability. A new compat option yaml_pretty_multiline is added for switching to the new behavior (gh-3012).

Bugs fixed

Core

  • Added the fiber_join_timeout symbol to exports (gh-7125).
  • Allowed spurious wakeup of a fiber that is waiting for WAL write completion (gh-6506).
  • Now box_latch_lock guarantees the order in which it is acquired by fibers requesting it (gh-7166).
  • A proper error in now raised on incorrect syslog log configuration through log.cfg (gh-7447).
  • Fixed a bug with Tarantool C API freeing fiber region allocations it does not allocate. This could lead to use-after-free in client code which allocates memory on fiber region. (gh-5665).
  • Errors thrown on specifying invalid index parts or format fields are now more verbose. They include the bad index part or field number (gh-7933).
  • Fixed a potential crash when SIGTERM was received before box.cfg execution is completed (gh-7743).
  • Fixed a bug when direct assignments of box.cfg parameters (such as box.cfg.background = true) were silently ignored. Now such assignments result in errors. The correct way to set box.cfg parameters is this: box.cfg{ background=true } (gh-7350).
  • Fixed various bugs related to unsafe (i.e., coming from an unknown source) decoding and validating of MsgPack extensions (ghs-73).

Memtx

  • Deprecated the GT iterator type for HASH indexes (gh-7231).

Replication

  • Fixed replicaset bootstrap getting stuck on some nodes with ER_READONLY when there are connectivity problems (gh-7737).
  • Fixed a bug when a replicaset state machine that tracks the number of appliers in different states could become inconsistent during reconfiguration (gh-7590).
  • Fixed a bug related to box.info.replication[...].upstream being stuck in the "connecting" state for several minutes after a replica DNS record change (gh-7294).

Raft

  • Fixed a bug when a replicaset could be split into parts if an old leader started a new synchronous txn shortly before a new leader was going to be elected. This was possible if the old leader hadn't learned the new term yet (gh-7253).

Lua

  • Fixed a bug that prevented using C module API methods luaL_iscallable(), luaL_checkcdata(), and luaL_setcdatagc() with the upvalue indexes (gh-8249).

Json

  • A new compat option json_escape_forward_slash was added. This option configures whether the internal JSON encoder escapes the forward slash character (old behavior) or not (new behavior). This option affects the json.encode() Lua function and the JSON logger (gh-6200).

SQL

  • Now SQL queries with subqueries and quoted names return the correct column names in projection (gh-7063).
  • Now the ROUND() functions works correctly on arguments with big precision (gh-6650).
  • Fixed assertion in the % (modulo) operation when the left value is negative and the result is 0 (gh-6575).
  • Now NaN is always considered NULL (gh-6572).
  • [Breaking change in the SQL engine] Dropped the session setting sql_defer_foreign_keys and rules reference trigger action, constraint check time, and match type (gh-6986).

Box

  • Fixed an incorrect error message on granting privileges to the admin user. Such attempts now fail with proper error messages such as "User 'admin' already has read access on universe" (gh-7226).
  • Fixed accidental exposure of the _collation space to public (ghs-5).
  • Now box.execute cannot be called before box.cfg (gh-4726).
  • Fixed the error message for wrong options provided to a function definition (gh-7972).
  • Fixed a bug where box.cfg.force_recovery doesn't work when there are no user spaces in a snapshot (gh-7974).

LuaJIT

  • The JIT engine was disabled by default on macOS platforms to improve the user experience. If necessary, you can enable it with jit.on (gh-8252).

Console

  • Fixed console ignoring -i flag in case stdin is not a tty (gh-5064).

Lib

  • Fixed http.client to properly parse HTTP status header such as HTTP/2 200 when the HTTP version does not have a minor part (gh-7319).

Tarantoolctl

  • Added a description for the --format flag of the tarantoolctl cat command.

URI

  • Optimized addition of URI parameters and their values (gh-7155).

Build

  • Fixed libunwind.h search in testing files (gh-6877).

Http client

  • Fixed a bug where a response body cannot be decoded (gh-8363).

2.11.0-rc1

1 year ago

Date: 2023-02-20 Tag: 2.11.0-rc1

Overview

2.11.0-rc1 is the release candidate version of the 2.11 release series.

This release introduces 57 new features and resolves 28 bugs since the 2.10.5 version. There can be bugs in less common areas. If you find any, feel free to report an issue on GitHub.

Notable changes are:

  • Features for application developers
    • Limitation of fiber execution time slice
    • Linearizable isolation level
    • Result set pagination
    • Per-module logging
    • Streaming in HTTP client
    • Encoding HTTP query parameters
    • Native foreign keys in the SQL engine
    • Interactive debugger for Lua code
  • Enhancements for administration
    • Replica join retry
    • New bootstrap strategy
    • Strict fencing in RAFT

Learn more about these and other new features in the release candidate announcement.

Compatibility

Tarantool 2.11 is backward compatible with Tarantool 2.10 in the binary data layout, client-server protocol, and replication protocol.

Please upgrade using the box.schema.upgrade() procedure to unlock all the new features of the 2.x series.

Functionality added or changed

Core

  • The cpu_misses entry in fiber.top() output is deprecated (gh-5869).

  • Implemented fiber.top() for ARM64 (gh-4573).

  • Introduced the mechanism for catching fibers running without yielding for too long. Now box operations, such as select and replace, will throw an error if the fiber execution time since yield exceeds the limit. The limit can also be checked from the application code with fiber.check_slice(). The default limit is controlled by the new compat option fiber_slice_default. The old default is no limit. The new default is one second. You can overwrite it with fiber.set_slice() (gh-6085).

  • Now if a join fails with a non-critical error, such as ER_READONLY, ER_ACCESS_DENIED, or a network-related error, the instance tries to find a new master to join to and tries again (gh-6126).

  • Renamed replication states when a replica is joining. Now when querying box.info.replication[id].upstream.status during join, you will see either wait_snapshot or fetch_snapshot instead of initial_join (gh-6126).

  • fiber_set_cancellable() C API function is deprecated and now does nothing (gh-7166).

  • Introduced a new transaction isolation level linearizable. Transactions started with box.begin{txn_isolation = "linearizable"} always see the latest data confirmed by the quorum (gh-6707).

  • The box error C API (box_error_set(), box_error_last(), and so on) can now be used in threads started by user modules with the pthread library (gh-7814).

  • box.info() can now be called before box.cfg() (gh-7255).

  • Introduced pagination support for memtx and vinyl tree indexes. It is now possible to resume pairs and select from the position where the last call stopped (gh-7639).

  • Now the log message contains the name of a Lua module from which the logging function was called (gh-3211).

  • Now the log level can be set for specific modules using log.cfg{modules = {...}} or box.cfg{log_modules = {...}} (gh-3211).

  • Reduced recovery time from a snapshot by up to 2x on the systems with a hard disk drive (gh-8108).

  • Disabled automatic invocation of box.schema.upgrade on box.cfg for read-write instances that don't set up replication. Now, box.schema.upgrade may only be called manually by the admin (gh-8207).

  • Added the new function box.read_view.list() that returns a list of all active database read views. The list includes both system read views (created to make a checkpoint or join a replica) and read views created by application code (available only in Enterprise Edition) (gh-8260).

Fiber

  • Now the channel:close() closes the channel gracefully: closing it for writing leaving the possibility to read existing events from it. Previously, channel:close() was closing the channel completely and discarding all unread events.

    A new compat option fiber_channel_close_mode is added for switching to the new behavior (gh-7746).

Vinyl

  • [Breaking change] Added support of transaction isolation levels for the Vinyl engine. The txn_isolation option passed to box.begin() now has the same effect for Vinyl and memtx. Note, this effectively changes the default isolation level of Vinyl transactions from 'read-committed' to 'best-effort', which may cause more conflicts (gh-5522).

Replication

  • Introduced the new configuration option bootstrap_strategy. The default value of this option - "auto" - brings the new behavior of replica on:

    • replica set bootstrap
    • replica join to an existing replica set
    • recovery
    • replication reconfiguration.

    To return to the old behavior, set the option to "legacy".

    The new value "auto" will be in effect only when no value for replication_connect_quorum is passed. If a value is present, bootstrap_strategy is automatically set to "legacy" to preserve backward compatibility.

    Note that if you leave the options untouched (that is, bootstrap_strategy defaults to "auto"), the following behavior will noticeably change: during the recovery from local files and during replication reconfiguration box.cfg{replication = ...} will not fail even if some (or all) of the remote peers listed in box.cfg.replication are unavailable. Instead, the node will try to connect to them for a period of replication_connect_timeout and then transition to box.info.status == "running" as soon as it syncs with all the reached peers (gh-5272).

  • [Breaking change] Joining a new replica to a working replica set. If neither of the configuration options bootstrap_strategy and replication_connect_quorum is passed explicitly, or if bootstrap_strategy is set to "auto", bootstrapping a new replica in an existing replica set will only succeed if all the replica set members are listed in the replica's box.cfg.replication. For example, when joining a fresh replica to a replica set of 3 nodes, all 3 node URIs must be present in the replica's box.cfg.replication parameter. When joining 2 new replicas to a single master, both replicas must have each other's URIs (alongside with master's URI) in their box.cfg.replication (gh-5272).

  • A new compat option box_cfg_replication_sync_timeout was added to control the default value of replication_sync_timeout option of box.cfg. The old default is 300 seconds, and new default is 0. The noticeable difference in the new behavior is that box.cfg{replication = ""} call now returns before the node is synced with remote instances. If you need the node to be writable once box.cfg returns, you can achieve it with new behavior by calling box.ctl.wait_rw() after box.cfg{replication=...}.

    By default, the option value is "old" and will be switched to "new" in the next major release. To switch to the new behavior, set the option to "new" before the initial box.cfg{} call in your application (gh-5272).

Raft

  • Introduced strict fencing, which tries its best to allow at most one leader in cluster in any moment in time. This is achieved by setting connection death timeout on the current leader to half the time compared to followers (assuming the replication_timeout is the same on every replica) (gh-7110).

LuaJIT

Backported patches from vanilla LuaJIT trunk (gh-7230). In the scope of this activity, the following features is completed:

  • assert() now accepts any type of error object (from Lua 5.3).
  • Enabled LuaJIT CMake option LUAJIT_ENABLE_CHECKHOOK for checking instruction and line hooks for compiled code (gh-7762).

Lua

  • Introduced the Tarantool compatibility module compat. It is used for transparent management of behavior changes. compat stores options that reflect behavior changes. Possible option values are old, new, and default. By default, compat contains options for certain Tarantool changes that may break compatibility with previous versions. Users can also add their own compatibility options in runtime (gh-7000).

  • It is now possible to run scripts or load modules before the main script by specifying them in the TT_PRELOAD environment variable. For example:

    $ TT_PRELOAD=/path/to/foo.lua tarantool main.lua
    

    (gh-7714).

  • Embedded the tarantool/checks module for function input validation (gh-7726).

  • Introduced the -b and -j flags that can be passed to LuaJIT runtime for debugging and runtime configuration purposes (gh-5541).

  • Added the ability to override a built-in module by an external one (gh-7774).

  • Default module search paths now include the main script directory (gh-8182).

Console

  • Prevent mixing of background print and log output with the current user's input in the interactive console (gh-7169).

Http client

  • Now the HTTP client is able to encode Lua objects automatically when it is possible. The encoding format depends on the request content type. The following content types are supported by default: application/json, application/yaml, application/msgpack. Users can define encoding rules for other content types by writing their own encoding functions (gh-6833).
  • Added a new method response:decode(). It decodes an HTTP response body to a Lua object. The decoding result depends on the response content type. The following content types are supported by default: application/json, application/yaml, application/msgpack. Users can define decoding rules for other content types by writing their own decoding functions (gh-6833).
  • Added a new option params to add query parameters to URI using a Lua table. These parameters are encoded to a query string and passed to the HTTP request (gh-6832).
  • Query parameters passed into a URI using the params option are now percent-encoded automatically. Parameters are encoded with uri.QUERY_PART when GET, DELETE, or HEAD HTTP methods are used, and with uri.FORM_URLENCODED in other cases (gh-7931).
  • Introduced stream input/output interface for http.client (gh-7845).

Msgpack

  • Added the __index metamethod and the get method to msgpack.object. They both perform indexation of MsgPack data stored in the object similar to tuple from box.tuple: __index resolves collisions in favor of msgpack.object methods, whereas get ignores methods (gh-7898).

Uri

  • Added a new method uri.values() for representing multivalue parameters (gh-6832).
> params = {q1 = uri.values("v1", "v2")}}
> uri.parse({"/tmp/unix.sock", params = params)
---
- host: unix/
  service: /tmp/unix.sock
  unix: /tmp/unix.sock
  params:
    q1:
    - v1
    - v2
...

  • Added functions uri.escape() and uri.unescape() for percent-encoding and decoding URI parts (gh-3682).

SQL

  • Introduced a new function type SQL_EXPR (gh-6986).
  • SQL foreign key constraints and check constraints were replaced by tuple constraints (gh-6986).
  • Introduced the new keyword SEQSCAN for SQL SELECT queries. You may now use a scanning SQL SELECT query without the SEQSCAN keyword only if the sql_seq_scan session setting is set to true. A new compat option sql_seq_scan_default is added for managing the default value of sql_seq_scan (gh-7747).

Box

  • Exported box_schema_version to public API and Lua via box.info.schema_version (gh-7904).
  • Exported IPROTO constants and features to Lua (gh-7894).
  • It is now possible to register triggers for various recovery stages: use box.ctl.on_recovery_state() before the initial box.cfg() call. The trigger has one parameter – a string that shows the reached recovery stage: snapshot_recovered, wal_recovered, indexes_built, or synced (gh-3159).
  • Exported current session identifier to C API via box_session_id (gh-7895).
  • Environment variables (TT_LOG, TT_LOG_LEVEL, and other) are taken into account if logging is configured using log.cfg before box.cfg is called (gh-6011).
  • Added the IPROTO_AUTH_TYPE key to the IPROTO_ID response. The key contains the name of the authentication method that is currently used on the server for generating user authentication data (gh-7989).
  • Added an API for sending arbitrary IPROTO packets from server to client: box.iproto.send in Lua and box_iproto_send in C (gh-7897).
  • It is now possible to set IPROTO request handler callbacks from Lua (using box.iproto.override) and from C (using box_iproto_override) (gh-7901).
  • Introduced transaction options in box.atomic() by analogy with box.begin() (gh-7202).
  • Added the support for downgrading system spaces to make them compatible with older Tarantool versions (gh-7718).
  • The feedback daemon now collects metrics if the required version of the metrics module is installed (gh-8192). feedback_version is updated to 8.

Console

  • Introduced a way to configure the printed End Of Stream (EOS) symbol in the Lua console. Changed the default printed EOS from ';' to '' (gh-7031).

Debugger

  • Introduced a new console debugger luadebug.lua for debugging external and builtin Lua modules.

Note: the debugger REPL is not yet compatible with Tarantool console. This means that this code will hang in the console:

tarantool> dbg = require 'luadebug'
---
...

tarantool> dbg()
---

Users should call debugger activation only in their instrumented code, not from the interactive console.

  • Introduced a new Lua API tarantool.debug.getsources() which allows seeing sources of builtin modules in any external debugger.

  • Swapped 'up' and 'down' commands in the debugger to make them behave similar to those in gdb and lldb.

  • Added the support for breakpoints to the builtin console debugger luadebug.lua.

  • Made is easier to debug files with the same name (such as init.lua) by handling partial path lookup in breakpoints:

    break B/init.lua:10
    break A/init.lua:20
    break ./main.lua:30
    break ../a/b/c/leaf.lua:40
    
  • Introduced the -d command-line option which runs the debugger console instead of the standard interactive console (gh-7456).

    $ tarantool -d debug-target.lua
    Tarantool debugger 2.11.0-entrypoint-852-g9e6ed28ae
    type 'help' for interactive help
    luadebug: Loaded for 2.11.0-entrypoint-852-g9e6ed28ae
    break via debug-target.lua => debug-target.lua:1 in chunk at debug-target.lua:0
       1 => local date = require 'datetime'
       4
    luadebug>
    

    This is a more convenient way to initiate a debugger session instead of an older, more invasive approach of instrumenting the code with a require 'luadebug'() call.

Doxygen

  • Doxygen module API documentation is now published automatically on every merge to the master branch.

Fiber

  • Add fiber_set_ctx and fiber_get_ctx C API functions to pass data to fibers without yielding immediately (gh-7669).

Yaml

  • Now yaml.encode can encode multiline strings in literal-scalar style for better readability. A new compat option yaml_pretty_multiline is added for switching to the new behavior (gh-3012).

Bugs fixed

Core

  • Added the fiber_join_timeout symbol to exports (gh-7125).
  • Allowed spurious wakeup of a fiber that is waiting for WAL write completion (gh-6506).
  • Now box_latch_lock guarantees the order in which it is acquired by fibers requesting it (gh-7166).
  • A proper error in now raised on incorrect syslog log configuration through log.cfg (gh-7447).
  • Fixed a bug with Tarantool C API freeing fiber region allocations it does not allocate. This could lead to use-after-free in client code which allocates memory on fiber region. (gh-5665).
  • Errors thrown on specifying invalid index parts or format fields are now more verbose. They include the bad index part or field number (gh-7933).
  • Fixed a potential crash when SIGTERM was received before box.cfg execution is completed (gh-7743).
  • Fixed a bug when direct assignments of box.cfg parameters (such as box.cfg.background = true) were silently ignored. Now such assignments result in errors. The correct way to set box.cfg parameters is this: box.cfg{ background=true } (gh-7350).

Memtx

  • Deprecated the GT iterator type for HASH indexes (gh-7231).

Replication

  • Fixed replicaset bootstrap getting stuck on some nodes with ER_READONLY when there are connectivity problems (gh-7737).
  • Fixed a bug when a replicaset state machine that tracks the number of appliers in different states could become inconsistent during reconfiguration (gh-7590).

Raft

  • Fixed a bug when a replicaset could be split into parts if an old leader started a new synchronous txn shortly before a new leader was going to be elected. This was possible if the old leader hadn't learned the new term yet (gh-7253).

Lua

  • Fixed a bug that prevented using C module API methods luaL_iscallable(), luaL_checkcdata(), and luaL_setcdatagc() with the upvalue indexes (gh-8249).

Json

  • A new compat option json_escape_forward_slash was added. This option configures whether the internal JSON encoder escapes the forward slash character (old behavior) or not (new behavior). This option affects the json.encode() Lua function and the JSON logger (gh-6200).

SQL

  • Now SQL queries with subqueries and quoted names return the correct column names in projection (gh-7063).
  • Now the ROUND() functions works correctly on arguments with big precision (gh-6650).
  • Fixed assertion in the % (modulo) operation when the left value is negative and the result is 0 (gh-6575).
  • Now NaN is always considered NULL (gh-6572).
  • [Breaking change in the SQL engine] Dropped the session setting sql_defer_foreign_keys and rules reference trigger action, constraint check time, and match type (gh-6986).

Box

  • Fixed an incorrect error message on granting privileges to the admin user. Such attempts now fail with proper error messages such as "User 'admin' already has read access on universe" (gh-7226).
  • Fixed accidental exposure of the _collation space to public (ghs-5).
  • Now box.execute cannot be called before box.cfg (gh-4726).
  • Fixed the error message for wrong options provided to a function definition (gh-7972).

Console

  • Fixed console ignoring -i flag in case stdin is not a tty (gh-5064).

Lib

  • Fixed http.client to properly parse HTTP status header such as HTTP/2 200 when the HTTP version does not have a minor part (gh-7319).

Tarantoolctl

  • Added a description for the --format flag of the tarantoolctl cat command.

URI

  • Optimized addition of URI parameters and their values (gh-7155).

Build

  • Fixed libunwind.h search in testing files (gh-6877).

2.10.5

1 year ago

Date: 2023-02-20

Tag: 2.10.5

Overview

2.10.5 is the 6th stable version of the 2.10 release series. It introduces 5 improvements and resolves 44 bugs since 2.10.4.

The "stable" label means that we have all planned features implemented and we see no high-impact issues. However, if you encounter an issue, feel free to report it on GitHub.

Compatibility

Tarantool 2.x is backward compatible with Tarantool 1.10.x in the binary data layout, client-server protocol, and replication protocol.

Please upgrade using the box.schema.upgrade() procedure to unlock all the new features of the 2.x series.

Functionality added or changed

Core

  • Introduced the _vspace_sequence system space view of the _space_sequence system space (gh-7858).
  • The log produced during box.cfg{} now contains the build target triplet (for example, Linux-x86_64-RelWithDebInfo).

Build

  • OpenSUSE 15.1 and 15.2 are no longer supported.
  • Updated libcurl to version 7.87.0 (gh-8150).
  • Alpine Linux 3.16 is now supported.

Bugs fixed

Core

  • Fixed a bug in fiber switching that could lead to a segmentation fault error on AArch64 systems (gh-7523, gh-7985).

  • Fixed wrong CPU architecture reported in tarantool.build.target on M1/M2 Macs (gh-7495).

  • Fixed a bug when fields could be removed from a table stored in a variable when a logging function was called on this variable (for example, log.info(a)) (gh-3853).

  • Fixed a logging bug: when logging tables with fields that have reserved internal names (such as pid) in the plain log format, such fields weren't logged (gh-3853).

  • Added the message field when logging tables without such field in the JSON log format (gh-3853).

  • Fixed an assertion on malformed JSON message written to the log (gh-7955).

  • Fixed the bug because of which box.session.on_auth triggers were not invoked if the authenticated user didn't exist (gh-8017).

  • Eliminated the possibility of user enumeration by analyzing errors sent in reply to malformed authentication requests (ghs-21).

  • Fixed a bug when Tarantool could execute random bytes as a Lua code after fork on systems with a glibc version earlier than 2.29 (gh-7886).

  • A referenced space or a function being used in a constraint can now be dropped in the same transaction with the referencing constraint or space (gh-7339).

  • Fixed Tarantool being stuck during a crash on macOS (gh-8023).

  • Fixed a bug that prevented collection of crash reports (gh-8083).

  • Fixed a crash in net.box that happened if the error message raised by the server contained printf formatting specifiers, such as %d or %s (gh-8043).

  • Fixed read-only statements executing successfully in transactions that were aborted by yield or timeout. Now, read-only statements fail in this case, just like write statements (gh-8123).

  • Fixed a transaction conflict reported mistakenly when a key was deleted twice with MVCC engine enabled (gh-8122).

  • net.box connections now contain information about sequences used by remote spaces (gh-7858).

  • Fixed a crash that happened if a transaction was aborted (for example, by fiber yield with MVCC off) while the space's on_replace or before_replace trigger was running (gh-8027).

  • Fixed a possible crash when attempting to update the same field in tuple/space/index:update() more than once (gh-8216).

  • Fixed empty BITSET indexes crashing on len calls (gh-5809).

  • Fixed a crash when functional indexes were used with very specific chunk size (gh-6786).

Memtx

  • Fixed a possible repeatable read violation with reverse iterators (gh-7755).
  • Fixed a crash on series of transactions in memtx (gh-7756).
  • Fixed a phantom read that could happen after reads from different indexes followed by a rollback (gh-7828).
  • Fixed an assert in the MVCC engine (gh-7945).
  • Fixed an assertion failure in MVCC during statement preparation (gh-8104).
  • Fixed possible loss of a committed tuple after rollback of a prepared transaction (gh-7930).

Vinyl

  • Fixed a bug that could result in select() skipping an existing tuple after a rolled back delete() (gh-7947).

Replication

  • Fixed local space writes failing with error "Found uncommitted sync transactions from other instance with id 1" when synchronous transaction queue belongs to another instance and isn't empty (gh-7592).

  • Fixed an assertion failure on master when a replica resubscribes with a smaller vclock than previously seen (gh-5158).

  • A warning is now raised when replica_id is changed by a before_replace trigger while adding a new replica. Previously, there was an assertion checking this (gh-7846).

  • Fixed a segmentation fault that happened when a before_replace trigger set on space _cluster returned nil (gh-7846).

  • Fixed possible transaction conflict errors on applying a replication stream (gh-8121).

Raft

  • Fixed an assertion failure in case when an election candidate is reconfigured to a voter during an ongoning WAL write (gh-8169).
  • Fixed nodes configured with election_mode = "manual" sometimes increasing the election term excessively after their promotion (gh-8168).

LuaJIT

Backported patches from vanilla LuaJIT trunk (gh-7230). In the scope of this activity, the following issues have been resolved:

  • Fix io.close() for already closed standard output.
  • Fix trace execution and stitching inside vmevent handler (gh-6782).
  • Fixed emit_loadi() on x86/x64 emitting xor between condition check and jump instructions.
  • Fix stack top for error message when raising the OOM error (gh-3840).
  • Enabled external unwinding on several LuaJIT platforms. Now it is possible to handle ABI exceptions from Lua code (gh-6096).
  • Disabled math.modf compilation due to its rare usage and difficulties with proper implementation of the corresponding JIT machinery.
  • Fixed inconsistent behaviour on signed zeros for JIT-compiled unary minus (gh-6976).
  • Fixed IR_HREF hash calculations for non-string GC objects for GC64.
  • Fixed assembling of type-check-only variant of IR_SLOAD.
  • Enabled the platform profiler for Tarantool built with GC64 mode (gh-7919).
  • Added full-range lightuserdata support to the luajit-gdb.py extension (gh-6481).

Backported patches from vanilla LuaJIT trunk (gh-8069). In the scope of this activity, the following issues have been resolved:

  • Fixed loop realigment for dual-number mode
  • Fixed os.date() for wider libc strftime() compatibility.
  • Fix interval parsing for sysprof for dual-number mode.

Lua

  • Fixed alias detection in the YAML serializer in case the input contains objects that implement the __serialize meta method (gh-8240).

SQL

  • Fixed a bug when collation could change the type of a built-in function argument (gh-7992).
  • Fixed several bugs happening because of improper handling of malloc() failures. (ghs-65, 66, 67, 68).

Box

  • Fixed a possible error during rollback of read-only transaction statements (gh-5501).
  • Fixed a bug in space_object:create_index() when collation option is not set. Now it is inherited from the space format (gh-5104).
  • Eliminated a code injection vulnerability in the processing of the replication_synchro_quorum box.cfg() option (ghs-20, GHSA-74jr-2fq7-vp42).

Datetime

  • Fixed a segmentation fault that happened when the value passed to the %f modifier of datetime_object:format() was too big (ghs-31).

Fiber

  • Fixed the assertion fail in cord_on_yield (gh-6647).

Log

  • Fixed an incorrect facility value in syslog on Alpine and OpenBSD (gh-8269).

Build

  • Fixed -Werror build fail on Clang 15 (gh-8110).

1.10.15

1 year ago

Date: 2023-02-20 Tag: 1.10.15

Overview

1.10.15 is the next stable release in the long-term support (LTS) versionrelease_policy 1.10.x release series.

The label "stable" means there are 1.10.x-based applications running in production for quite a while without known crashes, incorrect results or other showstopper bugs.

This release introduces 2 improvements and resolves roughly 8
issues since the 1.10.14 version.

Compatibility

Tarantool 1.10.x is backward compatible with Tarantool 1.9.x in binary data layout, client-server protocol, and replication protocol.

Please upgrade using the box.schema.upgrade() procedure to unlock
all the new features of the 1.10.x series.

Functionality added or changed

Build

  • OpenSUSE 15.1 and 15.2 are no longer supported.
  • Updated libcurl to version 7.87.0 (gh-8150).

Bugs fixed

Core

  • Fixed a bug when fields could be removed from a table stored in a variable when a logging function was called on this variable (for example, log.info(a)) (gh-3853).

  • Fixed a logging bug: when logging tables with fields that have reserved internal names (such as pid) in the plain log format, such fields weren't logged (gh-3853).

  • Added the message field when logging tables without such a field in the JSON log format (gh-3853).

  • Fixed an assertion on malformed JSON message written to the log (gh-7955).

Vinyl

  • Fixed a bug that could result in select() skipping an existing tuple after a rolled back delete() (gh-7947).

LuaJIT

Backported patches from vanilla LuaJIT trunk (gh-7230). In the scope of this activity, the following issues have been resolved:

  • Fix overflow check in unpack() optimized by a compiler.
  • Fix recording of tonumber() with cdata argument for failed conversions (gh-7655).
  • Fix concatenation operation on cdata. It always raises an error now.
  • Fix io.close() for already closed standard output.
  • Fix trace execution and stitching inside vmevent handler (gh-6782).
  • Fixed emit_loadi() on x86/x64 emitting xor between condition check and jump instructions.
  • Fix stack top for error message when raising the OOM error (gh-3840).
  • Disabled math.modf compilation due to its rare usage and difficulties with proper implementation of the corresponding JIT machinery.
  • Fixed inconsistent behaviour on signed zeros for JIT-compiled unary minus (gh-6976).
  • Fixed IR_HREF hash calculations for non-string GC objects for GC64.
  • Fixed assembling of type-check-only variant of IR_SLOAD.
  • Fixed the Lua stack dump command (lj-stack) not working on Python 2. Previously, it used arguments unpacking within the list initialization, which is not supported in Python 2 (gh-7458).

Backported patches from vanilla LuaJIT trunk (gh-8069). In the scope of this activity, the following issues have been resolved:

  • Fixed loop realigment for dual-number mode
  • Fixed os.date() for wider libc strftime() compatibility.

Fiber

  • Fixed the assertion fail in cord_on_yield (gh-6647).

Log

  • Fixed an incorrect facility value in syslog on Alpine (gh-8269).

Build

  • Fixed -Werror build fail on Clang 15 (gh-8110).

2.10.4

1 year ago

Date: 2022-11-11 Tag: 2.10.4

Overview

2.10.4 is the 5th stable version of the 2.10 release series. It introduces 5 improvements and resolves 28 bugs since 2.10.3.

The "stable" label means that we have all planned features implemented and we see no high-impact issues. However, if you encounter an issue, feel free to report it on GitHub.

Compatibility

Tarantool 2.x is backward compatible with Tarantool 1.10.x in the binary data layout, client-server protocol, and replication protocol.

Please upgrade using the box.schema.upgrade() procedure to unlock all the new features of the 2.x series.

Notice. Now the empty string, n, nu, s, and st (that is, leading parts of
num and str) are not accepted as valid field types (gh-5940). Please, read this note if you have suspicions that the issue affects your code.

Functionality added or changed

Core

  • The JSON log format can now be used with the syslog logger (gh-7860).

SQL

  • New rules are applied to determine the type of CASE operation (gh-6990).
  • Now NULLIF() call results have the same type as its first argument (gh-6989).

Build

  • Diagnostics now provide relative file paths instead of absolute ones (gh-7808).
  • Now the compiler info displayed in tarantool.build.compiler and tarantool --version shows the ID and the version of the compiler that was used to build Tarantool. The output has the format ${CMAKE_C_COMPILER_ID}-${CMAKE_C_COMPILER_VERSION}, for example, Clang-14.0.0.14000029 (gh-7888).

Bugs fixed

Core

  • Fixed creation of spaces with a constraint and a foreign key on the same field (gh-7645).
  • Now the same error is returned when a password or a username provided during authorization is incorrect. This prevents user enumeration (ghs-16).
  • Added boundary checking for getenv() return values. Also, for security reasons, Tarantool code now copies these values instead of using them directly (gh-7797).
  • os.getenv() now always returns values of sane size (gh-7797).
  • Fixed the BEGIN, COMMIT, and ROLLBACK counters in the box.stat() output. Now they show the number of started, committed, and rolled back transactions (gh-7583).
  • Fixed a crash that could occur during log rotation and application exit (gh-4450).
  • Fixed a possible buffer overflow in mp_decode_decimal() and decimal_unpack() when an input string was too long (ghs-17).
  • Fixed a bug in the MsgPack library that could lead to a failure to detect invalid MsgPack input and, as a result, an out-of-bounds read (ghs-18).
  • If an error occurs during a snapshot recovery, its log now contains information about the row that caused the error (gh-7917).

Memtx

  • Fixed possible loss of committed tuples in secondary indexes with MVCC transaction manager (gh-7712).
  • Fixed an assertion being triggered on space:drop (gh-7757).
  • Fixed possible violation of the secondary index uniqueness with the transaction manager enabled (gh-7761).

LuaJIT

  • Backported patches from vanilla LuaJIT trunk (gh-7230). In the scope of this activity, the following issues have been resolved:

  • Fix overflow check in unpack() optimized by a compiler.

  • Fix recording of tonumber() with cdata argument for failed conversions (gh-7655).

  • Fix concatenation operation on cdata. It always raises an error now.

  • Fixed the Lua stack dump command (lj-stack) to support Python 2: unpacking arguments within the list initialization is not supported in it (gh-7458).

Lua

  • Fixed a crash in msgpack.decode in case the input string contains an invalid MsgPack header 0xc1 (gh-7818).

SQL

  • Fixed an assertion when INDEXED BY was used with an index that was at least third in a space (gh-5976).
  • Fixed a crash that could occur when selecting tuples with more fields than specified in the space format (gh-5310, gh-4666).
  • Fixed an assertion in JOIN when using an unsupported index (gh-5678).
  • Creating indexes on newly added fields no longer leads to assertions in SELECT queries (gh-5183).
  • Re-running a prepared statement that generates new auto-increment IDs no longer causes an error (gh-6422).
  • An error is now thrown if too many indexes were created in SQL (gh-5526).

Box

  • Revoked execute access rights to the LUA function from the public role (ghs-14).
  • Now the empty string, n, nu, s, and st (that is, leading parts of num and str) are not accepted as valid field types (gh-5940). Consult this notice for details.
  • Fixed a bug when type = box.NULL in key_def.new() resulted in type = 'unsigned' (gh-5222).
  • The _vfunc system space now has the same format as _func (gh-7822).
  • Fixed a crash on recovery from snapshots that don't include system spaces (gh-7800).
  • Fixed a bug that occurred when a foreign key was created together with fields that participate in that foreign key (gh-7652).

Datetime

  • Fixed interval arithmetic for boundaries crossing DST (gh-7700).

    Results of datetime arithmetic operations could get a different timezone if the DST boundary has been crossed during the operation:

    tarantool> datetime.new{year=2008, month=1, day=1,
                            tz='Europe/Moscow'} +
               datetime.interval.new{month=6}
    ---
    - 2008-07-01T01:00:00 Europe/Moscow
    ...
    

    Now we resolve tzoffset at the end of operation if tzindex is not 0.

  • Fixed subtractions for datetimes with different timezones (gh-7698).

    Preivously, the timezone difference (tzoffset) was ignored in datetime subtraction operations:

    tarantool> datetime.new{tz='MSK'} - datetime.new{tz='UTC'}
    ---
    - +0 seconds
    ...
    tarantool> datetime.new{tz='MSK'}.timestamp -
               datetime.new{tz='UTC'}.timestamp
    ---
    - -10800
    ...
    

    Now this difference is accumulated in the minute component of the resulting interval:

    tarantool> datetime.new{tz='MSK'} - datetime.new{tz='UTC'}
    ---
    - -180 minutes
    ...