apache / horaedb

Apache HoraeDB (incubating) is a high-performance, distributed, cloud native time-series database.
https://horaedb.apache.org
Apache License 2.0
2.59k stars 203 forks source link

Timeout expired when creating table for the first time #670

Open MichaelLeeHZ opened 1 year ago

MichaelLeeHZ commented 1 year ago

Describe this problem

Error Occurred When Creating the Table for the first time:

{"code":500,"message":"Failed to handle request, err:Failed to execute interpreter, query:CREATE TABLE `demo4` ( `the_datetime` timestamp NOT NULL, `ext_props` string, `factor` string TAG, `gmt_create` timestamp, `gmt_modified` timestamp, `is_dfd_del` bigint, `period` string TAG, `symbol` string TAG, `value` double, TIMESTAMP KEY(the_datetime)) ENGINE=Analytic WITH(arena_block_size='1024', compaction_strategy='default', compression='ZSTD', enable_ttl='false', num_rows_per_row_group='8192', segment_duration='', storage_format='COLUMNAR', ttl='7d', update_mode='OVERWRITE', write_buffer_size='335544320'), err:Failed to execute create table, err:Failed to create table by table manipulator, err:Failed to create table, msg:failed to create table by meta client, req:CreateTableRequest { schema_name: \"public\", name: \"demo4\", encoded_schema: [0, 10, 10, 10, 4, 116, 115, 105, 100, 16, 5, 32, 1, 10, 18, 10, 12, 116, 104, 101, 95, 100, 97, 116, 101, 116, 105, 109, 101, 16, 1, 32, 2, 10, 17, 10, 9, 101, 120, 116, 95, 112, 114, 111, 112, 115, 16, 4, 24, 1, 32, 3, 10, 16, 10, 6, 102, 97, 99, 116, 111, 114, 16, 4, 24, 1, 32, 4, 40, 1, 10, 18, 10, 10, 103, 109, 116, 95, 99, 114, 101, 97, 116, 101, 16, 1, 24, 1, 32, 5, 10, 20, 10, 12, 103, 109, 116, 95, 109, 111, 100, 105, 102, 105, 101, 100, 16, 1, 24, 1, 32, 6, 10, 18, 10, 10, 105, 115, 95, 100, 102, 100, 95, 100, 101, 108, 16, 7, 24, 1, 32, 7, 10, 16, 10, 6, 112, 101, 114, 105, 111, 100, 16, 4, 24, 1, 32, 8, 40, 1, 10, 16, 10, 6, 115, 121, 109, 98, 111, 108, 16, 4, 24, 1, 32, 9, 40, 1, 10, 13, 10, 5, 118, 97, 108, 117, 101, 16, 2, 24, 1, 32, 10, 16, 1, 24, 2, 34, 2, 1, 2], engine: \"Analytic\", create_if_not_exist: false, options: {\"write_buffer_size\": \"335544320\", \"arena_block_size\": \"1024\", \"enable_ttl\": \"false\", \"update_mode\": \"OVERWRITE\", \"ttl\": \"7d\", \"segment_duration\": \"\", \"compression\": \"ZSTD\", \"compaction_strategy\": \"default\", \"num_rows_per_row_group\": \"8192\", \"storage_format\": \"COLUMNAR\"}, partition_table_info: None }, err:Failed to alloc table id, err:status: Cancelled, message: \"Timeout expired\", details: [], metadata: MetadataMap { headers: {} }"}

Steps to reproduce

My env is: shard_num: 512 wal: Oceanbase storage: Aliyun Oss version info:

CeresDB Version: 1.0.0-alpha02
Git branch: main
Git commit: 9e06dcc
Build: 2023-02-24T09:49:37.459728854+00:00

Steps to reproduce the error:

  1. I install and init cluster;
  2. Create a table
    curl --location --request POST 'http://127.0.0.1:5000/sql' \
    -d'
    CREATE TABLE `MMM_demo` (
    `name` string TAG,
    `value` double NOT NULL,
    `t` timestamp NOT NULL,
    timestamp KEY (t))
    ENGINE=Analytic
    with
    (enable_ttl="false")
    '

Expected behavior

Create table successfully.

Additional Information

No response

ShiKaiWi commented 1 year ago

This failure seems caused by CeresMeta, @ZuLiangWang can help troubleshoot this problem.