Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to create metric table #3612

Closed
WenyXu opened this issue Mar 29, 2024 · 0 comments · Fixed by #3614
Closed

Failed to create metric table #3612

WenyXu opened this issue Mar 29, 2024 · 0 comments · Fixed by #3614
Labels
O-fuzz Found by fuzz tests

Comments

@WenyXu
Copy link
Member

WenyXu commented Mar 29, 2024

What type of bug is this?

Unexpected error

What subsystems are affected?

Table Engine

Minimal reproduce step

Run following sql:

CREATE TABLE quod(
  `accuSAntium` TIMESTAMP(6) TIME INDEX,
  `MoLESTIAs` BIGINT
) ENGINE = metric with ("physical_metric_table" = "");
CREATE TABLE `auT`(
  incidunt TIMESTAMP(3) TIME INDEX,
  `QuaErAT` BOOLEAN,
  `REPREHenDERIt` BOOLEAN DEFAULT true,
  `Et` INT NULL,
  `AutEM` INT,
  esse DOUBLE,
  `Tempore` BOOLEAN,
  `reruM` BOOLEAN,
  `eRrOR` BOOLEAN NULL,
  `cOMmodi` BOOLEAN,
  `PERfERENdIS` DOUBLE,
  `eSt` FLOAT DEFAULT 0.70978713,
  PRIMARY KEY(`cOMmodi`, `PERfERENdIS`, esse)
) ENGINE = metric with ("physical_metric_table" = "");

What did you expect to see?

Create table successfully

What did you see instead?

ERROR 1815 (HY000): Invalid metadata, number of primary key columns 2 not equal to tag columns 5

What operating system did you use?

doesn't matter

What version of GreptimeDB did you use?

main

Relevant log output and stack trace

2024-03-29T08:25:47.738960Z ERROR LocalManager::submit_root_procedure: common_procedure::local::runner: Failed to execute procedure metasrv-procedure::CreateTable-6bac1447-c266-48e0-8368-7c08c27a0193, retry: false err=0: Failed to execute procedure due to external error
1: Failed to operate on datanode: peer-0(), at src/common/meta/src/ddl/utils.rs:33:27
2: External error, at src/frontend/src/instance/standalone.rs:78:14
3: Operation to region server failed, at src/frontend/src/instance/standalone.rs:60:14
4: Execute gRPC request error, at src/datanode/src/region_server.rs:265:22
5: Failed to handle request for region 4402341478400(1025, 0), at src/datanode/src/region_server.rs:502:14
6: Failed to create mito region, region type: data, at src/metric-engine/src/engine/create.rs:121:14
7: Invalid region metadata, at /home/weny/Projects/greptimedb/src/mito2/src/worker/handle_create.rs:56:40
8: Invalid metadata, number of primary key columns 2 not equal to tag columns 5, at src/store-api/src/metadata.rs:442:9
2024-03-29T08:25:47.739199Z  INFO LocalManager::submit_root_procedure: common_procedure::local::runner: Runner metasrv-procedure::CreateTable-6bac1447-c266-48e0-8368-7c08c27a0193 exits
2024-03-29T08:25:47.740942Z ERROR on_query{protocol="mysql"}:mysql::do_query:do_query: frontend::instance: Failed to execute query: CREATE TABLE `auT`(
  incidunt TIMESTAMP(3) TIME INDEX,
  `QuaErAT` BOOLEAN,
  `REPREHenDERIt` BOOLEAN DEFAULT true,
  `Et` INT NULL,
  `AutEM` INT,
  esse DOUBLE,
  `Tempore` BOOLEAN,
  `reruM` BOOLEAN,
  `eRrOR` BOOLEAN NULL,
  `cOMmodi` BOOLEAN,
  `PERfERENdIS` DOUBLE,
  `eSt` FLOAT DEFAULT 0.70978713,
  PRIMARY KEY(`cOMmodi`, `PERfERENdIS`, esse)
) ENGINE = metric with ("physical_metric_table" = "") err=0: Table operation error, at src/frontend/src/instance.rs:272:14
1: Failed to execute ddl, at /home/weny/Projects/greptimedb/src/operator/src/statement/ddl.rs:600:14
2: Failed to wait procedure done, at src/common/meta/src/ddl_manager.rs:356:14
3: Failed to execute procedure, at /home/weny/Projects/greptimedb/src/common/procedure/src/watcher.rs:35:43
4: Failed to execute procedure due to external error
5: Failed to operate on datanode: peer-0(), at src/common/meta/src/ddl/utils.rs:33:27
6: External error, at src/frontend/src/instance/standalone.rs:78:14
7: Operation to region server failed, at src/frontend/src/instance/standalone.rs:60:14
8: Execute gRPC request error, at src/datanode/src/region_server.rs:265:22
9: Failed to handle request for region 4402341478400(1025, 0), at src/datanode/src/region_server.rs:502:14
10: Failed to create mito region, region type: data, at src/metric-engine/src/engine/create.rs:121:14
11: Invalid region metadata, at /home/weny/Projects/greptimedb/src/mito2/src/worker/handle_create.rs:56:40
12: Invalid metadata, number of primary key columns 2 not equal to tag columns 5, at src/store-api/src/metadata.rs:442:9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-fuzz Found by fuzz tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant