Tarantool 2.8.1
Released on 2021-04-21.
- Release v. 2.8.1.
- Tagged
2.8.1-0-ge2a1ec0.
2.8.1 is the beta version of the 2.8 release series.
This release introduces 28 new features and resolves 31 bugs since version 2.7.2. There can be bugs in less common areas. If you find any, feel free to report an issue on GitHub.
Notable changes are:
- Tarantool is now able to set multiple iproto threads.
- Setting
box.cfgoptions with environment variables. - The new
box.ctl.promote()function and the concept of manual elections. - Enhancements in the Lua memory profiler.
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.
The
exclude_nulloption can now be used in the index part definition. With this option, the index filters and doesn’t store tuples with “null” value of the corresponding part (gh-4480).For example, an index created with
s:create_index('sk', {parts={{2, 'number', exclude_null=true}}})will ignore tuples{1, null}and{2, null}, but will not ignore{null, 1}or{1, 1}.Added a
slab_alloc_granularityoption tobox.cfg{}. This option allows user to set multiplicity of memory allocation in a small allocator. The value ofslab_alloc_granularitymust be exponent of two and >= 4 (gh-5518).Previously, Lua
on_shutdowntriggers started sequentially. Now each trigger starts in a separate fiber. By default, Tarantool waits for the triggers to finish for 3.0 seconds. User has the option to change this value using the newbox.ctl.set_on_shutdown_timeoutfunction.When the timeout expires, Tarantool stops immediately without waiting for the other triggers to finish.
Tarantool module developers can now register functions to call when Tarantool stops with the new
on_shutdownAPI, (gh-5723). Read more: Function on_shutdown.Introduced the concept of WAL queue and the new configuration option
wal_queue_max_size, measured in bytes. The default value is 16 Mb. The option helps limit the pace at which replica submits new transactions to the WAL. The limit is checked every time a transaction from the master is submitted to the replica’s WAL. The space taken by the transaction is considered empty once it’s successfully written (gh-5536).The information about the state of synchronous replication is now available via the
box.info.synchrointerface (gh-5191).Tarantool can now run multiple iproto threads. It is useful in some specific workloads where iproto thread is the bottleneck of throughput (gh-5645).
Update operations can’t insert with gaps. This patch changes the behavior so that the update operation fills the missing fields with nulls (gh-3378).
The new
box.libmodule allows loading and executing C stored procedures on read-only nodes (gh-4642).Configuration options in
box.cfgcan now be defined with environment variables (gh-5602).The priority of sources of configuration options is the following, from higher to lower:
box.cfg{},- environment variables,
tarantoolctloptions,- default values,
Introduced the
box.ctl.promote()function and the concept of manual elections (enabled withelection_mode='manual') (gh-3055).Once the instance is in the
manualelection mode, it acts like avotermost of the time, but may trigger elections and become a leader whenbox.ctl.promote()is called. Whenelection_mode ~= 'manual',box.ctl.promote()replacesbox.ctl.clear_synchro_queue(), which is now deprecated.
The output of LuaJIT memory profiler parser has become more user-friendly (gh-5811). Now the source line definition where the event occurs is much clearer: it only shows the source file name and allocation-related line, and omits the line number of the function definition. Moreover, event-related statistics are now indicated with units.
Breaking change: Line info of the line function definition is now saved in symbol info table by field
linedefined. The fieldnamehas been renamed tosourcewith respect to the Lua Debug API.A number of improvements in the memory profiler parser:
- The parser now reports heap difference which occurs during the measurement interval (gh-5812).
- Use the option
--leak-onlyto show only the heap difference. - New built-in module
memprof.processperforms post-processing and aggregation of memory events.
Run the memory profiler with the following command:
tarantool -e 'require("memprof")(arg)' - --leak-only /tmp/memprof.bin
- New tooling for collecting crash artefacts and postmortem analysis (gh-5569).
- Tarantool build infrastructure now requires CMake version 3.2 or later.
- Binary packages for Fedora 33 are now available (gh-5502).
- Binary packages for CentOS 6 and Debian Jessie won’t be published since this version.
- RPM and DEB packages no longer have the
autotoolsdependency (follows up gh-4968). - Regular testing on MacOS 10.13 has been disabled, effectively stopping the support of this version.
- The built-in
zstdis upgraded from v1.3.3 to v1.4.8 (part of gh-5502). - SMTP and SMTPS protocols are now enabled in the bundled
libcurl(gh-4559). - The
libcurlheaders are now shipped to system path${PREFIX}/include/tarantoolwhenlibcurlis included as a bundled library or in a static build (gh-4559).
- Tarantool CI/CD has migrated to GitHub Actions (gh-5662).
- Single node Jepsen testing now runs on per-push basis (gh-5736).
- Fuzzing tests now continuously run on per-push basis (gh-1809).
- A self-sufficient LuaJIT testing environment has been implemented. As a result, LuaJIT build system is now partially ported to CMake and all testing machinery is enclosed within the tarantool/luajit repository (gh-4862, gh-5470).
- Python 3 is now the default in the test infrastructure (gh-5652).
- The index part options are no longer skipped when the field type is not specified (gh-5674).
- The
lbox_ctl_is_recovery_finished()function no longer returnstruewhen recovery is still in progress. - A memory corruption bug has been fixed in netbox.
The memory of a struct error which is still used will no longer be freed prematurely
because of the wrong order of
ffi.gcandffi.castcalls. - Relay can no longer time out while a replica is joining or syncing with the master. (gh-5762).
- An issue with missing “path” value of index schema fetched by netbox has been fixed (gh-5451).
- Extensive usage of
urianduuidmodules with debug log level no longer leads to crashes or corrupted results of the functions from these modules. Same problem is resolved for using these modules from the callbacks passed toffi.gc(), and for some functions from the modulesfio,box.tuple, andiconv(gh-5632). - The new
wal_cleanup_delayoption can prevent early cleanup of*.xlogfiles, needed by replicas. Such cleanup used to result in aXlogGapError(gh-5806). - Appliers will no longer cause errors with
Unknown request type 40during a final join when the master has synchronous spaces (gh-5566). - Fixed a crash which occurred when reloading a compiled module when the new module lacked some of the functions which were present in the former code. This event triggered a fallback procedure where Tarantool restored old functions, but instead of restoring each function it only processed a sole entry, leading to a crash later when these restored functions were called (gh-5968).
- Added memtx MVCC tracking of read gaps which fixes the problem of phantom reads (gh-5628).
- Fixed the wrong result of using
space:count()with memtx MVCC (gh-5972). - Fixed the dirty read after restart while using MVCC with synchronous replication (gh-5973).
- Fixed an issue with an applier hanging on a replica after failing to process
a
CONFIRMorROLLBACKmessage coming from a master. - Fixed the issue where master did not send some rows to an anonymous replica which had fallen behind and was trying to register.
- Fixed the bug when a synchronous transaction could be confirmed and
visible on a replica, but then not confirmed or invisible again after
restart. It was more likely to happen on memtx spaces with
memtx_use_mvcc_engineenabled (gh-5213). - Fixed the recovery of a rolled back multi-statement synchronous transaction which could lead to the transaction being applied partially, and to recovery errors. It happened in case the transaction worked with non-sync spaces (gh-5874).
- Fixed a bug in synchronous replication when rolled back transactions could reappear after reconnecting a sufficiently old instance (gh-5445).
- Fixed an issue where
<swim_instance>:broadcast()did not work on non-local addresses and spammed “Permission denied” errors to the log. After instance termination it could return a non-0 exit code even if there were no errors in the script, and then spam the same error again (gh-5864). - Fixed the crash on attempts to call
swim:member_by_uuid()with no arguments or withnil/box.NULL(gh-5951). - Fixed the crash on attempts to pass an object of a wrong type to
__serializemethod of a swim member in Lua (gh-5952).
- Fixed the
-eoption, whentarantoolused to enter the interactive mode when stdin is a TTY. Now,tarantool -e "print('Hello')")doesn’t enter the interactive mode, but just prints “Hello” and exits (gh-5040). - Fixed a leak of a tuple object in
key_def:compare_with_key(tuple, key), which had occurred when the serialization of the key failed (gh-5388).
- The string received by a user-defined C or Lua function will no longer be
different from the string passed to the function. This could happen
when the string passed from SQL had contained
\\0(gh-5938). SQL SELECTorSQL UPDATEonUUIDorDECIMALfield will not cause a SEGMENTATION FAULT anymore (gh-5011, gh-5704, gh-5913).- Fixed an issue with wrong results of
SELECTwithGROUP BYwhich occurred when one of the selected values wasVARBINARYand not directly obtained from the space (gh-5890).
Fix building on FreeBSD (incomplete definition of type
struct sockaddr) (gh-5748).The already downloaded static build dependencies will not be fetched repeatedly (gh-5761).
Recovering with
force_recoveryoption now deletes vylog files which are newer than the snapshot. It helps an instance recover after incidents during a checkpoint (gh-5823).Fixed the
libcurlconfiguring when Tarantool itself has been configured withcmake3command and there was nocmakecommand in thePATH(gh-5955).This affects building Tarantool from sources with bundled
libcurl(it is the default mode).