-
Notifications
You must be signed in to change notification settings - Fork 411
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
Tracing: Add tracing_id to PageStorage snapshot #4330
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/run-all-tests |
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with a suggestion
} | ||
PageReader newMetaReader(ReadLimiterPtr read_limiter, bool snapshot_read) | ||
PageReader newMetaReader(ReadLimiterPtr read_limiter, bool snapshot_read, const String & tracing_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about const String & tracing_id = ""
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to keep it without a default value, to let the caller and reviewer think about whether we need to add a tracing id to it or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with small comment
@@ -38,7 +38,8 @@ DeltaSnapshotPtr DeltaValueSpace::createSnapshot(const DMContext & context, bool | |||
snap->is_update = for_update; | |||
snap->_delta = this->shared_from_this(); | |||
|
|||
auto storage_snap = std::make_shared<StorageSnapshot>(context.storage_pool, context.getReadLimiter(), true); | |||
// TODO: Add tracing_id from mpp task or background tasks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can distinguish mpp task from background tasks using snap->is_update
? For background tasks, it's always true. And for mpp task it's always false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea, i will check it in the later pr
/merge |
@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: 86af5b6
|
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
What problem does this PR solve?
Issue Number: ref #4287
Problem Summary:
After #3632, we introduce DynamicThreadPool to reuse threads for handling incoming tasks. Then the "thread_id" record in PageStorage snapshot become less useful.
Add a "tracing_id" to the PageStorage snapshot, and use "read_tso" as the "tracing_id", it is more useful for locating bugs.
What is changed and how it works?
tracing_id
forSnapshotPtr PageStorage::getSnapshot(const String & tracing_id)
tracing_id
when stale snapshot(s) existtiflash/dbms/src/Storages/Page/V2/VersionSet/PageEntriesVersionSetWithDelta.cpp
Lines 332 to 340 in 0d0b79d
Check List
Tests
Side effects
Documentation
Release note