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

RuntimeStat: Clone SnapshotRuntimeStats Completely #641

Merged
merged 5 commits into from
Dec 16, 2022

Conversation

TonsnakeLin
Copy link
Contributor

Signed-off-by: TonsnakeLin lpbgytong@163.com
TiDB writes SnapshotRuntimeStats to slow log, but we found that the TimeDetail and 'ScanDetail' is lost. It is because that Cloning SnapshotRuntimeStats omits some information.

Signed-off-by: TonsnakeLin <lpbgytong@163.com>
@TonsnakeLin
Copy link
Contributor Author

@sticnarf @ekexium @MyonKeminta @cfzjywxk . thanks for your review !

Copy link
Collaborator

@sticnarf sticnarf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sticnarf
Copy link
Collaborator

Maybe we need to verify the performance impact of cloning the stats.

@cfzjywxk
Copy link
Contributor

I think just copying the pointer is enough as the underlying data would not change, the price is it's not real clone.

Signed-off-by: TonsnakeLin <lpbgytong@163.com>
@TonsnakeLin
Copy link
Contributor Author

@cfzjywxk PTAL

@cfzjywxk cfzjywxk merged commit c446b88 into tikv:master Dec 16, 2022
sticnarf added a commit to sticnarf/client-go that referenced this pull request Jan 31, 2023
* add more info for cloning SnapshotRuntimeStats

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* add more info for cloning SnapshotRuntimeStats

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* shallow copy SnapshotRuntimeStats

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

Signed-off-by: TonsnakeLin <lpbgytong@163.com>
Co-authored-by: Yilin Chen <sticnarf@gmail.com>
disksing pushed a commit that referenced this pull request Jan 31, 2023
* RuntimeStat: Clone `SnapshotRuntimeStats` Completely (#641)

* add more info for cloning SnapshotRuntimeStats

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* add more info for cloning SnapshotRuntimeStats

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* shallow copy SnapshotRuntimeStats

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

Signed-off-by: TonsnakeLin <lpbgytong@163.com>
Co-authored-by: Yilin Chen <sticnarf@gmail.com>

* fix data race in the LockKeys (#655)

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>

* Add a background region cache GC goroutine (#664)

Signed-off-by: Yilin Chen <sticnarf@gmail.com>

* Rewind after cacheGC reaches the end (#678)

Signed-off-by: Yilin Chen <sticnarf@gmail.com>

---------

Signed-off-by: TonsnakeLin <lpbgytong@163.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Co-authored-by: TonsnakeLin <87681388+TonsnakeLin@users.noreply.github.com>
Co-authored-by: Weizhen Wang <wangweizhen@pingcap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants