Get your data in RAM. Get compute close to data. Enjoy the performance.
Date: 2023-08-17 Tag: 2.11.1
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.
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.
_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).box.malloc.info()
for reporting memory usage of
Tarantool internal data structures allocated with malloc()
. The function
is available only on Linux (gh-7311).box.cfg.force_recovery
to true
. If you need to revert to the old
behavior, don't set the force_recovery
option (gh-7932).tarantool/metrics
module for metrics aggregation
and export (gh-7725).box.cfg()
function (gh-7725).:is_new()
and :is_old()
helpers to tarantool.compat
options to simplify effective value checks (gh-8807).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).FIBER_STACK_SIZE
to set the default fiber stack size.net.box
client when a remote space had
a field type that the client version did not support (gh-4632).id
is used to generate a new one (gh-8036).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).net.box
(ghs-121).IPROTO_EVENT
packet now has the same sync number as the last
corresponding IPROTO_WATCH
request (gh-8393).unique
constraint of a functional index that has a nullable part (gh-8587).00000000000000000000.xlog
file regardless of
the actual vclock when interrupted during the initial box.cfg()
call
(gh-8704).ER_CURSOR_NO_TRANSACTION
failure for transactions
on synchronous spaces when the on_commit/on_rollback
triggers are set
(gh-8505).box.on_commit
and box.on_rollback
trigger callbacks when the transaction
is synchronous (gh-8742).stream_id
field
of xlog headers (gh-8783).clang
version 15 and above with enabled AddressSanitizer
(tarantool/tarantool-qa#321).hint
option
to true
for TREE indexes (gh-8937).memtx_memory
parameter to specify a memory size
less than required for the stable operation of the engine (gh-7389).box.ctl.promote()
on
a cluster with nodes configured with election_mode = "candidate"
(gh-8497).election_mode = 'candidate'
spuriously detecting
a split-vote when another candidate should win with exactly a quorum of votes
for it (gh-8698).box.cfg.bootstrap_strategy = 'auto'
when some of the bootstrapping nodes were stopped (gh-8757).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.
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).AUTH_TYPE
key to box.iproto.key
(gh-8574).IPROTO_
prefix from the POSITION
, AFTER_POSITION
,
and AFTER_TUPLE
keys exported to box.iproto.key
(gh-8577).Transfer-Encoding: chunked
setting being enabled even if
the Content-Length
header exists for stream requests (gh-8744).net.box
(gh-8889).ANY
field type now supports collation in SQL (gh-8070).ARRAY
, MAP
, and INTERVAL
values cannot be used as
arguments in the ORDER BY
clause (gh-6668).INT64_MAX
or
less than 0
to a decimal number during SQL arithmetic operations (gh-8460).INSERT INTO ... SELECT FROM
(gh-8661).printf()
failure due
to too large size (ghs-122).msgpackffi
.
It could lead to wrong select results with large number keys (gh-6119).takes_raw_args
option is now handled correctly
during downgrading (gh-8457).after
position option of the :select
and :pairs
methods of space and
index objects (gh-8716).language
parameter was shared between connected
clients (gh-8817).box.iproto.override
was called with unconfigured box.
Now, an error is raised instead (gh-8975).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.set
when timestamp
is passed along with nsec
,
usec
, or msec
(gh-8583).Date: 2023-07-05 Tag: 3.0.0-alpha1
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:
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.
box.schema.upgrade()
before you can execute any DDL
operations (gh-7149)._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).box.malloc.info()
for reporting memory usage of
Tarantool internal data structures allocated with malloc()
. The function
is available only on Linux (gh-7311).index_object.parts
contains the following methods, similar to the
key_def
Lua module: extract_key()
, compare()
, compare_with_key()
,
merge()
(gh-7356).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).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).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).box.stat.memtx()
(gh-8501).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).
tarantool/metrics
module for metrics aggregation and export (gh-7725).box.cfg()
function (gh-7725).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).SHOW CREATE TABLE
statement (gh-8098).IPROTO_CALL16
from net.box
(i.e., the call_16
option and the call_16
method for net.box
connections) (gh-8636).box.info
parameter hostname
(gh-8605).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).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.box.tuple.format
that enables format definition for tuples
created via box.tuple.new
(standalone tuples) (gh-4693).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
.-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).--name
and --config
(gh-8613).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.
\set continuation
command.zstd
version was updated to pre-1.5.5 (gh-8391).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).deb
and rpm
packages.deb
and rpm
Tarantool packages.net.box
client when a remote space had
a field type that the client version did not support (gh-4632).id
is used to generate a new one (gh-8036).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).net.box
(ghs-121).IPROTO_EVENT
packet now has the same sync number as the last
corresponding IPROTO_WATCH
request (gh-8393).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).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).unique
constraint of a functional index that has a nullable part (gh-8587).00000000000000000000.xlog
file regardless of
the actual vclock when interrupted during the initial box.cfg()
call
(gh-8704).ER_CURSOR_NO_TRANSACTION
failure for transactions
on synchronous spaces when the on_commit/on_rollback
triggers are set
(gh-8505).box.on_commit
and box.on_rollback
trigger callbacks when transaction
is synchronous (gh-8742).\x80
or \u200B
(gh-8756).stream_id
field
of xlog headers (gh-8783).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_memory
parameter to specify a memory size
less than required for the stable operation of the engine (gh-7389).box.info.replication[...].upstream
being stuck in the "connecting"
state for several minutes after a replica DNS record change (gh-7294)._schema
space.box.cfg{replication_anon = false}
.box.ctl.promote()
on
a cluster with nodes configured with election_mode = "candidate"
(gh-8497).election_mode = 'candidate'
spuriously detecting
a split-vote when another candidate should win with exactly a quorum of votes
for it (gh-8698).box.cfg.bootstrap_strategy = 'auto'
when some of the bootstrapping nodes were stopped (gh-8757).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
.
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).AUTH_TYPE
key to box.iproto.key
(gh-8574).IPROTO_
prefix from the POSITION
, AFTER_POSITION
,
and AFTER_TUPLE
keys exported to box.iproto.key
(gh-8577).fio.open()
was changed for newly
created files to 0666 (before umask) (gh-7981).Transfer-Encoding: chunked
setting being enabled even if
the Content-Length
header exists for stream requests (gh-8744).ANY
field type now supports collation in SQL (gh-8070).ARRAY
, MAP
, and INTERVAL
values cannot be used as
arguments in the ORDER BY
clause (gh-6668).INT64_MAX
or
less than 0
to a decimal number during SQL arithmetic operations (gh-8460).WITH RECURSIVE
clause
(ghs-119).INSERT INTO ... SELECT FROM
(gh-8661).printf()
failure due
to too large size (ghs-122).box.cfg.force_recovery
doesn't work when there are
no user spaces in a snapshot (gh-7974).msgpackffi
.
It could lead to wrong select results with large number keys (gh-6119).takes_raw_args
option is now handled correctly
during downgrading (gh-8457)._vinyl_deferred_delete
system space (gh-5279).after
position option of the :select
and :pairs
methods of space and
index objects (gh-8716)._stream
and
_stream_space_cache
and indexes named _space
using the net.box
stream
objects (gh-8598).cord_slab_cache
symbol was removed from the public
API export (gh-7124).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).tnt_strptime
(gh-8502).datetime.set
when timestamp
is passed along with nsec
,
usec
, or msec
(gh-8583).Date: 2023-05-24
Tag: 2.11.0
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:
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.
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).
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).Introduced the new configuration option bootstrap_strategy
. The default
value of this option - "auto" - brings the new behavior of replica on:
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).
replication_timeout
is the same on every replica)
(gh-7110).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).LUAJIT_ENABLE_CHECKHOOK
for checking instruction
and line hooks for compiled code (gh-7762).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).
application/json
,
application/yaml
, application/msgpack
. Users can define encoding rules
for other content types by writing their own encoding functions (gh-6833).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).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).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).http.client
(gh-7845).__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.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
...
uri.escape()
and uri.unescape()
for percent-encoding
and decoding URI parts (gh-3682).SQL_EXPR
(gh-6986).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_schema_version
to public API and Lua via
box.info.schema_version
(gh-7904).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).box_session_id
(gh-7895).log.cfg
before box.cfg
is called (gh-6011).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).box.iproto.send
in Lua and box_iproto_send
in C (gh-7897).box.iproto.override
) and from C (using box_iproto_override
) (gh-7901).box.atomic()
by analogy with box.begin()
(gh-7202).metrics
module is installed (gh-8192). feedback_version
is updated
to 8.fiber_set_ctx
and fiber_get_ctx
C API functions to pass data to fibers without
yielding immediately (gh-7669).End Of Stream
(EOS) symbol in the
Lua console. Changed the default printed EOS from ';' to '' (gh-7031).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.
master
branch.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).fiber_join_timeout
symbol to exports (gh-7125).box_latch_lock
guarantees the order in which it is acquired by
fibers requesting it (gh-7166).syslog
log configuration through
log.cfg
(gh-7447).SIGTERM
was received before box.cfg
execution is completed (gh-7743).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).GT
iterator type for HASH
indexes (gh-7231).ER_READONLY
when
there are connectivity problems (gh-7737).box.info.replication[...].upstream
being stuck in the "connecting"
state for several minutes after a replica DNS record change (gh-7294).luaL_iscallable()
,
luaL_checkcdata()
, and luaL_setcdatagc()
with the upvalue indexes
(gh-8249).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).ROUND()
functions works correctly on arguments with big precision
(gh-6650).%
(modulo) operation when the left value is negative
and the result is 0 (gh-6575).NaN
is always considered NULL
(gh-6572).sql_defer_foreign_keys
and rules reference trigger action
,
constraint check time
, and match type
(gh-6986).admin
user.
Such attempts now fail with proper error messages such as "User 'admin'
already has read access on universe" (gh-7226)._collation
space to public (ghs-5).box.execute
cannot be called before box.cfg
(gh-4726).box.cfg.force_recovery
doesn't work when there are
no user spaces in a snapshot (gh-7974).jit.on
(gh-8252).-i
flag in case stdin is not a tty (gh-5064).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).--format
flag of the tarantoolctl cat
command.libunwind.h
search in testing files (gh-6877).Date: 2023-05-24 Tag: 2.10.7
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.
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.
net.box
(ghs-121).IPROTO_EVENT
packet now has the same sync number as the last
corresponding IPROTO_WATCH
request (gh-8393).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).
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.
INSERT INTO ... SELECT FROM
(gh-8661).printf()
failure due
to too large size (ghs-122).datetime.set
when timestamp
is passed along with nsec
,
usec
, or msec
(gh-8583).Date: 2023-03-22 Tag: 2.10.6
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.
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.
Backported patches from the vanilla LuaJIT trunk (gh-8069). The following issues were fixed as part of this activity:
math.min/math.max
call with no args (gh-6163).math.min/math.max
calls with a NaN arg (gh-6163).pcall()
call without arguments on arm64.IR_{AHUV}LOAD
specialized to boolean for aarch64.box.cfg.force_recovery
doesn't work when there is no user
spaces in a snapshot (gh-7974).Date: 2023-03-07 Tag: 2.11.0-rc2
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:
Changes since 2.11.0-rc1 (assorted):
box.cfg.force_recovery
doesn't work when there are
no user spaces in a snapshot (gh-7974).zstd
version was updated to pre-1.5.5 (gh-8391).box.info.replication[...].upstream
being stuck in the "connecting"
state for several minutes after a replica DNS record change (gh-7294).jit.on
(gh-8252).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.
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).
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).Introduced the new configuration option bootstrap_strategy
. The default
value of this option - "auto" - brings the new behavior of replica on:
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).
replication_timeout
is the same on every replica)
(gh-7110).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).LUAJIT_ENABLE_CHECKHOOK
for checking instruction
and line hooks for compiled code (gh-7762).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).
application/json
,
application/yaml
, application/msgpack
. Users can define encoding rules
for other content types by writing their own encoding functions (gh-6833).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).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).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).http.client
(gh-7845).__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.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
...
uri.escape()
and uri.unescape()
for percent-encoding
and decoding URI parts (gh-3682).SQL_EXPR
(gh-6986).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_schema_version
to public API and Lua via
box.info.schema_version
(gh-7904).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).box_session_id
(gh-7895).log.cfg
before box.cfg
is called (gh-6011).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).box.iproto.send
in Lua and box_iproto_send
in C (gh-7897).box.iproto.override
) and from C (using box_iproto_override
) (gh-7901).box.atomic()
by analogy with box.begin()
(gh-7202).metrics
module is installed (gh-8192). feedback_version
is updated
to 8.fiber_set_ctx
and fiber_get_ctx
C API functions to pass data to fibers without
yielding immediately (gh-7669).End Of Stream
(EOS) symbol in the
Lua console. Changed the default printed EOS from ';' to '' (gh-7031).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.
master
branch.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).fiber_join_timeout
symbol to exports (gh-7125).box_latch_lock
guarantees the order in which it is acquired by
fibers requesting it (gh-7166).syslog
log configuration through
log.cfg
(gh-7447).SIGTERM
was received before box.cfg
execution is completed (gh-7743).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).GT
iterator type for HASH
indexes (gh-7231).ER_READONLY
when
there are connectivity problems (gh-7737).box.info.replication[...].upstream
being stuck in the "connecting"
state for several minutes after a replica DNS record change (gh-7294).luaL_iscallable()
,
luaL_checkcdata()
, and luaL_setcdatagc()
with the upvalue indexes
(gh-8249).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).ROUND()
functions works correctly on arguments with big precision
(gh-6650).%
(modulo) operation when the left value is negative
and the result is 0 (gh-6575).NaN
is always considered NULL
(gh-6572).sql_defer_foreign_keys
and rules reference trigger action
,
constraint check time
, and match type
(gh-6986).admin
user.
Such attempts now fail with proper error messages such as "User 'admin'
already has read access on universe" (gh-7226)._collation
space to public (ghs-5).box.execute
cannot be called before box.cfg
(gh-4726).box.cfg.force_recovery
doesn't work when there are
no user spaces in a snapshot (gh-7974).jit.on
(gh-8252).-i
flag in case stdin is not a tty (gh-5064).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).--format
flag of the tarantoolctl cat
command.libunwind.h
search in testing files (gh-6877).Date: 2023-02-20 Tag: 2.11.0-rc1
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:
Learn more about these and other new features in the release candidate announcement.
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.
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).
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).
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).Introduced the new configuration option bootstrap_strategy
. The default
value of this option - "auto" - brings the new behavior of replica on:
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).
replication_timeout
is the same on every replica)
(gh-7110).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).LUAJIT_ENABLE_CHECKHOOK
for checking instruction
and line hooks for compiled code (gh-7762).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).
application/json
,
application/yaml
, application/msgpack
. Users can define encoding rules
for other content types by writing their own encoding functions (gh-6833).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).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).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).http.client
(gh-7845).__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.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
...
uri.escape()
and uri.unescape()
for percent-encoding
and decoding URI parts (gh-3682).SQL_EXPR
(gh-6986).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_schema_version
to public API and Lua via
box.info.schema_version
(gh-7904).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).box_session_id
(gh-7895).log.cfg
before box.cfg
is called (gh-6011).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).box.iproto.send
in Lua and box_iproto_send
in C (gh-7897).box.iproto.override
) and from C (using box_iproto_override
) (gh-7901).box.atomic()
by analogy with box.begin()
(gh-7202).metrics
module is installed (gh-8192). feedback_version
is updated
to 8.End Of Stream
(EOS) symbol in the
Lua console. Changed the default printed EOS from ';' to '' (gh-7031).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.
master
branch.fiber_set_ctx
and fiber_get_ctx
C API functions to pass data to fibers without
yielding immediately (gh-7669).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).fiber_join_timeout
symbol to exports (gh-7125).box_latch_lock
guarantees the order in which it is acquired by
fibers requesting it (gh-7166).syslog
log configuration through
log.cfg
(gh-7447).SIGTERM
was received before box.cfg
execution is completed (gh-7743).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).GT
iterator type for HASH
indexes (gh-7231).ER_READONLY
when
there are connectivity problems (gh-7737).luaL_iscallable()
,
luaL_checkcdata()
, and luaL_setcdatagc()
with the upvalue indexes
(gh-8249).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).ROUND()
functions works correctly on arguments with big precision
(gh-6650).%
(modulo) operation when the left value is negative
and the result is 0 (gh-6575).NaN
is always considered NULL
(gh-6572).sql_defer_foreign_keys
and rules reference trigger action
,
constraint check time
, and match type
(gh-6986).admin
user.
Such attempts now fail with proper error messages such as "User 'admin'
already has read access on universe" (gh-7226)._collation
space to public (ghs-5).box.execute
cannot be called before box.cfg
(gh-4726).-i
flag in case stdin is not a tty (gh-5064).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).--format
flag of the tarantoolctl cat
command.libunwind.h
search in testing files (gh-6877).Date: 2023-02-20
Tag: 2.10.5
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.
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.
_vspace_sequence
system space view of the _space_sequence
system space (gh-7858).box.cfg{}
now contains the build target triplet
(for example, Linux-x86_64-RelWithDebInfo
).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).
select()
skipping an existing tuple after
a rolled back delete()
(gh-7947).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).
election_mode = "manual"
sometimes increasing
the election term excessively after their promotion (gh-8168).Backported patches from vanilla LuaJIT trunk (gh-7230). In the scope of this activity, the following issues have been resolved:
io.close()
for already closed standard output.emit_loadi()
on x86/x64 emitting xor between condition check
and jump instructions.IR_HREF
hash calculations for non-string GC objects for GC64.IR_SLOAD
.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:
__serialize
meta method (gh-8240).malloc()
failures. (ghs-65, 66, 67, 68).space_object:create_index()
when collation
option is not
set. Now it is inherited from the space format (gh-5104).replication_synchro_quorum
box.cfg()
option (ghs-20, GHSA-74jr-2fq7-vp42).%f
modifier of datetime_object:format()
was too big (ghs-31).cord_on_yield
(gh-6647).-Werror
build fail on Clang 15 (gh-8110).Date: 2023-02-20 Tag: 1.10.15
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.
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.
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).
select()
skipping an existing tuple after
a rolled back delete()
(gh-7947).Backported patches from vanilla LuaJIT trunk (gh-7230). In the scope of this activity, the following issues have been resolved:
unpack()
optimized by a compiler.tonumber()
with cdata argument for failed conversions
(gh-7655).io.close()
for already closed standard output.emit_loadi()
on x86/x64 emitting xor between condition check
and jump instructions.IR_HREF
hash calculations for non-string GC objects for GC64.IR_SLOAD
.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:
cord_on_yield
(gh-6647).-Werror
build fail on Clang 15 (gh-8110).Date: 2022-11-11 Tag: 2.10.4
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.
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.
NULLIF()
call results have the same type as its first argument (gh-6989).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).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).BEGIN
, COMMIT
, and ROLLBACK
counters in the box.stat()
output.
Now they show the number of started, committed, and rolled back transactions
(gh-7583).mp_decode_decimal()
and
decimal_unpack()
when an input string was too long (ghs-17).space:drop
(gh-7757).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).
msgpack.decode
in case the input string contains an invalid
MsgPack header 0xc1
(gh-7818).INDEXED BY
was used with an index that was at
least third in a space (gh-5976).JOIN
when using an unsupported index (gh-5678).SELECT
queries (gh-5183).LUA
function from the public role (ghs-14).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.type = box.NULL
in key_def.new()
resulted in
type = 'unsigned'
(gh-5222)._vfunc
system space now has the same format as _func
(gh-7822).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
...