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

support setting implTable config parameters on alter table add index #4955

Closed
antonkovalenko opened this issue May 28, 2024 · 1 comment
Closed
Assignees

Comments

@antonkovalenko
Copy link
Member

YDB Backup files store information about index table partitioning config and other parameters.
Internal implementation of Alter table add index operation must provide a way to set implTable configuration, e.g. number of partitions and their boundaries

@antonkovalenko antonkovalenko assigned ijon and jepett0 and unassigned ijon May 28, 2024
@jepett0
Copy link
Collaborator

jepett0 commented Jun 24, 2024

Some thoughts on the problem:

We need to decide on the optimal protocol for backups and restores of indices. The usual way to restore a scheme object is to execute the appropriate CreateSomeObjectRequest from the public API from the backup. However, index table partitioning settings cannot be specified in the CreateTableRequest currently.

We need to choose one of the solutions:

  • add index table partitioning settings description in the CreateTableRequest from public API
  • recreate a table with indices using CreateTableRequest + a AlterTableRequests for each indexImplTable

It seems that @CyberROFL is ok with the former solution, but would like to be able to execute AlterTableRequest not on the indexImplTable (because it is a part of the implementation), but on the index object itself.

AlterTableRequest on indexImplTable vs. AlterTableRequest on the index object itself:

Cons:

  1. We don't need to know implementation details of index table.

Pros:

  1. Such a backup / restore protocol could be implemented without any changes to the YDB code.
  2. Maybe it is ok for backup / restore to know index tables implementation details, because this procedures will not be a part of the user's code, but a part of backup / restore system.
  3. It is natural for a table to be a target of AlterTableRequest. One could argue that it is not obvious that it is possible to alter indexImplTable partitioning settings by issuing AlterTableRequest on its parent (the index object).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants