Skip to content

Releases: tarantool/crud

0.11.0

20 Apr 10:50
Compare
Choose a tag to compare

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, use

    crud.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

  • Add automatic reload of DDL schema (#212).
  • Fix processing storage error for tuple-merger implementation of
    select/pairs (#271).
  • Do not change input tuple object in requests.
  • Optimize select with known bucket_id (#234).

0.10.0

01 Dec 12:47
Compare
Choose a tag to compare

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 specify bucket_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

19 Oct 22:17
Compare
Choose a tag to compare

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

  • Ignoring of an error in crud.pairs() (#144).
  • Damaging of opts table by CRUD methods (#192).
  • Ignoring of bucket_id option in crud.select()/crud.pairs() (#220).

0.8.0

02 Jul 18:51
dc618eb
Compare
Choose a tag to compare

Bug fixes

  • Invalid results for pagination queries when filtering on
    a part of a composite index

Features

  • Added jsonpath indexes support for queries
  • tuple-merger module updated to 0.0.2

0.7.1

22 Jun 08:42
4f66605
Compare
Choose a tag to compare

Bug fixes

  • Compatibility with Tarantool versions that don't support key_def and merger modules.
  • Ignoring opts.first on crud.pairs call
  • External keydef compatibility with built-in merger

0.7.0

27 May 11:29
0008f95
Compare
Choose a tag to compare

Bug fixes

  • Fixed error for partial result option if field contains box.NULL.
  • Fixed incorrect crud results during reverse pagination
    without specifying batch_size.
  • Fixed crud roles reload:
    • before this patch reload wasn't fair - reloading tuple.merger
      and tuple.keydef modules failed, and crud started to use
      crud.select.compat.select_old module with naive merger implementation;
    • fair reloading tuple.merger and tuple.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 and tuple.keydef modules now is checked
      by calling package.search, built-in merger and keydef modules are used
      if present in package.loaded. It allows to avoid ignoring errors on checking
      modules existing via pcall(require, '<module_name>').
  • Fixed some cases when module ignored schema updates.

Features

  • cut_rows and cut_objects functions to cut off scan key and
    primary key values that were merged to the select/pairs partial result.
  • Functions stop() for the roles crud-storage and crud-router.
  • Option flag force_map_call for select()/pairs()
    to disable the bucket_id computation from primary key.
  • crud.min and crud.max functions to find the minimum and maximum values in the specified index.
  • Added support for jsonpath for select.

0.6.0

29 Mar 13:04
c961e16
Compare
Choose a tag to compare

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 for Tarantool version <= 2.2.

  • Pagination over multipart primary key.

Features

  • mode, prefer_replica and balance 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

10 Mar 12:24
a7e0dd2
Compare
Choose a tag to compare

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

02 Dec 11:49
Compare
Choose a tag to compare

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 returned nil.

Features

  • truncate operation
  • iterator returned by pairs is compatible with luafun

0.3.0

26 Oct 16:10
c5fc183
Compare
Choose a tag to compare

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 as opts.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 to crud.init_storage and crud.init_router