Tracing: Add tracing_id to PageStorage snapshot#4330
Tracing: Add tracing_id to PageStorage snapshot#4330ti-chi-bot merged 5 commits intopingcap:masterfrom
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. DetailsReviewer can indicate their review by submitting an approval review. |
|
/run-all-tests |
Coverage for changed filesCoverage summaryfull coverage report (for internal network access only) |
jiaqizho
left a comment
There was a problem hiding this comment.
LGTM, with a suggestion
| return PageReader(ns_id, data_storage, snapshot_read ? data_storage->getSnapshot(tracing_id) : nullptr, read_limiter); | ||
| } | ||
| 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.
How about const String & tracing_id = ""?
There was a problem hiding this comment.
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.
| 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.
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.
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. DetailsInstructions 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. DetailsCommit hash: 86af5b6 |
Coverage for changed filesCoverage summaryfull 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_idforSnapshotPtr PageStorage::getSnapshot(const String & tracing_id)tracing_idwhen 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