-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Feature] Automatically specifying tablet when create table #10614
Conversation
fc4f7ae
to
8317546
Compare
fe/fe-core/src/main/java/com/starrocks/server/LocalMetastore.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/com/starrocks/server/LocalMetastore.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/com/starrocks/server/LocalMetastore.java
Outdated
Show resolved
Hide resolved
8eed501
to
ae0476f
Compare
fe/fe-core/src/main/java/com/starrocks/server/LocalMetastore.java
Outdated
Show resolved
Hide resolved
// The bucketNum will be given a small multiplier factor for small backends. | ||
if (backendNum <= recentPartitionNum) { | ||
avgBucketNum = 2 * backendNum; | ||
} else if (backendNum <= 6) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.5x and 1.2x may cause very unbalanced load between BEs when PoC testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PoC will only have the same backends. So I think the bucket is enough. And also the PoC backend will not be installed many nodes
fe/fe-core/src/main/java/com/starrocks/server/LocalMetastore.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/com/starrocks/server/LocalMetastore.java
Outdated
Show resolved
Hide resolved
d5a5b62
to
10ba730
Compare
run starrocks_fe_unittest |
d4f5b7b
to
000bb72
Compare
Specfiy the tablet num when create table is very noisy. Many users can not know how to give a right hint. The pull request try to eliminate the pain to specify the num. 1. If the table is created from scratch, the tablet num will be equal to the number of backends. ``` CREATE TABLE `test_table2` ( `pk1` bigint(20) NOT NULL COMMENT "", `pk2` date NOT NULL COMMENT "", `v0` varchar(65533) NOT NULL COMMENT "" ) ENGINE=OLAP PRIMARY KEY(`pk1`, `pk2`) DISTRIBUTED BY HASH(`pk1`) ``` 2. Add partition will use the last five partition size to calculate the tablet num. ``` ALTER TABLE test_table2 add partition p20220811 values less than("2022-08-11") ``` The num = total_size_of_last_five_partition / 10GB
Kudos, SonarCloud Quality Gate passed! |
[FE PR Coverage Check]😞 fail : 24 / 51 (47.06%) file detail
|
run starrocks_admit_test |
Shall we update the corresponding documentation? |
…et num (#11337) In this PR [Feature] Automatically specifying tablet when create table #10614, SR set default bucket num from 10 to 0, this would result in create mv failed when user not set bucket num. according to that PR, we use be numner to calculate bucket num SR do not support create mv on view, so we need to disable it at analyze stage
What type of PR is this:
Which issues of this PR fixes :
Fixes #
Specifying the tablet num when creating a table is frustrating.
Many users can not know how to give the right hint.
The pull request tries to eliminate the pain by automatically specifying the num.
If the table is created from scratch, the tablet num will be
speculated according to the number of backends.
Add partition will use the last five partition sizes to calculate the tablet num.
The num = total_size_of_last_five_partition / 1GB
Problem Summary(Required) :
Checklist: