Skip to content

[1pt] feedback: Data model | Add a sharded space example #2474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TarantoolBot opened this issue Nov 30, 2021 · 0 comments · Fixed by #3069
Closed

[1pt] feedback: Data model | Add a sharded space example #2474

TarantoolBot opened this issue Nov 30, 2021 · 0 comments · Fixed by #3069
Labels
add details [nature] More details needed, some info missing. Documentation is incomplete. example Problem with a code example. server [area] Task relates to Tarantool's server (core) functionality

Comments

@TarantoolBot
Copy link
Collaborator

TarantoolBot commented Nov 30, 2021

Product: Tarantool
Audience/target: dev
Root document: https://www.tarantool.io/en/doc/latest/book/box/data_model/
SME: @ Totktonada

Details

The current example doesn't illustrate sharded spaces. It would be helpful if we reflected a sharding situation in the example. Check with the SME if we can replace the current example with the one below.


<…>describe a data schema
in the YAML format in a declarative way.
|The schema would look something like this|:
spaces:
users:
engine: memtx
is_local: false
<…>

https://www.tarantool.io/en/doc/latest/book/box/data_model/#data-schema-description-using-the-ddl-module

Create example for sharded space:

Something like this:

spaces:
    users:
      engine: memtx
      is_local: false
      temporary: false
      format:
      - {name: user_id, type: uuid, is_nullable: false}
      - {name: fullname, type: string,  is_nullable: false}
      - {name: bucket_id, type: unsigned, is_nullable: false}
      indexes:
      - name: user_id
        unique: true
        parts: [{path: user_id, type: uuid, is_nullable: false}]
        type: HASH
      - name: bucket_id
        unique: false
        parts: [{path: bucket_id, type: unsigned, is_nullable: false}]
        type: TREE
      sharding_key: [user_id]
      sharding_func: test_module.sharding_func
@patiencedaur patiencedaur changed the title feedback: Data model | Tarantool [2pt] feedback: Data model | Add a sharded space example Dec 2, 2021
@patiencedaur patiencedaur added this to the Estimate [@patiencedaur] milestone Dec 2, 2021
@patiencedaur patiencedaur added the add details [nature] More details needed, some info missing. Documentation is incomplete. label Dec 2, 2021
@patiencedaur patiencedaur changed the title [2pt] feedback: Data model | Add a sharded space example [1pt] feedback: Data model | Add a sharded space example Dec 2, 2021
@patiencedaur patiencedaur added the server [area] Task relates to Tarantool's server (core) functionality label Dec 2, 2021
@patiencedaur patiencedaur removed this from the Estimate [@patiencedaur] milestone Dec 3, 2021
@patiencedaur patiencedaur added the example Problem with a code example. label Feb 28, 2022
patiencedaur added a commit that referenced this issue Aug 5, 2022
p7nov pushed a commit that referenced this issue Aug 11, 2022
* Provide links to Lua and LuaJIT data types

Resolves #1318

* Replace wrong link to Lua 5.2 with correct to Lua 5.1

Resolves #1321

* Provide a more relevant link to Lua table manual

Resolves #1785

* Add msgpack.NULL to data types table

Resolves #927

* Add a sharded space example

Resolves #2474

* Clarify box.cfg.listen value type

Resolves #2855
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add details [nature] More details needed, some info missing. Documentation is incomplete. example Problem with a code example. server [area] Task relates to Tarantool's server (core) functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants