Skip to content

update mo_sessions view (#1.0-dev) - #13383

Merged
mergify[bot] merged 2 commits into
matrixorigin:1.0-devfrom
YANGGMM:fix-showp
Dec 11, 2023
Merged

mergify[bot] merged 2 commits into
matrixorigin:1.0-devfrom
YANGGMM:fix-showp

Conversation

@YANGGMM

@YANGGMM YANGGMM commented Dec 11, 2023

Copy link
Copy Markdown
Contributor

讨论见:https://github.com/matrixorigin/docs/blob/main/design/system_view.md#%E4%BC%9A%E8%AF%9D

策略调整:
1, 信息最多持续时间3秒。

一个语句执行完成,最多3秒后,相关的信息会被清空。
一个语句执行完成,如果下一条语句在3秒内开始执行,部分信息就是下一条的。

//例子
|---sql---|--空闲3s---|---下一个sql---|
/|\        /|\     /|\
|          |       |
|          |       |---------看到部分信息被更新,不是所有信息同时更新。
|          |
|          |-------------看不到第一个sql的信息
|
看到第一个sql的信息。

  1. txn_id。
  • 事务的生命周期可能长于sql语句。例如:begin开启事务后,执行了一些语句。但是在commit/rollback之前事务一直存在。但此时可能没有执行语句。
  • commit/rollback之后,不论成果与否,事务都会结束。此时txn_id会被清空。
  • 事务创建失败。txn_id也为空

Approved by: @qingxinhome

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #https://github.com/matrixorigin/MO-Cloud/issues/1932

What this PR does / why we need it:

update mo_sessions view

讨论见:https://github.com/matrixorigin/docs/blob/main/design/system_view.md#%E4%BC%9A%E8%AF%9D

策略调整:
1, 信息最多持续时间3秒。

一个语句执行完成,最多3秒后,相关的信息会被清空。
一个语句执行完成,如果下一条语句在3秒内开始执行,部分信息就是下一条的。
```
//例子
|---sql---|--空闲3s---|---下一个sql---|
/|\        /|\     /|\
|          |       |
|          |       |---------看到部分信息被更新,不是所有信息同时更新。
|          |
|          |-------------看不到第一个sql的信息
|
看到第一个sql的信息。

```

2. txn_id。

- 事务的生命周期可能长于sql语句。例如:begin开启事务后,执行了一些语句。但是在commit/rollback之前事务一直存在。但此时可能没有执行语句。
- commit/rollback之后,不论成果与否,事务都会结束。此时txn_id会被清空。
- 事务创建失败。txn_id也为空

Approved by: @qingxinhome
@matrix-meow matrix-meow added the size/S Denotes a PR that changes [10,99] lines label Dec 11, 2023
@mergify
mergify Bot requested a review from sukki37 December 11, 2023 11:55
@mergify mergify Bot added the kind/feature label Dec 11, 2023
@mergify
mergify Bot merged commit 69abbe5 into matrixorigin:1.0-dev Dec 11, 2023
@YANGGMM
YANGGMM deleted the fix-showp branch January 22, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants