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

Distributed table creation and drop for generic sharding. #5026

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dorinhogea
Copy link
Contributor

Introduces syntax:
CREATE TABLE .... PARTITIONED BY TESTGENSHARD(dbname1, dbname2, dbname3, dbname4)

Dropping a partitioned table using the partition name drops the whole partition in one transaction.

Use a stub to interface with rest of sharding code, to provide shardnames, number of shards (hardcded 4), and location of databases. The only flexible parameter is for the database names used to store the shards. The stub code is marked to the best ability by the framing message: "THIS SECTION IS A STUB; TO BE REPLACED BY ACTUAL PARTITION SCHEMA". "END: THIS SECTION IS A STUB; TO BE REPLACED BY ACTUAL PARTITION SCHEMA".

In that sense, the code does not store anything in llmeta, and passes all configuration through SET and schema change options. It simplifies the partition by only using an table alias instead of a full-fledged view.

Testcase will create the partition, check it and remove it. [The row routing for read and writes is part of a separate PR, so no actual rows are read/written to the partition].

Copy link

@roborivers roborivers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding style check: Error. ⚠.
Smoke testing: Error ⚠.
Cbuild submission: Error ⚠.
Regression testing: 0/0 tests failed ⚠.

Copy link

@roborivers roborivers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding style check: Error. ⚠.
Smoke testing: Error ⚠.
Cbuild submission: Error ⚠.
Regression testing: 0/0 tests failed ⚠.

Introduces syntax:
CREATE TABLE .... PARTITIONED BY TESTGENSHARD(dbname1, dbname2, dbname3, dbname4)

Dropping a partitioned table using the partition name drops the whole partition in one transaction.

Use a stub to interface with rest of sharding code, to provide shardnames, number of shards (hardcded 4), and location of databases.
The only flexible parameter is for the database names used to store the shards.
The stub code is marked to the best ability by the framing message:
"THIS SECTION IS A STUB; TO BE REPLACED BY ACTUAL PARTITION SCHEMA".
"END: THIS SECTION IS A STUB; TO BE REPLACED BY ACTUAL PARTITION SCHEMA".

In that sense, the code does not store anything in llmeta, and passes all configuration through SET and schema change options.
It simplifies the partition by only using an table alias instead of a full-fledged view.

Testcase will create the partition, check it and remove it.
[The row routing for read and writes is part of a separate PR, so no actual rows are read/written to the partition].

Signed-off-by: Dorin Hogea <[email protected]>
Copy link

@roborivers roborivers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding style check: Error. ⚠.
Smoke testing: Error ⚠.
Cbuild submission: Error ⚠.
Regression testing: 0/0 tests failed ⚠.

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

Successfully merging this pull request may close these issues.

2 participants