+
Skip to content

Tags: tarantool/crud

Tags

1.2.0

Toggle 1.2.0's commit message
# 1.2.0

## Overview

This release adds two new flags: `noreturn` to ignore return values
excessive transfer and encoding/decoding for insert/replace/etc
(performance improvement up to 10% for batch requests) and
`fetch_latest_metadata` to force fetching latest space format metadata
right after a live migration (performance overhead may be up to 15%).

## New features

* 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).

## Bugfixes

* Crud DML operations returning stale schema for metadata generation.
  Now you may use `fetch_latest_metadata` flag to work with latest
  schema (#236).

1.1.1

Toggle 1.1.1's commit message
# 1.1.1

## Overview

This release fixes a critical bug that resulted in 100% storage CPU load and fixes a couple of issues related to the development pipeline.

## Changes
* Rename `DEV` environment variable to `TARANTOOL_CRUD_ENABLE_INTERNAL_CHECKS` (#250).

## Bugfixes
* Yield on select/pairs storage tuple lookup (#312).
* Fix loaded functions misleading coverage (#249).

1.1.0

Toggle 1.1.0's commit message
# 1.1.0

## Overview

This release introduces new API to check module version in code,
as well as several compatibility bugfixes.

## New features
* Add versioning support (PR #342).

## Bugfixes
* Fix pre-hotreload `cartridge` support (older than 2.4.0) (PR #341).
* Fix Tarantool version-dependent features for 3.x (PR #344).

1.0.0

Toggle 1.0.0's commit message
# 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

* 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 #337).

0.14.1

Toggle 0.14.1's commit message
# 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 for `insert_object`,
  `insert_object_many`, `replace_object`, `replace_object_many`.
  `false` by default. By setting the option to `true` 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

Toggle 0.14.0's commit message
# 0.14.0

## Overview

This release introduces vshard group and non-default vshard routers support.

To use a space Cartridge vshard group, pass the group name to a `vshard_group`
request option.

```lua
local res, err = crud.select('customers',
                             {{'<=', 'age', 35}},
                             {first = 10, vshard_group = 'hot'})
```

To use non-default vshard router, pass the router object to a request
`vshard_group` option.

```lua
local my_router = vshard.router.new(name, cfg)
local res, err = crud.select('customers',
                             {{'<=', 'age', 35}},
                             {first = 10, vshard_group = my_router})
```

## New features

* vshard group and non-default vshard routers support (#44).

## Changes

* Deprecate using space id in crud.len (#255).

0.13.0

Toggle 0.13.0's commit message
# 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

Toggle 0.12.1's commit message
# 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

* Fetching invalid ddl configuration (sharding key for non-existing space)
  is no longer breaks CRUD requests (#308, PR #309).
* ddl space record delete no more throws error if crud is used (#310, PR #311).
* crud sharding metainfo is now updated on ddl record delete (#310, PR #311).

0.12.0

Toggle 0.12.0's commit message
# 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).

  ```lua
  crud.insert_many(space_name, tuples, opts)
  crud.insert_object_many(space_name, objects, opts)
  ```
* Replace many tuples/objects at once (#193).

  ```lua
  crud.replace_many(space_name, tuples, opts)
  crud.replace_object_many(space_name, objects, opts)
  ```
* Perform many upsert operations at once (#193).

  ```lua
  crud.upsert_many(space_name, tuples_operation_data, opts)
  crud.upsert_object_many(space_name, objects_operation_data, opts)
  ```

Example:

```lua
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 is `false`)

  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 is `false`)

  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

Toggle 0.11.3's commit message
# 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 long `select` and `count` calls —
    an user can explicitly request a full scan through by passing
    `fullscan=true` to `select` or `count` 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 negative `first` (PR #295).
    * `crud.select()` if a condition is '=' or '==' with
    negative `first` (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]
    ...
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载