Skip to content
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

Wrong assumption for sharding_index name #68

Open
ligurio opened this issue Jul 7, 2021 · 3 comments
Open

Wrong assumption for sharding_index name #68

ligurio opened this issue Jul 7, 2021 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@ligurio
Copy link
Member

ligurio commented Jul 7, 2021

vshard configuration has an option to specify a name or id of sharding index, by default it values is 'bucket_id'. It's up to the user to change it or keep the default value [1].

Source code of ddl/check.lua has a wrong assumption for sharding index name:

  1. https://www.tarantool.io/en/doc/latest/reference/reference_rock/vshard/vshard_ref/#confval-shard_index
@ligurio ligurio added the bug Something isn't working label Jul 7, 2021
@rosik
Copy link
Contributor

rosik commented Jul 9, 2021

The decision to make it so strict was conscious. We've interviewed many vshard users, and they all agreed that the custom sharding index is confusing.

@Totktonada
Copy link
Member

Well, let's wait until someone will ask for that.

@Totktonada Totktonada removed their assignment Mar 4, 2022
@Totktonada Totktonada added this to the wishlist milestone Mar 4, 2022
@R-omk
Copy link

R-omk commented Jul 18, 2023

More on the topic:

https://github.com/tarantool/ddl/blob/master/ddl/check.lua#L641

index of %s type can't be composite

This is not a correct statement.

We always use a composite index for sharding. The tail of such index is a surrogate or natural key and whole index is primary key for space.

https://github.com/tarantool/vshard/blob/b3c27b32637863e9a03503e641bb7c8c69779a00/vshard/storage/init.lua#L1835C18-L1836

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants