[Feature] Add HTTP API to add physical partition for random distribution tables#68503
[Feature] Add HTTP API to add physical partition for random distribution tables#68503wxl24life wants to merge 2 commits intoStarRocks:mainfrom
Conversation
|
@cursor review |
fe/fe-core/src/main/java/com/starrocks/server/LocalMetastore.java
Outdated
Show resolved
Hide resolved
|
@cursor review |
043a3a2 to
198a753
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 198a753d89
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
fe/fe-core/src/main/java/com/starrocks/http/rest/AddPhysicalPartitionAction.java
Outdated
Show resolved
Hide resolved
| * @param bucketNum the bucket number (0 to use system default) | ||
| * @param warehouseId the warehouse id for compute resource allocation | ||
| */ | ||
| public void addPhysicalPartition(Database db, OlapTable olapTable, String partitionName, |
There was a problem hiding this comment.
is it feasible to reuse addSubPartitions in LocalMetastore?
There was a problem hiding this comment.
addPhysicalPartition is a wrapper function of addSubPartitions, we need some pre-valication work
fe/fe-grammar/src/main/antlr/com/starrocks/grammar/StarRocks.g4
Outdated
Show resolved
Hide resolved
fe/fe-grammar/src/main/antlr/com/starrocks/grammar/StarRocksLex.g4
Outdated
Show resolved
Hide resolved
kevincai
left a comment
There was a problem hiding this comment.
As discussed offline, this HTTP REST API is not necessary.
…ion tables Signed-off-by: Drake Wang <wxl24life@gmail.com>
Signed-off-by: Drake Wang <wxl24life@gmail.com>
|
@kevincai Have refactored, please help to change this pr's title, thanks |
aecde86 to
2f6aa50
Compare
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 39 / 43 (90.70%) file detail
|
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
|



Why I'm doing:
StarRocks supports automatic bucketing for random distribution tables, where multiple physical partitions (sub-partitions) can exist within a single logical partition.
For cross-cluster data replication scenarios, the target cluster needs the ability to create matching physical partition structures. Since this capability is only used by internal migration tools (not end users), we expose it via ADMIN EXECUTE ON FRONTEND script
What I'm doing:
Fixes #68502
Add a LocalMetastore.addPhysicalPartition(dbName, tableName, partitionName, bucketNum) method that can be invoked via admin execute script:
Parameters:
Validation:
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: