matrixorigin / matrixone

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

[Bug]: cost of establishing connections to mo were very high during oltp mixed case hight-concurrency test in merge trigger regression test workflow #17703

Closed aressu1985 closed 4 weeks ago

aressu1985 commented 3 months ago

Is there an existing issue for the same bug?

Branch Name

main

Commit ID

2c0c41d

Other Environment Information

- Hardware parameters:
2*CN: 
1*DN: 
3*LOG: 
- OS type:
- Others:

Actual Behavior

job link: https://github.com/matrixorigin/matrixone/actions/runs/10075532045/job/27855747649

For oltp mixed case hight-concurrency test in merge trigger regression test workflow, cost of establishing connections to mo were very high,somtimes cost of establishing 100 connections sometimes was more than 200s.

image

and in mo long, there were some "leak txn.." founded:

image

mo log link: https://grafana.ci.matrixorigin.cn/explore?panes=%7B%22mKf%22:%7B%22datasource%22:%22loki%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bnamespace%3D%5C%22mo-checkin-regression-17339%5C%22%7D%20%7C%3D%20%60leak%60%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22loki%22%7D,%22editorMode%22:%22builder%22%7D%5D,%22range%22:%7B%22from%22:%221721822454979%22,%22to%22:%221721825282742%22%7D%7D%7D&schemaVersion=1&orgId=1

Expected Behavior

No response

Steps to Reproduce

run merge trigger test, execute the following scenarios in parallel
1. tpcc 10-10
2. tpch 10G loop quries
3. oltp mixed cases:
   point select 100 threads
   upadte 100 threads
   delete-insert 100 threads

Additional information

No response

ouyuanning commented 3 months ago

跟这个 https://github.com/matrixorigin/matrixone/issues/17665 应该是一个事情

aressu1985 commented 3 months ago

update on 7.25:

查了一下执行SQL,发现jdbc在连接过程中,有个SQL执行时间特别长:

image

SQL如下: mysql-connector-java-8.0.19 (Revision: a0ca826f5cdf51a98356fdfb1bf251eb042f80bf) */SELECT @@session.auto_increment_increment AS auto_increment_increment, @@character_set_client AS character_set_client, @@character_set_connection AS character_set_connection, @@character_set_results AS character_set_results, @@character_set_server AS character_set_server, @@collation_server AS collation_server, @@collation_connection AS collation_connection, @@init_connect AS init_connect, @@interactive_timeout AS interactive_timeout, @@license AS license, @@lower_case_table_names AS lower_case_table_names, @@max_allowed_packet AS max_allowed_packet, @@net_write_timeout AS net_write_timeout, @@performance_schema AS performance_schema, @@sql_mode AS sql_mode, @@system_time_zone AS system_time_zone, @@time_zone AS time_zone, @@transaction_isolation AS transaction_isolation, @@wait_timeout AS wait_timeout

单独执行,基本没有耗时,需要具体查询原因

daviszhen commented 3 months ago

@aressu1985 确认跟leak没关系

sukki37 commented 3 months ago

17339-sqls.txt

daviszhen commented 3 months ago

未投入

daviszhen commented 3 months ago

未投入

daviszhen commented 3 months ago

未投入

daviszhen commented 3 months ago

未投入

sukki37 commented 3 months ago

repro: https://github.com/matrixorigin/matrixone/actions/runs/10382117840/job/28745654685

sukki37 commented 3 months ago

repro:https://github.com/matrixorigin/matrixone/actions/runs/10383286902/job/28749489257

xzxiong commented 2 months ago

repro: https://github.com/matrixorigin/matrixone/actions/runs/10447210054/job/28926825613

daviszhen commented 2 months ago

未投入

daviszhen commented 2 months ago

未投入

daviszhen commented 2 months ago

未投入

daviszhen commented 2 months ago

未投入

daviszhen commented 2 months ago

未投入

daviszhen commented 2 months ago

未投入

daviszhen commented 1 month ago

未投入

daviszhen commented 1 month ago

未投入

daviszhen commented 1 month ago

未投入

daviszhen commented 1 month ago

未投入

daviszhen commented 4 weeks ago

未投入