Releases: tarantool/crud
0.11.0
Caution: Use CRUD 0.11.1 instead of 0.11.0. It fixes critical bug
for requests with specified bucket id (see #278).
Overview
This release adds several features and optimizations to CRUD module
and fixes some critical problems.
If you use CRUD with DDL, we highly recommend to update to this version.
Breaking changes
There are no breaking changes in the release.
crud.common.sharding_func
and crud.common.sharding_key
sharding
cache reload modules are deprecated now (since sharding cache reload
is now automatic) and will be removed in future releases.
New features
-
crud.count()
function to calculate the number of tuples
in the space according to conditions. Read more about this
feature in README "Count" section. -
crud.stats()
function to monitor performance of your requests.
To enable statistics collect, usecrud.cfg{ stats = true }
If
metrics
package found, CRUD metrics will be automatically exported
to metrics registry. Read more about this feature in README "Statistics"
section. -
Support bucket id calculating using sharding func specified in
DDL schema or in_ddl_sharding_func
space. Read more about this
feature in README "API" section.
Bugfixes
0.10.0
Overview
The main feature of this release is support of automatic calculation of the
sharding key according to the database schema defined by tarantool/ddl
module. Example:
crud 0.9.0:
local tuple = {7, 'Dimitrion'}
local sharding_key = tuple[2]
local bucket_id = vshard.router.bucket_id_strcrc32(sharding_key)
return crud.insert('customers', tuple, {bucket_id = bucket_id})
crud 0.10.0 (when sharding_key
definition is present):
local tuple = {7, 'Dimitrion'}
return crud.insert('customers', tuple)
Added
-
CRUD operations calculates bucket id automatically using sharding
key specified with DDL schema or in_ddl_sharding_key
space (#166).NOTE: CRUD methods delete(), get() and update() requires that sharding
key must be a part of primary key. Otherwise specifybucket_id
explicitly.
Fixed
- Use tuple-merger backed select implementation on tarantool 2.10+ (it gives
less pressure on Lua GC) (PR #227).
0.9.0
Overview
The most important changes are the new crud.len()
function and optimizations
in crud.select()
/ crud.pairs()
.
Added
crud.len()
function to calculate the number of tuples
in the space for memtx engine and calculate the maximum
approximate number of tuples in the space for vinyl engine.- Testing: added integration with service coveralls.io (PR #195).
- Testing: added integration with luacov that allows to generate report with
code coverage statistics (PR #195).
Changed
- Names of errors generated by CRUD operations have been unified (PR #184).
- Opmimize
crud.select()
/crud.pairs()
for one replicaset case (say, when
bucket_id
is passed or deducible from conditions). It gives 13% boost on
the case from #220 (PR #226).
Fixed
0.8.0
0.7.1
0.7.0
Bug fixes
- Fixed error for partial result option if field contains box.NULL.
- Fixed incorrect
crud
results during reverse pagination
without specifyingbatch_size
. - Fixed crud roles reload:
- before this patch reload wasn't fair - reloading
tuple.merger
andtuple.keydef
modules failed, and crud started to use
crud.select.compat.select_old
module with naive merger implementation; - fair reloading
tuple.merger
andtuple.keydef
led to the error that was
fixed by caching loaded module in the special global variable not cleaned
on reloading roles; - ability of using
tuple.merger
andtuple.keydef
modules now is checked
by callingpackage.search
, built-inmerger
andkeydef
modules are used
if present inpackage.loaded
. It allows to avoid ignoring errors on checking
modules existing viapcall(require, '<module_name>')
.
- before this patch reload wasn't fair - reloading
- Fixed some cases when module ignored schema updates.
Features
cut_rows
andcut_objects
functions to cut off scan key and
primary key values that were merged to the select/pairs partial result.- Functions
stop()
for the rolescrud-storage
andcrud-router
. - Option flag
force_map_call
forselect()
/pairs()
to disable thebucket_id
computation from primary key. crud.min
andcrud.max
functions to find the minimum and maximum values in the specified index.- Added support for jsonpath for select.
0.6.0
Bug fixes
-
Fixed not finding field in tuple on
crud.update
if
there areis_nullable
fields in front of it that were added
when the schema was changed for Tarantool version <= 2.2. -
Pagination over multipart primary key.
Features
mode
,prefer_replica
andbalance
options for read operations
(get, select, pairs). According to this parameters one of vshard
calls (callrw
,callro
,callbro
,callre
,callbre
) is selected
0.5.0
Bug fixes
Fixed not finding field in tuple on crud.update
if
there are is_nullable
fields in front of it that were added
when the schema was changed.
- Fixed select crash when dropping indexes
- Using outdated schema on router-side
- Sparsed tuples generation that led to "Tuple/Key must be MsgPack array" error
Features
- Support for UUID field types and UUID values
fields
option for simple operations and select/pairs calls with pagination
support to get partial result
0.4.0
Bug fixes
- Fixed typo in error for case when failed to get
bucket_id
- Fixed select by part of sharding key equal. Before this patch
selecting by equality of partially specified multipart primary index
value was misinterpreted as a selecting by fully specified key value. - Fixed iteration with
pairs
through empty space returnednil
.
Features
truncate
operation- iterator returned by
pairs
is compatible with luafun
0.3.0
Bug fixes
- Fixed select by primary index name
- Fixed error handling select with invalid type value
- Get rid of performing map-reduce for single-replicaset operations
Features
- Added
crud-router
Cartridge role - Implemented
bucket_id
option for all operations to specify custom bucket ID. For operations that accepts tuple/object bucket ID can be specified as tuple/object field as well asopts.bucket_id
value.
Changes
- CRUD-router functions are exposed to the global scope, so it's possible to call crud-operations via
net.box.call
crud.init
is removed in favor tocrud.init_storage
andcrud.init_router