GreptimeTeam / greptimedb

An Open-Source, Cloud-Native, Unified Time Series Database for Metrics, Events, and Logs with SQL/PromQL supported. Available on GreptimeCloud.
https://greptime.com/
Apache License 2.0
4k stars 289 forks source link

Panic while reading information_schema.KEY_COLUMN_USAGE #4305

Closed evenyag closed 1 week ago

evenyag commented 1 week ago

What type of bug is this?

Crash

What subsystems are affected?

Distributed Cluster

Minimal reproduce step

Reading the information_schema.KEY_COLUMN_USAGE table

What did you expect to see?

Query success

What did you see instead?

Panic

What operating system did you use?

Unrelated

What version of GreptimeDB did you use?

0.8.1

Relevant log output and stack trace

ERROR read_from_region: common_telemetry::panic_hook: panicked at greptimedb/src/catalog/src/information_schema/key_column_usage.rs:259:21:
evenyag commented 1 week ago

The table might be dropped while iterating so it does not always exist.

https://github.com/GreptimeTeam/greptimedb/blob/3f4928effc1c416caf67cd5a12dfe1408f43c9de/src/catalog/src/information_schema/key_column_usage.rs#L228-L260