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

[Bug]: update table mo_catalog.mo_mysql_compatibility_mode too slow #15597

Closed
1 task done
ck89119 opened this issue Apr 18, 2024 · 14 comments
Closed
1 task done

[Bug]: update table mo_catalog.mo_mysql_compatibility_mode too slow #15597

ck89119 opened this issue Apr 18, 2024 · 14 comments
Assignees
Labels
kind/bug Something isn't working severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Milestone

Comments

@ck89119
Copy link
Contributor

ck89119 commented Apr 18, 2024

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

v1.1.3

Commit ID

95801d8

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

以100qps 获取mo连接并执行一条简单sql select count(*) from t (t表只有一条数据),记录执行时间:
image

上图左边是commit: 95801d8 的执行时间,右边是commit: 14c4496,执行时间差距巨大,而且左边执行时间会越来越长。

它们在代码上的区别:左边在auth的时候需要执行两条update语句 update mo_catalog.mo_mysql_compatibility_mode set variable_value = '%s' where account_id = %d and variable_name = '%s';,右边不执行。

这是执行时抓取的cpu profile
cpu top:
image

flame graph:
image

Expected Behavior

No response

Steps to Reproduce

1. 本地起mo
2. 以100qps的速度获取mo连接,执行一条简单sql

Additional information

No response

@ck89119 ck89119 added kind/bug Something isn't working needs-triage labels Apr 18, 2024
@matrix-meow matrix-meow added this to the 1.2.0 milestone Apr 18, 2024
@aylei
Copy link
Contributor

aylei commented Apr 19, 2024

ref: #15560

@aylei aylei added severity/s0 Extreme impact: Cause the application to break down and seriously affect the use and removed needs-triage labels Apr 19, 2024
@aylei aylei assigned daviszhen and unassigned matrix-meow Apr 19, 2024
@aylei
Copy link
Contributor

aylei commented Apr 19, 2024

@daviszhen PTAL and triage

@daviszhen
Copy link
Contributor

未投入

9 similar comments
@daviszhen
Copy link
Contributor

未投入

@daviszhen
Copy link
Contributor

未投入

@daviszhen
Copy link
Contributor

未投入

@daviszhen
Copy link
Contributor

未投入

@daviszhen
Copy link
Contributor

未投入

@daviszhen
Copy link
Contributor

未投入

@daviszhen
Copy link
Contributor

未投入

@daviszhen
Copy link
Contributor

未投入

@daviszhen
Copy link
Contributor

未投入

@daviszhen
Copy link
Contributor

系统变量调整后,再确认下。

@daviszhen daviszhen assigned ck89119 and unassigned daviszhen Jun 4, 2024
@ck89119
Copy link
Contributor Author

ck89119 commented Jun 13, 2024

系统变量重构 #16551 完成后,每次登录鉴权不再会更新mo_mysql_compatibility_mode表。

在当前最新的1.2-dev分支(commit: ed9811a),重新跑上面的测试,执行时间已经正常了:

image

@ck89119 ck89119 closed this as completed Jun 13, 2024
@sukki37 sukki37 modified the milestones: 1.3.0-Backlog, 1.3.0 Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Projects
None yet
Development

No branches or pull requests

6 participants