Add time and thread_id for snapshot to check stale snapshots#2229
Merged
ti-srebot merged 12 commits intopingcap:masterfrom Jun 23, 2021
Merged
Add time and thread_id for snapshot to check stale snapshots#2229ti-srebot merged 12 commits intopingcap:masterfrom
ti-srebot merged 12 commits intopingcap:masterfrom
Conversation
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
This reverts commit 0a8060ae9eaa48765ca0e449f8b78eef3c98f9d9.
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
flowbehappy
reviewed
Jun 22, 2021
flowbehappy
reviewed
Jun 22, 2021
flowbehappy
reviewed
Jun 22, 2021
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
JaySon-Huang
commented
Jun 22, 2021
| @@ -0,0 +1,77 @@ | |||
| #include <Common/CurrentMetrics.h> | |||
Contributor
Author
There was a problem hiding this comment.
Split these function from SegmentReadTaskPool.h into SegmentReadTaskPool.cpp because if we include CurrentMetrics.h in SegmentReadTaskPool.h, it causes link error.
Split these functions def into cpp file and only include CurrentMetrics.h in the cpp file to fix that link error.
Revert "Revert "Add metrics for creating snapshot"" This reverts commit fca59a7.
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Contributor
Author
|
/run-all-tests |
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Contributor
Author
|
@flowbehappy PTAL again And also the changes in TiDB side: pingcap/tidb#25678 /cc @lidezhu |
Contributor
Author
|
/merge |
Collaborator
|
/run-all-tests |
Collaborator
|
cherry pick to release-4.0 in PR #2238 |
Collaborator
|
cherry pick to release-5.0 in PR #2239 |
Collaborator
|
cherry pick to release-5.1 in PR #2240 |
This was referenced Jun 23, 2021
Closed
Merged
JaySon-Huang
added a commit
that referenced
this pull request
Jun 23, 2021
ti-srebot
added a commit
that referenced
this pull request
Jun 28, 2021
LittleFall
pushed a commit
that referenced
this pull request
Jun 28, 2021
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Jun 29, 2021
…ingcap#2229) (pingcap#2239)" This reverts commit 6eab68e.
This was referenced Jun 30, 2021
This was referenced Jun 30, 2021
This file contains hidden or 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
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 problem does this PR solve?
Issue Number: related to #2199
Problem Summary: Suspicious that some tasks hold snapshot for a long time, prevent PageStorage from GCing old PageFiles
What is changed and how it works?
Add create_time and thread_id when creating snapshots. After
PageStorage::gc, log the oldest snapshot living time and its thread_id.We can trace to thread_id to know whether the snapshot is created for reading / background task.
When the create_time and thread_id and the period of logging files, we can know exactly which task holds the snapshot for a long time.
Related changes
pingcap/docs/pingcap/docs-cn:Check List
Tests
Side effects
Release note