Releases: tarantool/crud
1.1.0
1.0.0
Overview
This release introduces a breaking change with removing a deprecated feature: crud.len(space_id)
.
This release also introduces a Cartridge clusterwide config to setup crud.cfg
.
Breaking changes
You cannot use space id as a space identifier in crud.len
anymore. Use space name instead.
New features
- Timeout condition for the validation of master presence in replicaset and for the master connection (#95).
- Cartridge clusterwide configuration for
crud.cfg
(#332).
Changes
- Forbid using space id in
crud.len
(#255).
Fixes
0.14.1
Overview
This release introduces the support of sequences for insert_object
, insert_object_many
, replace_object
, replace_object_many
and impoved error messages for some cases.
Warning: there is no native support for sequences in sharded systems since each replicaset has its own sequence. If sequence field is a part of the sharding key (which is true by default), choosing the bucket id is the sole responsibility of the developer.
New features
skip_nullability_check_on_flatten
option forinsert_object
,insert_object_many
,replace_object
,replace_object_many
.false
by default. By setting the option totrue
you allow setting null values to non-nullable fields (#328).
Changes
- Rework
NonInitialized
error message to be more helpful for troubleshooting (#326).
0.14.0
Overview
This release introduces vshard group and non-default vshard routers support.
To use a space from Cartridge vshard group, pass the group name to a vshard_group
request option.
local res, err = crud.select('customers',
{{'<=', 'age', 35}},
{first = 10, vshard_group = 'hot'})
To use a space from non-default vshard router, pass the router object to a request.
local vshard_router = vshard.router.new(name, cfg)
local res, err = crud.select('customers',
{{'<=', 'age', 35}},
{first = 10, vshard_group = vshard_router})
New features
- vshard group and non-default vshard routers support (#44).
Changes
- Deprecate using space id in crud.len (#255).
0.13.0
Overview
The main feature of this release is the full support of vshard sharding functions (see ddl 1.6.2 for corresponding ddl release).
Breaking changes
There are no breaking changes in the release.
New features
crud.storage_info
function to get storages status (#229).
Bugfixes
- Fix specifying
vshard
sharding funcs (#314).
0.12.1
Overview
This is a bugfix release. It introduces several fixes related to crud and ddl module integration.
Breaking changes
There are no breaking changes in the release.
Bugfixes
0.12.0
Overview
This release offers support of several *_many()
and *_object_many()
operations to insert/replace/upsert many tuples at once.
Those operations are faster for many tuples/operations of the same kind.
Say, if you want to add large amount of data into the cluster, invoke
insert_many()
with 100 (or 1000, depends of the size) tuples per call.
Breaking changes
There are no breaking changes in the release.
New features
-
Insert many tuples/objects at once (#193).
crud.insert_many(space_name, tuples, opts) crud.insert_object_many(space_name, objects, opts)
-
Replace many tuples/objects at once (#193).
crud.replace_many(space_name, tuples, opts) crud.replace_object_many(space_name, objects, opts)
-
Perform many upsert operations at once (#193).
crud.upsert_many(space_name, tuples_operation_data, opts) crud.upsert_object_many(space_name, objects_operation_data, opts)
Example:
crud.replace_many('developers', {
{1, box.NULL, 'Elizabeth', 'lizaaa'},
{2, box.NULL, 'Anastasia', 'iamnewdeveloper'},
})
---
- metadata:
- {'name': 'id', 'type': 'unsigned'}
- {'name': 'bucket_id', 'type': 'unsigned'}
- {'name': 'name', 'type': 'string'}
- {'name': 'login', 'type': 'string'}
rows:
- [1, 477, 'Elizabeth', 'lizaaa']
- [2, 401, 'Anastasia', 'iamnewdeveloper']
...
The *_many()
operations have almost same options as
insert/replace/upsert and two new ones to control how errors are
interpreted on a storage:
-
stop_on_error
(boolean
, default isfalse
)If an error occurs on a storage, stop processing operations of the
request on given storage.Only on the storage, where the error occurs.
-
rollback_on_error
(boolean
, default isfalse
)Rollback all changes on the storage, where an error occurs.
Only on the storage, where the error occurs.
The operations may succeed partially, so data and errors will be
returned both. Several errors can occur at a single request: those calls
return an array of errors, where each error contains the problematic
tuple/object. Consider the README for the detailed description.
Be ready to errors that are not recoverable without interaction with a
human. This implementation does NOT perform cluster wide transactions or
two phare commit: all rollbacks are made only on particular storage.
0.11.3
Overview
This is a bugfix release. Several cases of pagination using select
with after was fixed or improved. Warning has been added to
potentially long select and count calls. Storage select errors
were reworked to be consistent with other calls errors.
Breaking changes
There are no breaking changes in the release.
New features
-
Optimize
crud.select()
without conditions and with
after
(PR #295). -
A critical log entry containing the current stack traceback is
created upon potentially longselect
andcount
calls —
an user can explicitly request a full scan through by passing
fullscan=true
toselect
orcount
options table argument
in which case a log entry will not be created (#276).
Bugfixes
-
Make select error description more informative when merger
built-in module or tuple-merger external module is used
in case of disabled/uninit storage (#229). -
crud.select()
if a condition is '<=' and it's
value <after
(PR #295).Previous releases:
tarantool> crud.select('developers', > {{'<=', 'id', 3}}, {first = 10, after = rows[5]}).rows --- - - [2, 401, 'Sergey', 'Allred', 21] - [1, 477, 'Alexey', 'Adams', 20] ...
After this release:
tarantool> crud.select('developers', > {{'<=', 'id', 3}}, {first = 10, after = rows[5]}).rows --- - - [3, 2804, 'Pavel', 'Adams', 27] - [2, 401, 'Sergey', 'Allred', 21] - [1, 477, 'Alexey', 'Adams', 20] ...
-
crud.select()
filtration by a first condition if the condition
is '>' or '>=' and it's value >after
(PR #295).Previous releases:
tarantool> crud.select('developers', > {{'>=', 'id', 5}}, {first = 10, after = rows[2]}).rows --- - - [3, 2804, 'Pavel', 'Adams', 27] - [4, 1161, 'Mikhail', 'Liston', 51] - [5, 1172, 'Dmitry', 'Jacobi', 16] - [6, 1064, 'Alexey', 'Sidorov', 31] ...
After this release:
tarantool> crud.select('developers', > {{'>=', 'id', 5}}, {first = 10, after = rows[2]}).rows --- - [5, 1172, 'Dmitry', 'Jacobi', 16] - [6, 1064, 'Alexey', 'Sidorov', 31] ...
-
crud.select()
results order with negativefirst
(PR #295). -
crud.select()
if a condition is '=' or '==' with
negativefirst
(PR #295).Suppose we have a non-unique secondary index by the field
age
field and a space:tarantool> crud.select('developers', nil, {first = 10}) --- - metadata: [{'name': 'id', 'type': 'unsigned'}, {'name': 'bucket_id', 'type': 'unsigned'}, {'name': 'name', 'type': 'string'}, {'name': 'surname', 'type': 'string'}, {'name': 'age', 'type': 'number'}] rows: - [1, 477, 'Alexey', 'Adams', 20] - [2, 401, 'Sergey', 'Allred', 27] - [3, 2804, 'Pavel', 'Adams', 27] - [4, 1161, 'Mikhail', 'Liston', 27] - [5, 1172, 'Dmitry', 'Jacobi', 27] - [6, 1064, 'Alexey', 'Sidorov', 31] - null ...
Previous releases:
tarantool> crud.select('developers', > {{'=', 'age', 27}}, {first = -10, after = rows[4]}).rows --- - [] ...
After this release:
tarantool> crud.select('developers', > {{'=', 'age', 27}}, {first = -10, after = rows[4]}).rows --- - - [2, 401, 'Sergey', 'Allred', 27] - [3, 2804, 'Pavel', 'Adams', 27] ...
0.11.2
Overview
This is a bugfix release. Several things related to crud statistics (0.11.0 and 0.11.1 release features) was improved or fixed.
Breaking changes
There are no breaking changes in the release.
New features
-
Make metrics quantile collector age params configurable (#286).
-
Add separate
latency_average
andlatency_quantile_recent
fields tocrud.stats()
output (#286).
Bugfixes
- Preset
stats_quantile_tolerated_error
crud.cfg
parameter is no more lost on configuration update (#284).
0.11.1
Overview
This release fixes critical bug introduced in 0.11.0. It is
recommended to use 0.11.1 instead of 0.11.0.
It also adds an ability to configure quantile collector tolerated
error and changes its default value.
Breaking changes
There are no breaking changes in the release.
New features
Set quantile collector tolerated error with crud.cfg (#281):
crud.cfg{ stats_quantile_tolerated_error = 1e-4 }
Decreasing tolerated error may fix getting -Inf
values in
quantiles. Increasing tolerated error may improve performance a bit.
Bugfixes
Requests no more fail with "Sharding hash mismatch" error
if ddl set and bucket_id is explicitly specified (#278).