Tarantool 2.10.0-rc1
Released on 2022-04-25.
- Release: v. 2.10.0-rc1.
- Tag:
2.10.0-rc1
.
2.10.0-rc1 is the RC version of the 2.10 release series.
This release introduces 99 new features and resolves 126 bugs since the 2.8 version. There can be bugs in less common areas. If you find any, feel free to report an issue on GitHub.
Notable changes are:
- HTTP client now supports HTTP/2.
- Support of the new DATETIME type.
- Improved type consistency in SQL.
- Added transaction isolation levels.
- Implemented fencing and pre-voting in RAFT.
- Introduced foreign keys and constraints.
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.
Some changes are labeled as [Breaking change]. It means that the old behavior was considered error-prone and therefore changed to protect users from unintended mistakes. However, there is a small probability that someone can rely on the old behavior, and this label is to bring attention to the things that have been changed.
Field type
UUID
is now a part of field typeSCALAR
(gh-6042).Field type
UUID
is now available in SQL, and a newUUID
can be generated using the new SQL built-inuuid()
function (gh-5886).[Breaking change]
timeout()
method ofnet.box
connection, which was marked deprecated more than four years ago (in 1.7.4), was dropped, because it negatively affected performance of hotnet.box
methods, likecall()
andselect()
, in case those were called without specifying a timeout (gh-6242).Improved
net.box
performance by up to 70% by rewriting hot code paths in C (gh-6241).Introduced compact tuples that allow saving 4 bytes per tuple in case of small userdata (gh-5385).
Streams and interactive transactions over streams are implemented in iproto. A stream is associated with its ID, which is unique within one connection. All requests with the same not zero stream ID belong to the same stream. All requests in the stream are processed synchronously. The execution of the next request will not start until the previous one is completed. If a request has zero stream ID, it does not belong to a stream and is processed in the old way.
In
net.box
, a stream is an object above connection that has the same methods but allows to execute requests sequentially. ID is generated automatically on the client side. If users write their own connector and want to use streams, they must transmit stream_id over iproto protocol. The main purpose of streams is transactions via iproto. Each stream can start its own transaction, allowing multiplexing several transactions over one connection. There are multiple ways to begin, commit and rollback a transaction: using appropriate stream methods, usingcall
oreval
methods or usingexecute
method with SQL transaction syntax. Users can mix these methods, for example, start a transaction usingstream:begin()
, and commit a transaction usingstream:call('box.commit')
orstream:execute('COMMIT')
.If any request fails during the transaction, it will not affect the other requests in the transaction. If a disconnect occurs when there is some active transaction in the stream, this transaction will be rolled back if it does not have time to commit before this moment.
Added new
memtx_allocator
option tobox.cfg{}
that allows to select the appropriate allocator for memtx tuples if necessary. Possible values aresystem
for malloc allocator andsmall
for default small allocator.Implemented system allocator, based on malloc: slab allocator that is used for tuples allocation has a certain disadvantage—it tends to unresolvable fragmentation on certain workloads (size migration). In this case, a user should be able to choose another allocator. System allocator based on malloc function, but restricted by the same quota as slab allocator. System allocator does not alloc all memory at start. Instead, it allocates memory as needed, checking that quota is not exceeded (gh-5419).
Added
box.stat.net.thread()
for reporting per thread net statistics (gh-6293).Added the new
STREAMS
metric tobox.stat.net
that contains statistics for iproto streams.STREAMS
contains same counters asCONNECTIONS
metric inbox.stat.net
: current, rps, and total (gh-6293).Extended the network protocol (IPROTO) with a new request type (
IPROTO_ID
) that is supposed to be used for exchanging sets of supported features between server and client (gh-6253).Added
required_protocol_version
andrequired_protocol_features
tonet.box
connection options. The new options allow to specify the IPROTO protocol version and features that must be supported by the server for the connection to pass (gh-6253).[Breaking change] Added
msgpack.cfg.encode_error_as_ext
configuration option to enable/disable encoding errors asMP_ERROR
MsgPack extension. The option is enabled by default (gh-6433).[Breaking change] Removed
box.session.setting.error_marshaling_enabled
. Error marshalling is now enabled automatically if the connector supports it (gh-6428).Added new metrics
REQUESTS_IN_PROGRESS
andREQUESTS_IN_STREAM_QUEUE
tobox.stat.net
that contains detailed statistics for iproto requests. These metrics contain same counters as other metrics inbox.stat.net
: current, rps, and total (gh-6293).Implemented a timeout for
fiber:join
in Lua (gh-6203).Updated libev to version 4.33 (gh-4909).
Added the new
box.txn_id()
function that returns the id of the current transaction if called within a transaction, nil otherwise.Previously, if a yield occurs for a transaction that does not support it, we roll back all its statements but still process its new statements (they will roll back with each yield). Also, the transaction will be rolled back when a commit is attempted. Now we stop processing any new statements right after the first yield if a transaction does not support it.
Implemented a timeout for transactions after which they are rolled back (gh-6177).
Implemented new C API function
box_txn_set_timeout
to set a timeout for transactions.Implemented a timeout for iproto transactions after which they are rolled back (gh-6177).
Implemented new
IPROTO_TIMEOUT 0x56
key, which is used to set a timeout for transactions over iproto streams. It is stored in the body ofIPROTO_BEGIN
request.Introduced
box.broadcast
andbox.watch
functions to signal/watch user-defined state changes (gh-6257).Added watchers support to the network protocol (gh-6257).
Added watchers support to the
net.box
connector (gh-6257).Error objects with the code
box.error.READONLY
now have additional fields explaining why the error happened.Also, there is a new field
box.info.ro_reason
. It isnil
on a writable instance, but reports a reason whenbox.info.ro
is true (gh-5568).Implemented the ability to open several listening sockets. In addition to the ability to pass uri as a number or string, added the ability to pass uri as a table of numbers or strings (gh-3554).
[Breaking change]
net.box
console support, which was marked deprecated in 1.10, was dropped. Userequire('console').connect()
instead.Added
takes_raw_args
Lua function option for wrapping arguments inmsgpack.object
to skip decoding (gh-3349).Implemented the graceful shutdown protocol for IPROTO connections (gh-5924).
Added
fetch_schema
flag tonetbox.connect
to control schema fetching from remote instance (gh-4789).Added linking type (dynamic or static) to Tarantool build info.
Changed log level of some information messages from critical to info (gh-4675).
Added predefined system events:
box.status
,box.id
,box.election
, andbox.schema
(gh-6260).Introduced transaction isolation levels in Lua and IPROTO (gh-6930).
Added support for backtrace feature on AARCH64 architecture (gh-6060).
Implemented collection of parent backtrace for the newly created fibers. To enable the feature, call
fiber.parent_backtrace_enable
. To disable it, callfiber.parent_backtrace_disable
: disabled by default (gh-4302).
- Introduced memtx MVCC memory monitoring (gh-6150).
- Disabled the deferred
DELETE
optimization in Vinyl to avoid possible performance degradation of secondary index reads. Now, to enable the optimization, one has to set thedefer_deletes
flag in space options (gh-4501).
- Introduced
box.info.replication[n].downstream.lag
field to monitor state of replication. This member represents a lag between the main node writing a certain transaction to its own WAL and a moment it receives an ack for this transaction from a replica (gh-5447). - Introduced
on_election
triggers. The triggers may be registered viabox.ctl.on_election()
interface and are run asynchronously each timebox.info.election
changes (gh-5819). - It is now possible to decode incoming replication data in a separate
thread. Added the
replication_threads
configuration option that controls how many threads may be spawned to do the task (default is 1) (gh-6329).
- Added
term
field tobox.info.synchro.queue
. It contains term of the lastPROMOTE
. It is usually equal tobox.info.election.term
but may be less than election term when the new round of elections started, but no one promoted yet. - Servers with elections enabled won’t start new elections as long as at least one of their peers sees the current leader. They also won’t start the elections when they don’t have a quorum of connected peers. This should reduce cases when a server which has lost connectivity to the leader disrupts the whole cluster by starting new elections (gh-6654).
- Added the
leader_idle
field tobox.info.election
table. The value shows time in seconds since the last communication with a known leader (gh-6654).
Introduced support for
LJ_DUALNUM
mode inluajit-gdb.py
(gh-6224).Introduced preliminary support of GNU/Linux ARM64 and MacOS M1. In the scope of this activity, the following issues have been resolved:
- Introduced support for a full 64-bit range of lightuserdata values (gh-2712).
- Fixed memory remapping issue when the page leaves 47-bit segments.
- Fixed M1 architecture detection (gh-6065).
- Fixed variadic arguments handling in FFI on M1 (gh-6066).
- Fixed
table.move
misbehavior when table reallocation occurs (gh-6084). - Fixed Lua stack inconsistency when xpcall is called with an invalid second argument on ARM64 (gh-6093).
- Fixed
BC_USETS
bytecode semantics for closed upvalues and gray strings. - Fixed side exit jump target patching considering the range values of the particular instruction (gh-6098).
- Fixed current Lua coroutine restoring on an exceptional path on ARM64 (gh-6189).
Now, memory profiler records allocations from traces grouping them by the trace number (gh-5814). The memory profiler parser can display the new type of allocation sources in the following format:
| TRACE [<trace-no>] <trace-addr> started at @<sym-chunk>:<sym-line>
Now the memory profiler reports allocations made by the JIT engine while compiling the trace as INTERNAL (gh-5679).
Now the memory profiler emits events of the new type when a function or a trace is created. As a result the memory profiler parser can enrich its symbol table with the new functions and traces (gh-5815).
Furthermore, there are symbol generations introduced within the internal parser structure to handle possible collisions of function addresses and trace numbers.
Now the memory profiler dumps symbol table for C functions. As a result memory profiler parser can enrich its symbol table with C symbols (gh-5813). Furthermore, now memory profiler dumps special events for symbol table when it encounters a new C symbol, that has not been dumped yet.
Introduced the LuaJIT platform profiler (gh-781) and the profile parser. This profiler is able to capture both host and VM stacks, so it can show the whole picture. Both C and Lua API’s are available for the profiler. Profiler comes with the default parser, which produces output in a
flamegraph.pl
-suitable format. The following profiling modes are available:- Default: only virtual machine state counters.
- Leaf: shows the last frame on the stack.
- Callchain: performs a complete stack dump.
Introduced the new method
table.equals
. It compares two tables by value with respect to the__eq
metamethod.Added support of console autocompletion for
net.box
objectsstream
andfuture
(gh-6305).Added
box.runtime.info().tuple
metric to track the amount of memory occupied by tuples allocated on runtime arena (gh-5872).It does not count tuples that arrive from memtx or vinyl but counts tuples created on-the-fly: say, using
box.tuple.new(<...>)
.
Added a new builtin module
datetime.lua
that allows to operate timestamps and intervals values (gh-5941).Added the method to allow converting string literals in extended iso-8601 or rfc3339 formats (gh-6731).
Extended the range of supported years in all parsers to cover fully -5879610-06-22..5879611-07-11 (gh-6731).
Datetime interval support has been reimplemented in C to make possible future Olson/tzdata and SQL extensions (gh-6923);
Now all components of the interval values are kept and operated separately (i.e. years, months, weeks, days, hours, seconds, and nanoseconds). This allows to apply date/time arithmetic correctly when we add or subtract intervals to datetime values.
Extended datetime literal parser with the ability to handle known timezone abbreviations (i.e. ‘MSK’, ‘CET’, etc.) which are deterministically translated to their offset (gh-5941, gh-6751).
Timezone abbreviations can be used in addition to the timezone offset in the datetime literals, e.g. these literals produce equivalent datetime values:
local date = require('datetime') local d1 = date.parse('2000-01-01T02:00:00+0300') local d2 = date.parse('2000-01-01T02:00:00 MSK') local d3 = date.parse('2000-01-01T02:00:00 MSK', {format = '%FT%T %Z'})
Parser fails if one uses ambiguous names (e.g. ‘AT’) which could not be directly translated into timezone offsets.
- Introduced new hash types in digest module—
xxhash32
andxxhash64
(gh-2003).
- Introduced
fiber_object:info()
to getinfo
from fiber. Works asrequire('fiber').info()
but only for one fiber. - Introduced
fiber_object:csw()
to getcsw
from fiber (gh-5799). - Changed
fiber.info()
to hide backtraces of idle fibers (gh-4235). - Improved fiber
fiber.self()
,fiber.id()
andfiber.find()
performance by 2-3 times.
Implemented support of symbolic log levels representation in
log
module (gh-5882). Now it is possible to specify levels the same way as in thebox.cfg{}
call.For example, instead of
require('log').cfg{level = 6}
one can use
require('log').cfg{level = 'verbose'}
- Added
return_raw
net.box option for returningmsgpack.object
instead of decoding the response (gh-4861).
- Descriptions of type mismatch error and inconsistent type error became more informative (gh-6176).
- Removed explicit cast from
BOOLEAN
to numeric types and vice versa (gh-4770). - Removed explicit cast from
VARBINARY
to numeric types and vice versa (gh-4772, :tarantool-issue:`5852). - Fixed a bug due to which a string that is not
NULL
-terminated could not be cast toBOOLEAN
, even if the conversion would be successful according to the rules. - Now, a numeric value can be cast to another numeric type only if the
cast is precise. In addition, a
UUID
value cannot be implicitly cast toSTRING
/VARBINARY
. Also, aSTRING
/VARBINARY
value cannot be implicitly cast to aUUID
(gh-4470). - Now any number can be compared to any other number, and values of any scalar type can be compared to any other value of the same type. A value of a non-numeric scalar type cannot be compared with a value of any other scalar type (gh-4230).
- SQL built-in functions were removed from the
_func
system space (gh-6106). - Functions are now looked up first in SQL built-in functions and then in user-defined functions.
- Fixed incorrect error message in case of misuse of the function used to set the default value.
- The
typeof()
function withNULL
as an argument now returnsNULL
(gh-5956). - The
SCALAR
andNUMBER
types have been reworked in SQL. NowSCALAR
values cannot be implicitly cast to any other scalar type, andNUMBER
values cannot be implicitly cast to any other numeric type. This means that arithmetic and bitwise operations and concatenation are no longer allowed forSCALAR
andNUMBER
values. In addition, anySCALAR
value can now be compared with values of any other scalar type using theSCALAR
rules (gh-6221). - Field type
DECIMAL
is now available in SQL. Decimal can be implicitly cast to and fromINTEGER
andDOUBLE
, it can participate in arithmetic operations and comparison betweenDECIMAL
, and all other numeric types are defined (gh-4415). - The argument types of SQL built-in functions are now checked in most cases during parsing. In addition, the number of arguments is now always checked during parsing (gh-6105).
DECIMAL
values can now be bound in SQL (gh-4717).- A value consisting of digits and a decimal point is now parsed as
DECIMAL
(gh-6456). - Field type
ANY
is now available in SQL (gh-3174). - Built-in SQL functions now work correctly with
DECIMAL
values (gh-6355). - The default type is now defined in case the argument type of SQL built-in function cannot be determined during parsing (gh-4415).
- Field type
ARRAY
is now available in SQL. The syntax has also been implemented to allow the creation ofARRAY
values (gh-4762). - User-defined aggregate functions are now available in SQL (gh-2579).
- Introduced SQL built-in functions
NOW()
andDATE_PART()
(gh-6773). - The left operand is now checked before the right operand in an arithmetic operation. (gh-6773).
- Field type
INTERVAL
is introduced to SQL (gh-6773). - Bitwise operations can now only accept
UNSIGNED
and positiveINTEGER
values (gh-5364).
- Public role now has read, write access on
_session_settings
space (gh-6310). - Field type
INTERVAL
is introduced toBOX
(gh-6773). - The behavior of empty or nil
select
calls on user spaces was changed. A critical log entry containing the current stack traceback is created upon such function calls. The user can explicitly request a full scan though by passingfullscan=true
toselect
’soptions
table argument, in which case a log entry will not be created (gh-6539).
- Previously csw (Context SWitch) of a new fiber could be more than 0, now it is always 0 (gh-5799).
- Set
FORCE_CONFIG=false
for luarocks config to allow loading project-side.rocks/config-5.1.lua
.
- Reduced snapshot verbosity (gh-6620).
- Support fedora-34 build (gh-6074).
- Stopped support fedora-28 and fedora-29.
- Stopped support of Ubuntu Trusty (14.04) (gh-6502).
- Bumped Debian package compatibility level to 10 (gh-5429).
- Bumped minimal required debhelper to version 10 (except for Ubuntu Xenial).
- Removed Windows binaries from Debian source packages (gh-6390).
- Bumped Debian control Standards-Version to 4.5.1 (gh-6390).
- Added bundling of libnghttp2 for bundled libcurl to support HTTP/2 for http client. The CMake version requirement is updated from 3.2 to 3.3.
- Support fedora-35 build (gh-6692).
- Added bundling of GNU libunwind to support backtrace feature on AARCH64 architecture and distributives that don’t provide libunwind package.
- Re-enabled backtrace feature for all RHEL distributions by default, except for AARCH64 architecture and ancient GCC versions, which lack compiler features required for backtrace (gh-4611).
- Updated
libicu
version to 71.1 for static build. - Bumped OpenSSL from 1.1.1f to 1.1.1n for static build (gh-6947).
[Breaking change]
fiber.wakeup()
in Lua andfiber_wakeup()
in C became NOP on the currently running fiber.Previously they allowed ignoring the next yield or sleep, which resulted in unexpected erroneous wake-ups. Calling these functions right before
fiber.create()
in Lua orfiber_start()
in C could lead to a crash (in debug build) or undefined behaviour (in release build) (gh-6043).There was a single use case for that—reschedule in the same event loop iteration which is not the same as
fiber.sleep(0)
in Lua andfiber_sleep(0)
in C. It could be done in the following way:in C:
fiber_wakeup(fiber_self()); fiber_yield();
in Lua:
fiber.self():wakeup() fiber.yield()
To get the same effect in C, one can use
fiber_reschedule()
. In Lua, it is now impossible to reschedule the current fiber directly in the same event loop iteration. One can reschedule self through a second fiber, but it is strongly discouraged:local self = fiber.self() fiber.new(function() self:wakeup() end) fiber.sleep(0)
Fixed memory leak on each
box.on_commit()
andbox.on_rollback()
(gh-6025).Fixed the lack of testing for non-joinable fibers in
fiber_join()
call. This could lead to unpredictable results. Note the issue affects C level only, in Lua interfacefiber:join()
the protection is turned on already.Now Tarantool yields when scanning
.xlog
files for the latest applied vclock and when finding the right place in.xlog
s to start recovering. This means that the instance is responsive right afterbox.cfg
call even when an empty.xlog
was not created on the previous exit. Also, this prevents the relay from timing out when a freshly subscribed replica needs rows from the end of a relatively long (hundreds of MBs).xlog
(gh-5979).The counter in
x.yM rows processed
log messages does not reset on each new recoveredxlog
anymore.Fixed wrong type specification when printing fiber state change which led to negative fiber’s ID logging (gh-5846).
For example,
main/-244760339/cartridge.failover.task I> Instance state changed
instead of proper
main/4050206957/cartridge.failover.task I> Instance state changed
Fiber IDs were switched to monotonically increasing unsigned 8-byte integers so that there wouldn’t be IDs wrapping anymore. This allows to detect fiber’s precedence by their IDs if needed (gh-5846).
Fixed a crash in JSON update on tuple/space when it had more than one operation, they accessed fields in reversed order, and these fields did not exist. Example:
box.tuple.new({1}):update({{'=', 4, 4}, {'=', 3, 3}})
(gh-6069).Fixed invalid results produced by the
json
module’sencode
function when it was used from Lua’s garbage collector. For instance, in functions used asffi.gc()
(gh-6050).Added check for user input of the number of iproto threads—value must be > 0 and less than or equal to 1000 (gh-6005).
Fixed error related to the fact that if a user changed the listen address, all iproto threads closed the same socket multiple times.
Fixed error related to Tarantool not deleting the unix socket path when finishing work.
Fixed a crash in MVCC during simultaneous update of a key in different transactions (gh-6131).
Fixed a bug when memtx MVCC crashed during reading uncommitted DDL (gh-5515).
Fixed a bug when memtx MVCC crashed if an index was created in the transaction (gh-6137).
Fixed segmentation fault with MVCC when an entire space was updated concurrently (gh-5892).
Fixed a bug with failed assertion after stress update of the same key (gh-6193).
Fixed a crash that happened when a user called
box.snapshot
during an incomplete transaction (gh-6229).Fixed console client connection breakage if request times out (gh-6249).
Added missing broadcast to
net.box.future:discard()
so that now fibers waiting for a request result are woken up when the request is discarded (gh-6250).box.info.uuid
,box.info.cluster.uuid
, andtostring(decimal)
with any decimal number in Lua sometimes could return garbage if__gc
handlers were used in the user’s code (gh-6259).Fixed the error message that happened in a very specific case during MVCC operation (gh-6247).
Fixed a repeatable read violation after delete (gh-6206).
Fixed a bug when hash
select{}
was not tracked by MVCC engine (gh-6040).Fixed a crash in MVCC after the drop of a space with several indexes (gh-6274).
Fixed a bug when GC at some state could leave tuples in secondary indexes (gh-6234).
Disallowed yields after DDL operations in MVCC mode. It fixes a crash which takes place in case several transactions refer to system spaces (gh-5998).
Fixed a bug in MVCC connected which happened on a rollback after DDL operation (gh-5998).
Fixed a bug when rollback resulted in unserializable behaviour (gh-6325).
At the moment, when a
net.box
connection is closed, all requests that have not been sent will be discarded. This patch fixes this behavior: all requests queued for sending before the connection is closed are guaranteed to be sent (gh-6338).Fixed a crash during replace of malformed tuple into
_schema
system space (gh-6332).Fixed dropping incoming messages when the connection is closed or
SHUT_RDWR
received andnet_msg_max
or readahead limit is reached (gh-6292).Fixed memory leak in case of replace during background alter of the primary index (gh-6290).
Fixed a bug when rolled back changes appear in the built-in-background index (gh-5958).
Fixed a crash while encoding an error object in the MsgPack format (gh-6431).
Fixed a bug when an index was inconsistent after background build in case the primary index was hash (gh-5977).
Now inserting a tuple with the wrong
id`
field into the_priv
space returns the correct error (gh-6295).Fixed dirty read in MVCC after space alter (gh-6263, gh-6318).
Fixed a crash in case the fiber changing
box.cfg.listen
is woken up (gh-6480).Fixed
box.cfg.listen
not reverted to the old address in case the new one is invalid (gh-6092).Fixed a crash caused by a race between
box.session.push()
and closing connection (gh-6520).Fixed a bug because of which the garbage collector could remove an
xlog
file that was still in use (gh-6554).Fixed crash during granting privileges from guest (gh-5389).
Fixed an error in listening when the user passed uri in numerical form after listening unix socket (gh-6535).
Fixed a crash that could happen in case a tuple is deleted from a functional index while there is an iterator pointing to it (gh-6786).
Fixed memory leak in interactive console (gh-6817).
Fixed an assertion fail when passing a tuple without primary key fields to
before_replace
trigger. Now tuple format is checked before execution ofbefore_replace
triggers and after each one (gh-6780).Banned DDL operations in space
on_replace
triggers, since they could lead to a crash (gh-6920).Implemented constraints and foreign keys. Now users can create function constraints and foreign key relations (gh-6436).
Fixed a bug due to which all fibers created with
fiber_attr_setstacksize()
leaked until the thread exit. Their stacks also leaked except whenfiber_set_joinable(..., true)
was used.Fixed a crash in MVCC related to a secondary index conflict (gh-6452).
Fixed a bug which resulted in wrong space count (gh-6421).
SELECT
in RO transaction now reads confirmed data, like a standalone (autocommit)SELECT
does (gh-6452).Fixed a crash when Tarantool was launched with multiple
-e
or-l
options without a space between the option and the value (gh-5747).Fixed effective session and user not propagated to
box.on_commit
andbox.on_rollback
trigger callbacks (gh-7005).Fixed usage of
box.session.peer()
inbox.session.on_disconnect()
trigger. Now, it’s safe to assume thatbox.session.peer()
returns the address of the disconnected peer, not nil, as it used to (gh-7014).Fixed creation of a space with a foreign key pointing to the same space (gh-6961).
Fixed a bug when MVCC failed to track nothing-found range
select
(gh-7025).Allowed complex foreign keys with null fields (gh-7046).
Added decoding of election messages:
RAFT
andPROMOTE
toxlog
Lua module (gh-6088). Otherwisetarantoolctl
shows plain number intype
HEADER: lsn: 1 replica_id: 4 type: 31 timestamp: 1621541912.4592
instead of symbolic representation
HEADER: lsn: 1 replica_id: 4 type: PROMOTE timestamp: 1621541912.4592
[Breaking change] Return value signedness of 64-bit time functions in
clock
andfiber
was changed fromuint64_t
toint64_t
both in Lua and C (gh-5989).
- Fixed possible keys divergence during secondary index build, which might lead to missing tuples (gh-6045).
- Fixed the race between Vinyl garbage collection and compaction that resulted in a broken vylog and recovery failure (gh-5436).
- Immediate removal of compacted run files created after the last checkpoint optimization now works for replica’s initial JOIN stage (gh-6568).
- Fixed crash during recovery of a secondary index in case the primary index contains incompatible phantom tuples (gh-6778).
- Fixed the use after free in the relay thread when using elections (gh-6031).
- Fixed a possible crash when a synchronous transaction was followed by an asynchronous transaction right when its confirmation was being written (gh-6057).
- Fixed an error where a replica, while attempting to subscribe to a foreign
cluster with a different replicaset UUID, didn’t notice it is impossible
and instead became stuck in an infinite retry loop printing
a
TOO_EARLY_SUBSCRIBE
error (gh-6094). - Fixed an error where a replica, while attempting to join a cluster with exclusively read-only replicas available, just booted its own replicaset, instead of failing or retrying. Now it fails with an error about the other nodes being read-only so they can’t register the new replica (gh-5613).
- Fixed error reporting associated with transactions
received from remote instances via replication.
Any error raised while such a transaction was being applied was always reported as
Failed to write to disk
regardless of what really happened. Now the correct error is shown. For example,Out of memory
, orTransaction has been aborted by conflict
, and so on (gh-6027). - Fixed replication stopping occasionally with
ER_INVALID_MSGPACK
when replica is under high load (gh-4040). - Fixed a cluster that sometimes could not bootstrap if it contained
nodes with
election_mode
manual
orvoter
(gh-6018). - Fixed a possible crash when
box.ctl.promote()
was called in a cluster with >= 3 instances, happened in debug build. In release build, it could lead to undefined behavior. It was likely to happen if a new node was added shortly before the promotion (gh-5430). - Fixed a rare error appearing when MVCC (
box.cfg.memtx_use_mvcc_engine
) was enabled and more than one replica was joined to a cluster. The join could fail with the error"ER_TUPLE_FOUND: Duplicate key exists in unique index 'primary' in space '_cluster'"
. The same could happen at the bootstrap of a cluster having >= 3 nodes (gh-5601). - Fixed replica reconnecting to a living master on any
box.cfg{replication=...}
change. Such reconnects could lead to replica failing to restore connection forreplication_timeout
seconds (gh-4669). - Fixed potential obsolete data write in synchronous replication due to race in accessing terms while disk write operation is in progress and not yet completed.
- Fixed replicas failing to bootstrap when the master has just restarted (gh-6966).
- Fixed a rare crash with the leader election enabled (any mode except
off
), which could happen if a leader resigned from its role at the same time as some other node was writing something related to the elections to WAL. The crash was in debug build, and in the release build, it would lead to undefined behavior (gh-6129). - Fixed an error when a new replica in a Raft cluster could try to join
from a follower instead of a leader and failed with an error
ER_READONLY
(gh-6127). - Reconfiguration of
box.cfg.election_timeout
could lead to a crash or undefined behavior if done during an ongoing election with a special WAL write in progress. - Fixed several crashes and/or undefined behaviors (assertions in debug build) which could appear when new synchronous transactions were made during ongoing elections (gh-6842).
- Fixed
box.ctl.promote()
entering an infinite election loop when a node does not have enough peers to win the elections (gh-6654). - Servers with elections enabled will resign the leadership and become read-only when the number of connected replicas becomes less than a quorum. This should prevent split-brain in some situations (gh-6661).
- Fixed optimization for single-char strings in the
IR_BUFPUT
assembly routine. - Fixed slots alignment in
lj-stack
command output whenLJ_GC64
is enabled (gh-5876). - Fixed dummy frame unwinding in
lj-stack
command. - Fixed top part of Lua stack (red zone, free slots, top slot)
unwinding in
lj-stack
command. - Added the value of
g->gc.mmudata
field tolj-gc
output. - Fixed detection of inconsistent renames even in the presence of sunk values (gh-4252, gh-5049, gh-5118).
- Fixed the order VM registers are allocated by LuaJIT frontend in case
of
BC_ISGE
andBC_ISGT
(gh-6227). - Fixed inconsistency while searching for an error function when
unwinding a C-protected frame to handle a runtime error (e.g. an
error in
__gc
handler). string.char()
builtin recording is fixed in case when no arguments are given (gh-6371, gh-6548).- Actually made JIT respect
maxirconst
trace limit while recording (gh-6548).
- Fixed a bug when multibyte characters broke
space:fselect()
output. - When an error is raised during encoding call results, the auxiliary lightuserdata value is not removed from the main Lua coroutine stack. Prior to the fix, it leads to undefined behavior during the next usage of this Lua coroutine (gh-4617).
- Fixed Lua C API misuse, when the error is raised during call results encoding on unprotected coroutine and expected to be caught on the different one that is protected (gh-6248).
- Fixed
net.box
error in case connections are frequently opened and closed (gh-6217). - Fixed incorrect handling of variable number of arguments in
box.func:call()
(gh-6405). - Fixed
table.equals
result when booleans compared (gh-6386). - Tap subtests inherit strict mode from parent (gh-6868).
- Fixed the behavior of Tarantool console on SIGINT. Now Ctrl+C discards the current input and prints the new prompt (gh-2717).
- Fixed the possibility of a crash in case when trigger removes itself.
- Fixed the possibility of a crash in case someone destroys trigger when it’s yielding (gh-6266).
- User-defined functions can now return
VARBINARY
to SQL as a result (gh-6024). - Fixed assert on a cast of
DOUBLE
value greater than -1.0 and less than 0.0 toINTEGER
andUNSIGNED
(gh-6255). - Removed spontaneous conversion from
INTEGER
toDOUBLE
in a field of typeNUMBER
(gh-5335). - All arithmetic operations can now only accept numeric values (gh-5756).
- Now function
quote()
returns an argument in case the argument isDOUBLE
. The same for all other numeric types. For types other than numeric,STRING
is returned (gh-6239). - The
TRIM()
function now does not lose collation when executed with the keywordsBOTH
,LEADING
, orTRAILING
(gh-6299). - Now getting unsupported msgpack extension in SQL throws the correct error (gh-6375).
- Now, when copying an empty string, an error will not be set unnecessarily (gh-6157, gh-6399).
- Fixed wrong comparison between
DECIMAL
and largeDOUBLE
values (gh-6376). - Fixed truncation of
DECIMAL
during implicit cast toINTEGER
inLIMIT
andOFFSET
. - Fixed truncation of
DECIMAL
during implicit cast toINTEGER
when value is used in an index. - Fixed assert on a cast of
DECIMAL
value that is greater than -1.0 and less than 0.0 toINTEGER
(gh-6485). - The
HEX()
SQL built-in function no longer throws an assert when its argument consists of zero-bytes (gh-6113). LIMIT
is now allowed inORDER BY
where sort order is in both directions (gh-6664).- Fixed a memory leak in SQL during calling of user-defined function (gh-6789).
- Fixed assertion or segfault when
MP_EXT
received vianet.box
(gh-6766). - Now the
ROUND()
function properly supportsINTEGER
andDECIMAL
as the first argument (gh-6988).
- Fixed
log.cfg
getting updated onbox.cfg
error (gh-6086). - Fixed the error message in an attempt to insert into a tuple the size
of which equals to
box.schema.FIELD_MAX
(gh-6198). - We now check that all privileges passed to
box.schema.grant
are resolved (gh-6199). - Added iterator type checking and allow passing iterator as a
box.index.{ALL,GT,...}
directly (gh-6501).
Intervals received after datetime arithmetic operations may be improperly normalized if the result was negative
tarantool> date.now() - date.now() --- - -1.000026000 seconds ...
i.e. 2 immediately called
date.now()
produce very close values, which difference should be close to 0, not 1 second (gh-6882).
- Fixed invalid headers after redirect (gh-6101).
- Changed the type of the error returned by
net.box
on timeout from ClientError to TimedOut (gh-6144).
- When
force_recovery
cfg option is set, Tarantool is able to boot fromsnap
/xlog
combinations wherexlog
covers changes committed both before and aftersnap
creation. For example,0...0.xlog
, covering everything up tovclock {1: 15}
and0...09.snap
, corresponding tovclock {1: 9}
(gh-6794).
- Bumped Debian packages tarantool-common dependency to use luarocks 3 (gh-5429).
- Fixed an error when it was possible to have new Tarantool package (version >= 2.2.1) installed with pre-luarocks 3 tarantool-common package (version << 2.2.1), which caused rocks install to fail.
- The Debian package does not depend on binutils anymore (gh-6699).
- Fixed build errors with glibc-2.34 (gh-6686).
- Changed size of alt. signal stack for ASAN needs.
- Fixed build errors on arm64 with
CMAKE_BUILD_TYPE=Debug
.