-
Notifications
You must be signed in to change notification settings - Fork 281
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
add mo_sessions
table function and view
#11748
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
daviszhen
requested review from
ouyuanning,
aunjgr,
badboynt1,
m-schen,
zhangxu19830126,
qingxinhome,
nnsgmsone and
reusee
as code owners
September 12, 2023 13:25
…xone into 0908-mo-sessions
reusee
approved these changes
Sep 13, 2023
m-schen
approved these changes
Sep 13, 2023
nnsgmsone
approved these changes
Sep 13, 2023
zhangxu19830126
approved these changes
Sep 13, 2023
ouyuanning
approved these changes
Sep 13, 2023
qingxinhome
approved these changes
Sep 13, 2023
badboynt1
approved these changes
Sep 14, 2023
aunjgr
approved these changes
Sep 14, 2023
aressu1985
approved these changes
Sep 14, 2023
sukki37
pushed a commit
that referenced
this pull request
Sep 18, 2023
讨论:https://github.com/matrixorigin/docs/blob/main/design/system_view.md#%E4%BC%9A%E8%AF%9D 1,增加table function `mo_sessions`. 2,增加系统视图`mo_catalog.mo_sessions`. 3,实现方案: 在table function `processlist`基础上,增加了字段`client_host`,`role`。并调整了部分字段的数据来源。 3,增加view的升级代码。 `mo_sessions`字段定义. ``` node_id: uuid。cn_id cn启动后,不会变 conn_id: client的tcp链接在mo中的编号。由hakeeper定义了编号的生成方式。 session_id: uuid。新session创建时产生 account: 租户名。 user: 用户名。 host: cn接受client请求的ip:port。 db: sql使用的database session_start: 新session创建时间戳。 command: mysql命令类型。COM_QUERY,COM_STMT_PREPARE,COM_STMT_EXECUTE等 info: 执行的sql。一个sql里面可能有多个语句 txn_id: sql涉及的事务id statement_id: sql中一个语句的uuid statement_type: sql中一个语句的类型。select,insert,update等 query_type: sql中一个语句的种类。 DQL,TCL等 sql_source_type: sql中一个语句的来源。external,internal等 query_start: sql中一个语句的开始执行时间。 client_host: client的ip端口。 role: 角色 ``` Approved by: @reusee, @m-schen, @nnsgmsone, @zhangxu19830126, @ouyuanning, @qingxinhome, @badboynt1, @aunjgr, @aressu1985
sukki37
pushed a commit
that referenced
this pull request
Sep 18, 2023
讨论:https://github.com/matrixorigin/docs/blob/main/design/system_view.md#%E4%BC%9A%E8%AF%9D 1,增加table function `mo_sessions`. 2,增加系统视图`mo_catalog.mo_sessions`. 3,实现方案: 在table function `processlist`基础上,增加了字段`client_host`,`role`。并调整了部分字段的数据来源。 3,增加view的升级代码。 `mo_sessions`字段定义. ``` node_id: uuid。cn_id cn启动后,不会变 conn_id: client的tcp链接在mo中的编号。由hakeeper定义了编号的生成方式。 session_id: uuid。新session创建时产生 account: 租户名。 user: 用户名。 host: cn接受client请求的ip:port。 db: sql使用的database session_start: 新session创建时间戳。 command: mysql命令类型。COM_QUERY,COM_STMT_PREPARE,COM_STMT_EXECUTE等 info: 执行的sql。一个sql里面可能有多个语句 txn_id: sql涉及的事务id statement_id: sql中一个语句的uuid statement_type: sql中一个语句的类型。select,insert,update等 query_type: sql中一个语句的种类。 DQL,TCL等 sql_source_type: sql中一个语句的来源。external,internal等 query_start: sql中一个语句的开始执行时间。 client_host: client的ip端口。 role: 角色 ``` Approved by: @reusee, @m-schen, @nnsgmsone, @zhangxu19830126, @ouyuanning, @qingxinhome, @badboynt1, @aunjgr, @aressu1985
This was referenced Sep 20, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Which issue(s) this PR fixes:
issue #11499
issue #11708
What this PR does / why we need it:
讨论:https://github.com/matrixorigin/docs/blob/main/design/system_view.md#%E4%BC%9A%E8%AF%9D
1,增加table function
mo_sessions
.2,增加系统视图
mo_catalog.mo_sessions
.3,实现方案:
在table function
processlist
基础上,增加了字段client_host
,role
。并调整了部分字段的数据来源。3,增加view的升级代码。
mo_sessions
字段定义.