diff --git a/CHANGELOG.md b/CHANGELOG.md index 68c09aced..7c98f2658 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. * `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. +* CRUD operations calculates bucket id automatically using sharding + key specified with DDL schema or in `_ddl_sharding_key` space. ## [0.8.0] - 02-07-21 diff --git a/README.md b/README.md index 29ae1145b..85179bd9e 100644 --- a/README.md +++ b/README.md @@ -54,10 +54,12 @@ crud.unflatten_rows(res.rows, res.metadata) * A space should have a format. * By default, `bucket_id` is computed as `vshard.router.bucket_id_strcrc32(key)`, - where `key` is the primary key value. - Custom bucket ID can be specified as `opts.bucket_id` for each operation. - For operations that accepts tuple/object bucket ID can be specified as - tuple/object field as well as `opts.bucket_id` value. + where `key` is a value of sharding key. Sharding key can be set with [DDL + schema](https://github.com/tarantool/ddl#input-data-format) (see + `sharding_key` option) or in a space `_ddl_sharding_key`. By default sharding + key is a primary key. Custom bucket ID can be specified as `opts.bucket_id` + for each operation. For operations that accepts tuple/object bucket ID can be + specified as tuple/object field as well as `opts.bucket_id` value. ### Insert