Skip to main content

Common Table Creation Issues

This article is organized by typical scenarios users may encounter during table creation, providing cause analysis and solutions.

Scenario 1: Syntax Errors in the CREATE TABLE Statement

When syntax errors occur in a long CREATE TABLE statement, the error messages may be incomplete. Common causes are as follows:

CauseInvestigation and Correction Suggestions
Syntax structure errorCarefully read HELP CREATE TABLE; and check the relevant syntax structure against it
Use of reserved wordsWhen a custom name conflicts with a reserved word, enclose it in backticks `. It is recommended that all custom names be enclosed in backticks
Chinese characters or full-width charactersNon-utf-8 encoded Chinese characters, or hidden full-width characters (such as full-width spaces or full-width punctuation), can cause syntax errors. Use a text editor with a "show invisible characters" feature for inspection

Scenario 2: Table Creation Reports Failed to create partition [xxx]. Timeout

Doris creates tables one Partition at a time. When a Partition fails to be created, the error above is reported.

Even if the CREATE TABLE statement does not explicitly define a Partition, Doris creates an immutable default Partition for the table. Therefore, when problems occur during table creation, Failed to create partition is also reported.

This error is usually caused by problems encountered by the BE when creating data shards (Tablets).

Investigation Steps

  1. Locate the failed Backend and Tablet

    Search fe.log for the Failed to create partition log at the corresponding time point. The log contains a series of number pairs similar to {10001-10010}:

    • The first number (10001): Backend ID
    • The second number (10010): Tablet ID

    The example above indicates that creating Tablet ID 10010 failed on the Backend with ID 10001.

  2. Check the BE log to locate the error message

    Go to the be.INFO log of the corresponding Backend and search for logs related to the Tablet ID within the corresponding time period to find the specific error message.

  3. Handle the issue according to common errors

Common Causes of Tablet Creation Failure

Error SymptomPossible CauseSuggested Action
The BE did not receive the related task (no Tablet ID-related logs can be found in be.INFO), or the BE created the Tablet successfully but failed to reportConnectivity issues exist between FE and BERefer to Installation and Deployment to check network connectivity between FE and BE
Memory pre-allocation failedThe byte length of a single row in the table exceeds 100 KBAdjust the table schema to reduce the length of single-row data
Too many open filesThe number of open file handles exceeds the Linux system limitModify the file handle limit of the Linux system

Adjust the Table Creation Timeout

If data shard creation only times out, you can extend the timeout through the following two parameters in fe.conf:

ParameterDefault ValueDescription
tablet_create_timeout_second1 secondTimeout for creating a single Tablet
max_create_table_timeout_second60 secondsMaximum timeout for the entire table creation operation

The overall timeout is calculated as follows:

min(tablet_create_timeout_second * replication_num, max_create_table_timeout_second)

For detailed parameter descriptions, refer to FE Configuration.

Scenario 3: The CREATE TABLE Command Does Not Return for a Long Time

The Doris CREATE TABLE command is synchronous. Its timeout is currently set in a relatively simple way:

timeout = tablet num * replication num (seconds)

The corresponding symptoms and recommendations are as follows:

  • If many data shards are created and some of them fail, the error may be returned only after a long timeout.
  • Under normal conditions, the CREATE TABLE statement returns within a few seconds or tens of seconds.
  • If it does not return after one minute, cancel the operation directly and check the FE or BE logs for related errors.

Further Help

For more detailed information about data partitioning, refer to the following: