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

Column <column_name> already exists when querying a metric #4978

Closed
0neSe7en opened this issue Nov 12, 2024 · 2 comments
Closed

Column <column_name> already exists when querying a metric #4978

0neSe7en opened this issue Nov 12, 2024 · 2 comments
Labels
C-bug Category Bugs

Comments

@0neSe7en
Copy link

What type of bug is this?

Data corruption, Unexpected error

What subsystems are affected?

Standalone mode, Query Engine

Minimal reproduce step

I sent the metrics via Prometheus remote write. it's working at first, but after a while getting Column <column_name> already exists error.

select greptime_value from test_metrics;  -- got {"code":3001,"error":"Column ap_mac already exists","execution_time_ms":1}

-- I retrieved the table id
SELECT * FROM "tables" where "table_name" == 'test_metrics';
-- and query from greptime_physical_table directly
select * from greptime_physical_table where __table_id == 1898 order by greptime_timestamp desc limit 10; -- working

I have 284 metrics, and two of them are getting this error

What did you expect to see?

the rows

What did you see instead?

Column ap_mac already exists

What operating system did you use?

Debian 11 Docker 27.3.1

What version of GreptimeDB did you use?

0.9.5

Relevant log output and stack trace

greptime-1  | 2024-11-12T11:40:24.066803Z ERROR sql{protocol="http" request_type="sql"}: servers::http::error_result: Failed to handle HTTP request err=0: , at src/common/recordbatch/src/adapter.rs:291:55
greptime-1  | 1: External(0: External error, at src/query/src/dist_plan/merge_scan.rs:235:22
greptime-1  | 1: Region query error, at src/frontend/src/instance/region_query.rs:52:14
greptime-1  | 2: Failed to query, at src/frontend/src/instance/region_query.rs:73:14
greptime-1  | 3: External error, at src/frontend/src/instance/standalone.rs:106:14
greptime-1  | 4: Failed to execute logical plan, at /greptimedb/src/datanode/src/region_server.rs:177:14
greptime-1  | 5: Failed to get metadata from engine metric for region_id 8151847927808(1898, 0), at src/query/src/dummy_catalog.rs:251:18
greptime-1  | 6: Invalid region metadata, at src/metric-engine/src/engine/read.rs:247:14
greptime-1  | 7: Invalid schema, at src/store-api/src/metadata.rs:644:63
greptime-1  | 8: Column ap_mac already exists, at src/datatypes/src/schema.rs:270:9)
@0neSe7en 0neSe7en added the C-bug Category Bugs label Nov 12, 2024
@WenyXu
Copy link
Member

WenyXu commented Nov 12, 2024

Thanks, it's a known issue, and it will be fixed in #4972

@waynexia
Copy link
Member

Closed by #4792

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category Bugs
Projects
None yet
Development

No branches or pull requests

3 participants