matrixorigin / matrixone

Hyperconverged cloud-edge native database
https://docs.matrixorigin.cn/en
Apache License 2.0
1.79k stars 277 forks source link

[Bug]: 特定SQL查询时间过长 #17158

Open xiaoshuwei opened 5 months ago

xiaoshuwei commented 5 months ago

Is there an existing issue for the same bug?

Branch Name

1.2-dev

Commit ID

994f3da

Other Environment Information

- Hardware parameters:
- OS type:
- Others:
aliyun dev环境

Actual Behavior

日志如下:

2024/06/26 07:01:50.466740 +0000 WARN meta/meta.go:95 trace {"elapsed": "20.322383672s", "rows": 1, "sql": "/* cloud_nonuser */SELECT SUM(size) AS size FROM (SELECT mo_table_size(reldatabase, relname) AS size FROM mo_catalog.mo_tables WHERE relkind IN('r', 'e', 'cluster', 'v') AND reldatabase = 'mysql') AS t;"}
2024/06/26 07:01:57.088838 +0000 WARN meta/meta.go:95 trace {"elapsed": "26.944445574s", "rows": 1, "sql": "/* cloud_nonuser */SELECT SUM(size) AS size FROM (SELECT mo_table_size(reldatabase, relname) AS size FROM mo_catalog.mo_tables WHERE relkind IN('r', 'e', 'cluster', 'v') AND reldatabase = 'tpcc_100') AS t;"}
2024/06/26 07:01:57.187651 +0000 WARN meta/meta.go:95 trace {"elapsed": "27.043348178s", "rows": 1, "sql": "/* cloud_nonuser */SELECT SUM(size) AS size FROM (SELECT mo_table_size(reldatabase, relname) AS size FROM mo_catalog.mo_tables WHERE relkind IN('r', 'e', 'cluster', 'v') AND reldatabase = 'system_metrics') AS t;"}
2024/06/26 07:01:57.922575 +0000 WARN meta/meta.go:95 trace {"elapsed": "27.77832579s", "rows": 1, "sql": "/* cloud_nonuser */SELECT SUM(size) AS size FROM (SELECT mo_table_size(reldatabase, relname) AS size FROM mo_catalog.mo_tables WHERE relkind IN('r', 'e', 'cluster', 'v') AND reldatabase = 'tpcc_10') AS t;"}
2024/06/26 07:02:08.899664 +0000 WARN meta/meta.go:95 trace {"elapsed": "38.755162271s", "rows": 1, "sql": "/* cloud_nonuser */SELECT SUM(size) AS size FROM (SELECT mo_table_size(reldatabase, relname) AS size FROM mo_catalog.mo_tables WHERE relkind IN('r', 'e', 'cluster', 'v') AND reldatabase = 'mo_catalog') AS t;"}
2024/06/26 07:02:16.975262 +0000 WARN meta/meta.go:95 trace {"elapsed": "46.830928621s", "rows": 1, "sql": "/* cloud_nonuser */SELECT SUM(size) AS size FROM (SELECT mo_table_size(reldatabase, relname) AS size FROM mo_catalog.mo_tables WHERE relkind IN('r', 'e', 'cluster', 'v') AND reldatabase = 'information_schema') AS t;"}

发生事件为东八区2024/06/26 15:01:50.466740,实例ID为01903344-4d60-7fb3-8a5d-02dafaf20ebc。不稳定复现。

Expected Behavior

正常执行时间,如:

2024/06/26 06:07:59.153671 +0000 WARN meta/meta.go:95 trace {"elapsed": "861.54913ms", "rows": 1, "sql": "/* cloud_nonuser */SELECT SUM(size) AS size FROM (SELECT mo_table_size(reldatabase, relname) AS size FROM mo_catalog.mo_tables WHERE relkind IN('r', 'e', 'cluster', 'v') AND reldatabase = 'mo_sample_data_tpch_sf1') AS t;"}

Steps to Reproduce

不稳定复现

Additional information

No response

volgariver6 commented 5 months ago

@aunjgr please help on this one

aunjgr commented 4 months ago

on leave

DanielZhangQD commented 4 months ago

The similar issue occurred in Prod env after upgrade MO to v1.2.1-27b34c670-2024-06-28:

2024/07/04 13:35:05.364552 +0000 ERROR meta/meta.go:95 trace {"error": "context canceled", "elapsed": "59.948734333s", "rows": 0, "sql": "/* cloud_nonuser */SELECT SUM(size) AS size FROM (SELECT mo_table_size(reldatabase, relname) AS size FROM mo_catalog.mo_tables WHERE relkind IN('r', 'e', 'cluster', 'v') AND reldatabase = 'write_test_0424') AS t;"}
2024/07/04 13:36:56.815791 +0000 ERROR meta/meta.go:95 trace {"error": "context canceled", "elapsed": "59.948137034s", "rows": 0, "sql": "/* cloud_nonuser */SELECT SUM(size) AS size FROM (SELECT mo_table_size(reldatabase, relname) AS size FROM mo_catalog.mo_tables WHERE relkind IN('r', 'e', 'cluster', 'v') AND reldatabase = 'write_test_0424') AS t;"}
 2024/07/04 13:39:55.694969 +0000 WARN models/meta.go:222 trace {"elapsed": "22.750829979s", "rows": 452, "sql": "SHOW TABLE STATUS FROM `test4`"}
 2024/07/04 13:40:23.879890 +0000 WARN models/meta.go:222 trace {"elapsed": "18.981660653s", "rows": 452, "sql": "SHOW TABLE STATUS FROM `test`"}
 2024/07/04 13:40:29.409728 +0000 WARN models/meta.go:222 trace {"elapsed": "18.671528182s", "rows": 452, "sql": "SHOW TABLE STATUS FROM `test4`"}
aunjgr commented 4 months ago

@zengyan1 你先看看吧,谢谢

zengyan1 commented 4 months ago

还没看

zengyan1 commented 4 months ago

还没看

zengyan1 commented 4 months ago

还没看

zengyan1 commented 4 months ago

还没看

zengyan1 commented 3 months ago

还没看

zengyan1 commented 3 months ago

还没看

zengyan1 commented 3 months ago

还没看

zengyan1 commented 3 months ago

还没看

zengyan1 commented 3 months ago

还没看

zengyan1 commented 2 months ago

还没看

zengyan1 commented 2 months ago

还没看

zengyan1 commented 2 months ago

还没看

zengyan1 commented 2 months ago

还没看

zengyan1 commented 2 months ago

还没看

zengyan1 commented 2 months ago

还没看

zengyan1 commented 1 month ago

还没看

zengyan1 commented 1 month ago

还没看

zengyan1 commented 1 month ago

还没看

zengyan1 commented 1 month ago

还没看

zengyan1 commented 1 month ago

暂无进展,预计2.0不会修复

zengyan1 commented 3 weeks ago

暂无进展

fengttt commented 3 weeks ago

Not enough info. No repro steps, no env.

sukki37 commented 2 weeks ago

depend on https://github.com/matrixorigin/matrixone/issues/15708

gouhongshen commented 2 weeks ago

in progress

aressu1985 commented 1 week ago

经和徐鹏沟通,这个目前不一定来的及在2.0.1版本解决,可以考虑放到2.1.0版本解决

gouhongshen commented 1 week ago

inprogress

gouhongshen commented 3 days ago

inprogress