3.1.0
Date: 2024-04-16
Tag: 3.1.0
Overview
3.1.0 is the first stable version of the 3.1 release
series. It introduces 28 improvements and resolves 2 bugs since
3.0.2.
The "stable" label means that we have all planned features implemented and we
see no high-impact issues. However, if you encounter an issue, feel free to
report it on GitHub.
Compatibility
Tarantool 3.x is backward compatible with Tarantool 2.11.x in the binary data
layout, client-server protocol, and replication protocol.
Please upgrade using the box.schema.upgrade()
procedure to unlock
all the new features of the 3.x series.
Functionality added or changed
Core
- Introduced fixed-size numeric field types:
uint8
,int8
,uint16
,int16
,
uint32
,int32
,uint64
,int64
,float32
,float64
(gh-9548). - Now it is possible to set IPROTO request handler callbacks by using the new
Lua moduletrigger
, for example:The method works before the initiallocal trigger = require('trigger') trigger.set('box.iproto.override.select', 'my_select', my_select_handler)
box.cfg{}
call. Also, the method allows
setting multiple handlers for a single request type (gh-8138). box.iproto.override()
was switched to the universal trigger registry. As a
side effect, now this function does not raise an error when a wrong request
type is passed. All such errors are logged withCRITICAL
level (gh-8138).- Added a new flag
tarantool.build.test_build
that shows whether a build
flagTEST_BUILD
is set. - Hide redundant fields from
box.error.unpack()
if
thebox_error_unpack_type_and_code
compat option is set to 'new'.
The default behaviour is 'old' (gh-9101). - Sped up the creation of large sparse tuples by up to 3.5x in a synthetic test.
- Error details are now available as error payload fields (gh-9108).
- Added the
name
field to an error object (gh-9875). - Added a
trigger
option tobox.schema.func.create
. This option allows creating
persistent triggers (gh-8663).
Lua
- Now it is possible to add custom payload fields to
box.error
(gh-9104). - Added a
message
argument to the table constructor ofbox.error.new
(gh-9102). - Added a
prev
argument to the table constructor ofbox.error.new
(gh-9103). - Now it is possible to access a payload field of an error's cause directly
from the error (gh-9106). - Increased the verbosity of
box.error
s serialization and added a new
box_error_serialize_verbose
option tocompat
to retain old behaviour
(gh-9105). - Added autocompletion (including payload fields) to
box.error
(gh-9107). - Added the
level
argument tobox.error
andbox.error.new
to specify
the stack frame used for setting the error location (gh-9792). - Added key validation and comparison functions to the
key_def
module
(gh-9863). - Added a
tnt_election_leader_idle
metric to built-inmetrics
.
Http client
- Added the
http_version
option to therequest()
,post()
,
get()
and other request functions from thehttp.client
module (gh-9806).
Config
- Added new
config.etcd
optionswatchers.reconnect_timeout
and
watchers.reconnect_max_attempts
(ghe-647). - Introduced the
sharding.rebalancer_mode
option (gh-9657). - Introduced the
sharding.weight
configuration option, which reflects
the relative amount of data that a replicaset can store (gh-9775). config:info()
can now display source metadata from the last successful
load along with source metadata from the very last load attempt (gh-9780).- Introduced the
labels
configuration option. The labels are maps with
string keys that are merged to instance level (gh-9809). - Added the
config:instances()
method and theinstance
option to
config:get()
(gh-9680). - Introduced the
instance_uri()
method for theconfig
module (gh-9842).
Experimental
- Introduced the
experimental.connpool
module and the
connect()
function of this module (gh-9842). - Introduced the
filter()
function in theexperimental.connpool
module (gh-9842). - Introduced the
call()
function in theexperimental.connpool
module (gh-9842). - Introduced the
mode
option for thefilter()
andcall()
functions
in theexperimental.connpool
module (gh-9930).
Bugs fixed
Core
- Provided old and new tuples in
box.error.TUPLE_FOUND
(gh-6166). - An attempt to execute a DDL, DML, DQL, DCL or TCL query within
a transactional trigger (on_commit
oron_rollback
) now fails
with a specific error (gh-9186, gh-7331).
For the list of other bugs fixed you can refer to the 3.0.2 release notes,
since most of the bugs are backported to the previous version.
Tools
tarantoolctl
has been removed. Systemd, sysvinit and logrotate
scripts based on it were also removed. All this functionality is covered by thett
utility.
tarantoolctl
is no longer available in official deb and rpm packages. This change will only
affect the absence of tarantoolctl in future releases of tarball archives.
(gh-9443).- Added the
--human-readable
option for themisc.memprof
parser to print
sizes like 1KiB, 234MiB, 2GiB, etc.
Made the errors from the profilers more user-friendly (gh-9217).