Top.Mail.Ru
Tarantool 2.2.2 | Tarantool
 
Release notes / Tarantool 2.2.2
Release notes / Tarantool 2.2.2

Tarantool 2.2.2

Tarantool 2.2.2

Date: 2019-12-31 Tag: 2.2.2-0-g0a577ff

2.2.2 is the first stable version of the 2.2 release series. The label stable means we have all planned features implemented and we see no high-impact issues.

This release resolves roughly 75 issues since the latest beta version. There may be bugs in less common areas, please feel free to file an issue at GitHub.

Tarantool 2.x is backward compatible with Tarantool 1.10.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 2.x series.

There are changes labeled with [Breaking change]. It means that the old behaviour was considered error-prone and therefore changed to protect users from unintended mistakes. However, there is a little probability that someone can lean on the old behaviour, and this label is to bring attention to the things that have been changed.

  • [Breaking change] Drop rows_per_wal box.cfg() option in favor of wal_max_size, gh-3762

  • [Breaking change] json and msgpack serializers now raise an error when a depth of data nesting exceeds encode_max_depth option value. The default value of the option is increased from 32 to 128. encode_deep_as_nil option was added to give ability to set the old behaviour back. gh-4434 Note: Those options can be set using json.cfg({<...>}) or msgpack.cfg({<...>}). Note: box data modification functions (insert, replace, update, upsert) follows options of default msgpack serializer instance and now they will raise an error by default on too nested data rather then cut them silently. This behaviour can be configured using msgpack.cfg({<...>}). Note: box.tuple.new(), space:update(), space:upsert() and several other functions did not follow encode_max_depth option, now they do (see also ‘Bug fixes’). Note: json.cfg and msgpack.cfg tables did not updated when an option is changed, now they show actual values (see also ‘Bug fixes’).
  • Show line and column in json.decode() errors, gh-3316
  • Exit gracefully when a main script throws an error: notify systemd, log the error, gh-4382
  • key_def: accept both field and fieldno in key_def.new(<...>), gh-4519. Originally key_def.new(<...>) accepts only fieldno to allow creation with <index_object>.parts as argument. However index definition format (<space_object>.create_index(<...>)) is different and requires field. Now both are supported.
  • Enable __pairs and __ipairs metamethods from Lua 5.2, gh-4560 We still conform Lua 5.1 API, which is not always compatible with Lua 5.2. The change is only about those metamethods.

  • tarantoolctl: allow to start instances with delayed box.cfg{}, gh-4435
  • Add package builds and deployment for the following Linux distros:
    • Ubuntu 19.10 Eoan Ermine, gh-4583
    • CentOS 8, gh-4543
    • Fedora 31, gh-4612

  • Modify type of a binding value in a query response metainformation: always return INTEGER rather then UNSIGNED, even for positive values. This is necessary for consistency with integer literal types. c5246686.
  • Reuse noSQL way to compare floating point values with integral ones. This allows to handle corner cases like SELECT 18446744073709551615.0 > 18446744073709551615 uniformly. 12431ed4.
  • Create or alter of a table with a foreign key may lead to wrong bytecode generation that may cause a crash or wrong result, gh-4495
  • Allow to update a scalar value using SQL in a space that was created from Lua and contains ‘array’, ‘map’ or ‘any’ field, gh-4189 Note: Tarantool/SQL provides operations on scalar types and does not support ‘array’ and ‘map’ per se.
  • INDEXED BY clause now obligates the query planner to choose provided index, 411be0f0
  • Fix dirty memory access when constructing query plan involving search of floating point value in index over integer field, gh-4558

  • Detect a new invalid json path case, gh-4419
  • Randomize the next checkpoint time also after a manual box.snapshot(), gh-4432
  • Fix memory leak in call / eval in the case when a transaction is not committed, gh-4388
  • Eliminate warning re ‘strip_core’ box.cfg option on MacOS and FreeBSD, gh-4464
  • The msgpack serializer that is under box.tuple.new() (called tuple serializer) did not reflect options set by msgpack.cfg({<...>}), part of gh-4434. Aside of box.tuple.new() behaviour itself, it may affect tuple:frommap(), methods of key_def Lua module, tuple and table merger sources, net.box results of :select() and :execute() calls, xlog Lua module.
  • box’s update and upsert now follow msgpack.cfg({encode_max_depth = <...>} option, part of gh-4434
  • fiber: make sure the guard page is created, refuse to create a new fiber otherwise, gh-4541 It is possible in case of heavy memory pressure, say, when there is no resources to split VMAs.
  • recovery: build secondary indices in the hot standby mode without waiting till the main instance termination, gh-4135
  • Fix error message for incorrect return value of functional index extractor function, gh-4553
    • Was: “Key format doesn’t match one defined in functional index ‘’ of space ‘’: supplied key type is invalid: expected boolean’
    • Now: “<…>: expected array”
  • JSON path index did ignore is_nullable property when a space had a format, gh-4520
  • Forbid 00000000-0000-0000-0000-000000000000 as replicaset_uuid and instance_uuid box.cfg({<...>}) options value, gh-4282 It did not work as expected: the nil UUID was treated as absence of a value.
  • Update cache of universe privileges without reconnect, gh-2763
  • net.box: fix memory leak in net_box:connect(<URI>), gh-4588
  • net.box: don’t fire on_connect trigger at schema update, gh-4593. Also don’t fire on_disconnect trigger if a connection never entered into ‘active’ state (e.g. when a first schema fetch is failed).
  • func: fix use after free on function unload, 64f4d06a
  • Fix bootstrap.snap file in order to overcome the following warning, gh-4510 > xlog.c:1934 E> can’t open tx: bootstrap: has some data after eof marker at 5902
  • Don’t destroy a session until box.session.on_disconnect(<...>) triggers will be finished, gh-4627 This means that, say, box.session.id() can be safely invoked from the on_disconnect trigger. Before this change box.session.id() returns garbage (usually 0) after yield in the on_disconnect trigger. Note: tarantool/queue module is affected by this problem in some scenarious. It is especially suggested to update tarantool at least to this release if you’re using this module.
  • func: box.schema.func.drop(<..>) did not unload unused modules, gh-4648. Also box.schema.func.create(<..>) did load of a module again even when another function from the module is loaded.
  • Encode Lua number -2^63 as integer in msgpack.encode() and box’s functions, gh-4672

  • Stop relay on subscribe error, gh-4399
  • Set last_row_time to now in relay_new and relay_start, gh-4431
  • Do not abort replication on ER_UNKNOWN_REPLICA, gh-4455
  • Enter orphan mode on manual replication configuration change, gh-4424
  • Disallow bootstrap of read-only masters, gh-4321
  • Prefer to bootstrap a replica from a fully bootstrapped instance rather than currently bootstrapping one, gh-4527. This change enables the case when two nodes (B, C) are being bootstrapped simultaneously using the one that is already bootstrapped (A), while A is configured to replicate from {B, C} and B from {A, C}.
  • Return immediately from box.cfg{<...>} when an instance is reconfigured with replication_connect_quorum = 0, gh-3760 This change also fixes the behaviour of reconfiguration with non-zero replication_connect_quorum: box.cfg{<...>} returns immediately regardless of whether connections to upstreams are established.
  • Apply replication box.cfg({<...>}) settings in a strict order, gh-4433
  • Auto reconnect a replica if password is invalid, gh-4550
  • box.session.su(<username>) now reports an error correctly for <username> longer then BOX_NAME_MAX, which is 65000, 43e29191 Was: ‘C++ exception’ Now: ‘name length <…> is greater than BOX_NAME_MAX’
  • Use empty password when an URI in box.cfg{replication = <...>} is like login@host:port, gh-4605. The behaviour match net.box’s one now. Explicit login:@host:port was necessary before, otherwise a replica shows the following error: > Missing mandatory field ‘tuple’ in request
  • Fix segfault during replication configuration (box.cfg{replication = <...>} call), gh-4440, gh-4576, gh-4586, gh-4643

  • Fix segfault on ffi.C._say() without filename, gh-4336
  • Fix pwd.getpwall() and pwd.getgrall() hang on CentOS 6 and FreeBSD 12, gh-4428, gh-4447
  • json.encode() now follows encode_max_depth option for arrays that leads to a segfault on recursive Lua tables with numeric keys, gh-4366
  • fio.mktree() now reports an error for existing non-directory file, gh-4439
  • Update json.cfg and msgpack.cfg tables when an option is changed, part of gh-4434
  • Fix handling of a socket read error on the console client (console.connect(<URI>) or tarantoolctl connect/enter <...>), b0b19992
  • Handle ‘not enough memory’ gracefully when it is raised from lua_newthread(), gh-4556 There are several places where a new Lua thread is created:
    • Start execution a Lua function call or an eval request (from a binary protocol, SQL or with box.func.<...>:call()).
    • Create of a new fiber.
    • Start execution of a trigger.
    • Start of encoding into a YAML format (yaml.encode()).
  • Fix stack-use-after-scope in json.decode(), gh-4637

  • Use bundled libcurl rather than system-wide by default, gh-4318, gh-4180, gh-4288, gh-4389, gh-4397 This closes several known problems that were fixed in recent libcurl versions, including segfaults, hangs, memory leaks and performance problems.
  • Disable verbose mode when {verbose = false} is passed, 5f3d9015
  • Fix assertion fail after curl write error, gh-4232

The new Lua output format is still in the alpha stage and has known flaws, but we are working to make it rich and stable.

  • Output box.NULL as "box.NULL" rather then "cdata<void *>: NULL", part of gh-3834 (in quotes for now, yes, due to gh-4585)
  • Add semicolon (;) as responses delimiter (EOS, end of stream/statement), analogue of YAMLs end-of-document (...) marker. This is vital for remote clients to determine an end of a particular response, part of gh-3834.
  • Fix hang in the console client (console.connect(<URI>) or tarantoolctl connect/enter <...>) after \set output lua[,block] command, part of gh-3834. In order to overcome it two changes were made:
    • Parse \set output lua[,block] command on a client prior to sending it to a server, store current responses delimiter (EOS) and use it to determine end of responses.
    • Send \set output <...> command with a default output mode when establishing a connection (it is matter if different default modes are set).
  • Provide ability to get or set current responses delimiter using console.eos([<...>]), part of gh-3834

  • Fix fold machinery misbehaves, gh-4376
  • Fix for debug.getinfo(1,'>S'), gh-3833
  • Fix string.find recording, gh-4476
  • Fixed ‘Data segment size exceeds process limit’ error on FreeBSD/x64: do not change resource limits when it is not necessary, gh-4537
  • fold: keep type of emitted CONV in sync with its mode, LuaJIT#524 This fixes the following assertion fail: > asm_conv: Assertion `((IRType)((ir->t).irt & IRT_TYPE)) != st’ failed

  • Support systemd’s NOTIFY_SOCKET on OS X, gh-4436
  • Fix linking with static openssl library, gh-4437
  • Get rid of warning re empty NOTIFY_SOCKET variable, gh-4305
  • rocks: fix ‘invalid date format’ error when installing a packed rock, gh-4481
  • Remove libyaml from rpm/deb dependencies, because we use bunbled version of libyaml for the packages (since 2.2.1), gh-4442
  • Fix boolean CLI options handling in tarantoolctl cat <...>, such as --show-system, gh-4076
  • Fix segfault (out of bounds access) when unwinding error occurs at backtrace printing, gh-4636 Backtrace is printed on SIGFPE and SIGSEGV signal or when LuaJIT find itself in unrecoverable state (lua_atpanic()).

  • Fix for GCC 4.8.5, which is default version on CentOS 7, gh-4438
  • Fix OpenSSL linking problems on FreeBSD, gh-4490
  • Fix linking problems on Mac OS when several toolchains are in PATH, gh-4587
  • Fix GCC 9 warning on strncpy(), gh-4515