horaedb
horaedb copied to clipboard
Table enginle close table after the table was successfully created
Describe this problem
logs like this:
2023-01-03 19:51:49.824 INFO [server/src/handlers/sql.rs:115] sql handler try to process request, request_id:3619, request:Request { query: "CREATE TABLE SPM_637057036_INFLUENCE_DEFAULT(period timestamp NOT NULL ,TraceId string TAG NULL ,_result string TAG NULL ,server string TAG NULL ,idc string TAG NULL ,ldc string TAG NULL ,TIMESTAMP KEY(period)) ENGINE=Analytic WITH( ttl='3d', update_mode='APPEND')" }
2023-01-03 19:51:49.824 INFO [meta_client/src/meta_impl.rs:123] Meta client try to create table, req:CreateTableRequest { header: Some(RequestHeader { node: "11.39.17.21:8831", cluster_name: "defaultCluster" }), schema_name: "public", name: "SPM_637057036_INFLUENCE_DEFAULT", encoded_schema: [0, 10, 10, 10, 4, 116, 115, 105, 100, 16, 5, 32, 1, 10, 12, 10, 6, 112, 101, 114, 105, 111, 100, 16, 1, 32, 2, 10, 17, 10, 7, 84, 114, 97, 99, 101, 73, 100, 16, 4, 24, 1, 32, 3, 40, 1, 10, 17, 10, 7, 95, 114, 101, 115, 117, 108, 116, 16, 4, 24, 1, 32, 4, 40, 1, 10, 16, 10, 6, 115, 101, 114, 118, 101, 114, 16, 4, 24, 1, 32, 5, 40, 1, 10, 13, 10, 3, 105, 100, 99, 16, 4, 24, 1, 32, 6, 40, 1, 10, 13, 10, 3, 108, 100, 99, 16, 4, 24, 1, 32, 7, 40, 1, 16, 1, 24, 1, 34, 2, 0, 1], engine: "Analytic", create_if_not_exist: false, options: {"ttl": "3d", "update_mode": "APPEND"}, encoded_partition_info: [], partition_table_info: None }
2023-01-03 19:51:49.831 INFO [server/src/grpc/meta_event_service/mod.rs:98] Receive request from meta, req:CreateTableOnShardRequest { update_shard_info: Some(UpdateShardInfo { curr_shard_info: Some(ShardInfo { id: 4, role: Leader, version: 9 }), prev_version: 8 }), table_info: Some(TableInfo { id: 64, name: "SPM_637057036_INFLUENCE_DEFAULT", schema_id: 0, schema_name: "public" }), encoded_schema: [0, 10, 10, 10, 4, 116, 115, 105, 100, 16, 5, 32, 1, 10, 12, 10, 6, 112, 101, 114, 105, 111, 100, 16, 1, 32, 2, 10, 17, 10, 7, 84, 114, 97, 99, 101, 73, 100, 16, 4, 24, 1, 32, 3, 40, 1, 10, 17, 10, 7, 95, 114, 101, 115, 117, 108, 116, 16, 4, 24, 1, 32, 4, 40, 1, 10, 16, 10, 6, 115, 101, 114, 118, 101, 114, 16, 4, 24, 1, 32, 5, 40, 1, 10, 13, 10, 3, 105, 100, 99, 16, 4, 24, 1, 32, 6, 40, 1, 10, 13, 10, 3, 108, 100, 99, 16, 4, 24, 1, 32, 7, 40, 1, 16, 1, 24, 1, 34, 2, 0, 1], engine: "Analytic", create_if_not_exist: false, options: {"update_mode": "APPEND", "ttl": "3d"}, encoded_partition_info: [] }
2023-01-03 19:51:49.831 INFO [analytic_engine/src/engine.rs:75] Table engine impl create table, space_id:0, request:CreateTableRequest { catalog_name: "ceresdb", schema_name: "public", schema_id: SchemaId(0), table_id: TableId(64), table_name: "SPM_637057036_INFLUENCE_DEFAULT", table_schema: Schema { timestamp_index: 1, tsid_index: Some(0), column_schemas: ColumnSchemas { columns: [ColumnSchema { id: 1, name: "tsid", data_type: UInt64, is_nullable: false, is_tag: false, comment: "", escaped_name: "tsid", default_value: None }, ColumnSchema { id: 2, name: "period", data_type: Timestamp, is_nullable: false, is_tag: false, comment: "", escaped_name: "period", default_value: None }, ColumnSchema { id: 3, name: "TraceId", data_type: String, is_nullable: true, is_tag: true, comment: "", escaped_name: "TraceId", default_value: None }, ColumnSchema { id: 4, name: "_result", data_type: String, is_nullable: true, is_tag: true, comment: "", escaped_name: "_result", default_value: None }, ColumnSchema { id: 5, name: "server", data_type: String, is_nullable: true, is_tag: true, comment: "", escaped_name: "server", default_value: None }, ColumnSchema { id: 6, name: "idc", data_type: String, is_nullable: true, is_tag: true, comment: "", escaped_name: "idc", default_value: None }, ColumnSchema { id: 7, name: "ldc", data_type: String, is_nullable: true, is_tag: true, comment: "", escaped_name: "ldc", default_value: None }] }, version: 1, primary_key_indexes: [0, 1] }, engine: "Analytic", options: {"update_mode": "APPEND", "ttl": "3d"}, state: Stable, shard_id: 4, cluster_version: 1, partition_info: None }
2023-01-03 19:51:49.831 INFO [analytic_engine/src/instance/create.rs:31] Instance create table, request:CreateTableRequest { catalog_name: "ceresdb", schema_name: "public", schema_id: SchemaId(0), table_id: TableId(64), table_name: "SPM_637057036_INFLUENCE_DEFAULT", table_schema: Schema { timestamp_index: 1, tsid_index: Some(0), column_schemas: ColumnSchemas { columns: [ColumnSchema { id: 1, name: "tsid", data_type: UInt64, is_nullable: false, is_tag: false, comment: "", escaped_name: "tsid", default_value: None }, ColumnSchema { id: 2, name: "period", data_type: Timestamp, is_nullable: false, is_tag: false, comment: "", escaped_name: "period", default_value: None }, ColumnSchema { id: 3, name: "TraceId", data_type: String, is_nullable: true, is_tag: true, comment: "", escaped_name: "TraceId", default_value: None }, ColumnSchema { id: 4, name: "_result", data_type: String, is_nullable: true, is_tag: true, comment: "", escaped_name: "_result", default_value: None }, ColumnSchema { id: 5, name: "server", data_type: String, is_nullable: true, is_tag: true, comment: "", escaped_name: "server", default_value: None }, ColumnSchema { id: 6, name: "idc", data_type: String, is_nullable: true, is_tag: true, comment: "", escaped_name: "idc", default_value: None }, ColumnSchema { id: 7, name: "ldc", data_type: String, is_nullable: true, is_tag: true, comment: "", escaped_name: "ldc", default_value: None }] }, version: 1, primary_key_indexes: [0, 1] }, engine: "Analytic", options: {"update_mode": "APPEND", "ttl": "3d"}, state: Stable, shard_id: 4, cluster_version: 1, partition_info: None }
2023-01-03 19:51:49.831 INFO [analytic_engine/src/meta/details.rs:228] Manifest store update, request:MetaUpdateRequest { location: WalLocation { versioned_region_id: VersionedRegionId { version: 1, id: 4 }, table_id: 64 }, meta_update: AddTable(AddTableMeta { space_id: 0, table_id: TableId(64), table_name: "SPM_637057036_INFLUENCE_DEFAULT", schema: Schema { timestamp_index: 1, tsid_index: Some(0), column_schemas: ColumnSchemas { columns: [ColumnSchema { id: 1, name: "tsid", data_type: UInt64, is_nullable: false, is_tag: false, comment: "", escaped_name: "tsid", default_value: None }, ColumnSchema { id: 2, name: "period", data_type: Timestamp, is_nullable: false, is_tag: false, comment: "", escaped_name: "period", default_value: None }, ColumnSchema { id: 3, name: "TraceId", data_type: String, is_nullable: true, is_tag: true, comment: "", escaped_name: "TraceId", default_value: None }, ColumnSchema { id: 4, name: "_result", data_type: String, is_nullable: true, is_tag: true, comment: "", escaped_name: "_result", default_value: None }, ColumnSchema { id: 5, name: "server", data_type: String, is_nullable: true, is_tag: true, comment: "", escaped_name: "server", default_value: None }, ColumnSchema { id: 6, name: "idc", data_type: String, is_nullable: true, is_tag: true, comment: "", escaped_name: "idc", default_value: None }, ColumnSchema { id: 7, name: "ldc", data_type: String, is_nullable: true, is_tag: true, comment: "", escaped_name: "ldc", default_value: None }] }, version: 1, primary_key_indexes: [0, 1] }, opts: TableOptions { segment_duration: None, update_mode: Append, storage_format: Columnar, enable_ttl: true, ttl: ReadableDuration(259200s), arena_block_size: 2097152, write_buffer_size: 33554432, compaction_strategy: Default, num_rows_per_row_group: 8192, compression: Zstd }, partition_info: None }) }
2023-01-03 19:51:49.851 INFO [meta_client/src/meta_impl.rs:133] Meta client finish creating table, resp:CreateTableResponse { header: Some(ResponseHeader { code: 0, error: "" }), created_table: Some(TableInfo { id: 64, name: "SPM_637057036_INFLUENCE_DEFAULT", schema_id: 0, schema_name: "public" }), shard_info: Some(ShardInfo { id: 4, role: Leader, version: 9 }) }
2023-01-03 19:51:49.851 INFO [interpreters/src/table_manipulator/meta_based.rs:94] Create table by meta successfully, req:CreateTableRequest { schema_name: "public", name: "SPM_637057036_INFLUENCE_DEFAULT", encoded_schema: [0, 10, 10, 10, 4, 116, 115, 105, 100, 16, 5, 32, 1, 10, 12, 10, 6, 112, 101, 114, 105, 111, 100, 16, 1, 32, 2, 10, 17, 10, 7, 84, 114, 97, 99, 101, 73, 100, 16, 4, 24, 1, 32, 3, 40, 1, 10, 17, 10, 7, 95, 114, 101, 115, 117, 108, 116, 16, 4, 24, 1, 32, 4, 40, 1, 10, 16, 10, 6, 115, 101, 114, 118, 101, 114, 16, 4, 24, 1, 32, 5, 40, 1, 10, 13, 10, 3, 105, 100, 99, 16, 4, 24, 1, 32, 6, 40, 1, 10, 13, 10, 3, 108, 100, 99, 16, 4, 24, 1, 32, 7, 40, 1, 16, 1, 24, 1, 34, 2, 0, 1], engine: "Analytic", create_if_not_exist: false, options: {"ttl": "3d", "update_mode": "APPEND"}, partition_table_info: None, encoded_partition_info: [] }, resp:CreateTableResponse { created_table: TableInfo { id: 64, name: "SPM_637057036_INFLUENCE_DEFAULT", schema_id: 0, schema_name: "public" }, shard_info: ShardInfo { id: 4, role: Leader, version: 9 } }
2023-01-03 19:51:49.851 INFO [server/src/handlers/sql.rs:186] sql handler finished, request_id:3619, cost:27ms, request:Request { query: "CREATE TABLE SPM_637057036_INFLUENCE_DEFAULT(period timestamp NOT NULL ,TraceId string TAG NULL ,_result string TAG NULL ,server string TAG NULL ,idc string TAG NULL ,ldc string TAG NULL ,TIMESTAMP KEY(period)) ENGINE=Analytic WITH( ttl='3d', update_mode='APPEND')" }
2023-01-03 19:52:04.485 INFO [analytic_engine/src/engine.rs:165] Table engine impl close table, space_id:0, request:CloseTableRequest { catalog_name: "ceresdb", schema_name: "public", schema_id: SchemaId(0), table_name: "SPM_637057036_INFLUENCE_DEFAULT", table_id: TableId(64), engine: "Analytic" }
2023-01-03 19:52:04.485 INFO [analytic_engine/src/instance/close.rs:25] Instance close table, request:CloseTableRequest { catalog_name: "ceresdb", schema_name: "public", schema_id: SchemaId(0), table_name: "SPM_637057036_INFLUENCE_DEFAULT", table_id: TableId(64), engine: "Analytic" }
Steps to reproduce
Create different tables multiple times
Expected behavior
Table engine do not close table
Additional Information
No response