All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
crud.schema
no longer returns system space_gc_consumers
with Tarantool 3.2+.- Tests of
schema
with Tarantool 3.2+.
insert_many
,insert_object_many
,replace_many
,replace_object_many
,upsert_many
,upsert_object_many
operations no longer fail withShardingHashMismatchError
if a space has custom sharding info and every tuple/object in the request hasbucket_id
set (#437).
- Clarify license in the rockspec (#434).
- Asynchronous bootstrap support for storages (#412).
- Tarantool 3 roles for setting up crud routers and storages (#415).
- Ability to configure crud through Tarantool 3 roles configuration (#415).
- Explicitly forbid datetime interval conditions (#373).
- Storage initialization is now asynchronous by default for Tarantool 3.0+ (#412).
- Additionally check backoff error on storage info fetch (#427).
- Working with datetime conditions in case of non-indexed fields or non-iterating indexes (#373).
- Precision loss for decimal conditions in case of non-indexed fields or non-iterating indexes (#373).
- Passing errors from storages for merger operations (
crud.select
,crud.pairs
,readview:select
,readview:pairs
) (#423). - Working with
nil
operand conditions in case of non-indexed fields or non-iterating indexes (#422).
- Compatibility with vshard configuration if UUIDs are omitted (#407).
- Compatibility with automatic master discovery in vshard (#409).
- Secondary conditions for index operands with operations
>=
,<=
,>
,<
no longer cause missing part of the actual result for scan operations (crud.select
,crud.pairs
,crud.count
,readview:select
,readview:pairs
) (#418).
mode
option forcrud.min
andcrud.max
(#404).
- Compatibility with vshard 0.1.25
name_as_key
identification mode for Tarantool 3.0 (#403). - Propagating
noreturn
andfetch_latest_metadata
options in case of intermediate nullable fields update for Tarantool 2.7 and older (#404).
- Dropped external tuple merger and tuple keydef modules installation from the package build (#390).
- Compatibility with Tarantool 3.0 binary protocol change (#390).
- Compatibility with Tarantool 3.0 tuple objects (#390).
- Space schema introspection API
crud.schema
(#380).
deps.sh
installs thevshard
instead of thecartridge
by default (#364). You could to specify an environment variableCARTIRDGE_VERSION
to install thecartridge
and run tests cases with it.- Return explicit error for
*_many
call with no tuples/objects (#377). - Quickstart section in the README.md focuses on usage with
vshard
instead ofCartridge
(#366).
crud.readview
resource cleanup on garbage collect (#379).doc/playground.lua
does not work with Tarantool 3 (#371).- Tests with Tarantool 3 (#364).
- VShard storage user have not execution rights for internal functions (#366).
- Compatibility with Tarantool 3.0 tuple objects (#387).
- Read view support for select and pairs (#343).
- Add
noreturn
option for operations:insert
,insert_object
,insert_many
,insert_object_many
,replace
,replace_object
,replace_many
,insert_object_many
,upsert
,upsert_object
,upsert_many
,upsert_object_many
,update
,delete
(#267).
- Crud DML operations returning stale schema for metadata generation.
Now you may use
fetch_latest_metadata
flag to work with latest schema (#236).
- Yield on select/pairs storage tuple lookup (#312).
- Naming of
DEV
environment variable toTARANTOOL_CRUD_ENABLE_INTERNAL_CHECKS
(#250).
- Loaded functions misleading coverage (#249).
- Add versioning support (PR #342).
- Pre-hotreload
cartridge
support (older than 2.4.0) (PR #341). - Tarantool version-dependent features for 3.x (PR #344).
- Add timeout condition for the validation of master presence in replicaset and for the master connection (#95).
- Support Cartridge clusterwide configuration for
crud.cfg
(#332).
- Breaking: forbid using space id in
crud.len
(#255).
- Add validation of the master presence in replicaset and the
master connection to the
utils.get_space
method before receiving the space from the connection (#331). - Fix fiber cancel on schema reload timeout in
call_reload_schema
(PR #336).
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, which can be useful if non-nullable field value is generated by sequence. 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 (#328).
- Rework
NonInitialized
error message to be more helpful for troubleshooting (#326).
- Support
vshard_router
option in operations for Cartridge vshard groups or non-default vshard routers (#44).
- Deprecate using space id in
crud.len
(#255).
crud.storage_info
function to get storages status (#229).
- Fix specifying
vshard
sharding funcs (#314).
- Fetching invalid ddl configuration (sharding key for non-existing space) is no longer breaks CRUD requests (#308).
- ddl space record delete no more throws error if crud is used (#310).
- crud sharding metainfo is now updated on ddl record delete (#310).
- Batch insert/upsert operation
crud.insert_many()
/crud.insert_object_many()
/crud.upsert_many()
/crud.upsert_object_many()
crud.replace_many()
/crud.replace_object_many()
with partial consistency (#193).
- Optimize
crud.select()
without conditions and withafter
. - Behaviour of potentially long
select
andcount
calls: a critical log entry containing the current stack traceback is created upon such function calls — an user can explicitly request a full scan through by passingfullscan=true
toselect
orcount
options table argument in which case a log entry will not be created (#276). - 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
.Before this patch:
-
- [2, 401, 'Sergey', 'Allred', 21]
- [1, 477, 'Alexey', 'Adams', 20] ...
After this patch:
-
- [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
.Before this patch:
-
- [3, 2804, 'Pavel', 'Adams', 27]
- [4, 1161, 'Mikhail', 'Liston', 51]
- [5, 1172, 'Dmitry', 'Jacobi', 16]
- [6, 1064, 'Alexey', 'Sidorov', 31] ...
After this patch:
- [5, 1172, 'Dmitry', 'Jacobi', 16]
- [6, 1064, 'Alexey', 'Sidorov', 31] ...
-
-
crud.select()
results order with negativefirst
. -
crud.select()
if a condition is '=' or '==' with negativefirst
.Suppose we have a non-unique secondary index by the field
age
field and a space:- 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 ...
Before this patch:
- [] ...
After this patch:
-
- [2, 401, 'Sergey', 'Allred', 27]
- [3, 2804, 'Pavel', 'Adams', 27] ...
- metadata: [{'name': 'id', 'type': 'unsigned'}, {'name': 'bucket_id', 'type': 'unsigned'},
{'name': 'name', 'type': 'string'}, {'name': 'surname', 'type': 'string'}, {'name': 'age',
'type': 'number'}]
rows:
- Make metrics quantile collector age params configurable (#286).
- Add separate
latency_average
andlatency_quantile_recent
fields tocrud.stats()
output (#286).
- Preset
stats_quantile_tolerated_error
crud.cfg
parameter is no more lost on configuration update (#284).
- Make metrics quantile collector tolerated error configurable (#281).
- Change metrics quantile collector default tolerated error from 1e-2 to 1e-3 (#281).
- Requests no more fail with "Sharding hash mismatch" error if ddl set and bucket_id is explicitly specified (#278).
Caution: Use CRUD 0.11.1 instead of 0.11.0. It fixes critical bug for some requests (see #278).
crud.count()
function to calculate the number of tuples in the space according to conditions.- Support bucket id calculating using sharding func specified in
DDL schema or in
_ddl_sharding_func
space. - Statistics for CRUD operations on router (#224).
- Integrate CRUD statistics with
metrics
(#224). - Added LICENSE file into the repository (BSD-2-Clause).
- Optimize select with known bucket_id (#234).
- Deprecate manual sharding schema reload (#212).
- Fix processing storage error for tuple-merger implementation of select/pairs (#271).
- Do not change input tuple object in requests.
- Add automatic reload of DDL schema (#212).
- CRUD operations calculates bucket id automatically using sharding
key specified with DDL schema or in
_ddl_sharding_key
space. NOTE: CRUD methods delete(), get() and update() requires that sharding key must be a part of primary key.
- Use tuple-merger backed select implementation on tarantool 2.10+ (it gives less pressure on Lua GC).
- DDL sharding key now can be extracted from select conditions even if there are no separate index.
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).
- Names of errors generated by CRUD operations have been unified (PR #184).
- Opmimize
crud.select()
/crud.pairs()
for one replicaset case (say, whenbucket_id
is passed or deducible from conditions). It gives 13% boost on the case from #220 (PR #226).
- Ignoring of an error in
crud.pairs()
(#144). - Damaging of opts table by CRUD methods (#192).
- Ignoring of
bucket_id
option incrud.select()
/crud.pairs()
(#220).
- Invalid results for pagination queries when filtering on a part of a composite index
- Added jsonpath indexes support for queries
tuple-merger
module updated to 0.0.2
- Compatibility with Tarantool versions that don't support key_def and merger modules.
- Ignoring
opts.first
oncrud.pairs
call - External
keydef
compatibility with built-inmerger
- 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 usecrud.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.
- Preserve "Bootstrap vshard" button in WebUI operable even if vshard roles are hidden explicitly.
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.
-
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.
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
- 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. - 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
- Support for UUID field types and UUID values
fields
option for simple operations and select/pairs calls with pagination support to get partial result
- 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
.
truncate
operation- iterator returned by
pairs
is compatible with luafun
- Select by primary index name
- Fix error handling select with invalid type value
- Get rid of performing map-reduce for single-replicaset operations
crud-router
Cartridge rolebucket_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.
- 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
- Select with
==
conditions bugs - Select with conditions by fields with collations
- CRUD operations:
- replace
- upsert
- Output format for CRUD operations changed to set of rows and metadata
- Insert/replace/upsert methods now accept tuples. To process unflattened objects *_object methods are introduced.
pairs
acceptsuse_tomap
flag to return tuples or objects
checks
is disabled for internal functions by defaultlimit
option is renamed tofirst
- Reverse pagination (negative
first
) is supported after
option accepts a tuple
- Basic CRUD operations:
- insert
- get
- select
- update
- delete
pairs
function to iterate across the distributed space