Skip to content

Conversation

@xy720
Copy link
Member

@xy720 xy720 commented Sep 23, 2020

Proposed changes

Fix #4657

when a dynamic partitioned table is created, it will take some time to create the partitions. A exception needs to be thrown when users try to load data into this table, otherwise the load will stuck in loading phase all the time.

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have create an issue on (Fix #ISSUE), and have described the bug/feature there in detail
  • Compiling and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@xinghuayu007
Copy link
Contributor

this bug has been fixed at PR: #4621

// If this is a dynamic partitioned table, it will take some time to create the partition after the
// table is created, a exception needs to be thrown here
if (partitionIds.isEmpty()) {
throw new LoadException("data cannot be inserted into table with emtpy partition. " +
Copy link
Contributor

Choose a reason for hiding this comment

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

It is best to guide users in the prompt to wait for a while because of dynamic partitioning

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree. I think we can change the error msg like:

data cannot be inserted into table with emtpy partition... Use `SHOW PARTITIONS FROM tbl` to see the currenty partitions of this table. 

And also change the msg in error code ERR_EMPTY_PARTITION_IN_TABLE

Copy link
Member Author

Choose a reason for hiding this comment

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

ok. I will change the error msg.

morningman
morningman previously approved these changes Sep 26, 2020
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman morningman added the kind/fix Categorizes issue or PR as related to a bug. label Sep 26, 2020
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman morningman added the approved Indicates a PR has been approved by one committer. label Sep 27, 2020
@morningman morningman merged commit a202bf8 into apache:master Sep 28, 2020
@yangzhg yangzhg mentioned this pull request Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. kind/fix Categorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] The load will stuck in Loading phase when the table is a dynamic-partitioned-table

4 participants