This article is organized by typical scenarios users may encounter during table creation, providing cause analysis and solutions.
When syntax errors occur in a long CREATE TABLE statement, the error messages may be incomplete. Common causes are as follows:
| Cause | Investigation and Correction Suggestions |
|---|---|
| Syntax structure error | Carefully read HELP CREATE TABLE; and check the relevant syntax structure against it |
| Use of reserved words | When 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 characters | Non-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 |
Failed to create partition [xxx]. TimeoutDoris 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).
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}:
10001): Backend ID10010): Tablet IDThe example above indicates that creating Tablet ID 10010 failed on the Backend with ID 10001.
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.
Handle the issue according to common errors
| Error Symptom | Possible Cause | Suggested 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 report | Connectivity issues exist between FE and BE | Refer to Installation and Deployment to check network connectivity between FE and BE |
| Memory pre-allocation failed | The byte length of a single row in the table exceeds 100 KB | Adjust the table schema to reduce the length of single-row data |
Too many open files | The number of open file handles exceeds the Linux system limit | Modify the file handle limit of the Linux system |
If data shard creation only times out, you can extend the timeout through the following two parameters in fe.conf:
| Parameter | Default Value | Description |
|---|---|---|
tablet_create_timeout_second | 1 second | Timeout for creating a single Tablet |
max_create_table_timeout_second | 60 seconds | Maximum 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.
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:
For more detailed information about data partitioning, refer to the following: