-
Notifications
You must be signed in to change notification settings - Fork 410
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
Reduce UniPS snapshot stat overhead #7706
Reduce UniPS snapshot stat overhead #7706
Conversation
if (request->timeout_s() < 0) | ||
{ | ||
throw TiFlashException(Errors::Coprocessor::BadRequest, "invalid timeout={}", request->timeout_s()); | ||
} | ||
else if (request->timeout_s() > 0) | ||
{ | ||
context->setSetting("disagg_task_snapshot_timeout", request->timeout_s()); | ||
} // use default timeout if it is 0 | ||
|
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.
Delete these rows so that we can define disagg_task_snapshot_timeout by wn config file instead of rn
@@ -50,7 +50,6 @@ bool TiDBSchemaSyncer<mock_getter, mock_mapper>::syncSchemas(Context & context) | |||
{ | |||
if (version <= cur_version) | |||
{ | |||
LOG_INFO(log, " version {} is the same as cur_version {}, so do nothing", version, cur_version); |
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.
this cause useless loggings under multi keyspaces
const auto & stable = segment->getStable(); | ||
|
||
total_placed_rows += delta->getPlacedDeltaRows(); | ||
std::shared_lock lock(read_write_mutex); |
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.
Reduce the lock scope by {...}
block statements
/run-all-tests |
89cc700
to
e63d6c7
Compare
/run-all-tests |
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
[LGTM Timeline notifier]Timeline:
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hongyunyan, lidezhu, Lloyd-Pottiger The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cherry-pick release-7.1 |
/cherry-pick release-6.5 |
@JaySon-Huang: new pull request created to branch In response to this:
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. |
Signed-off-by: ti-chi-bot <[email protected]>
@JaySon-Huang: new pull request created to branch In response to this:
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. |
Signed-off-by: ti-chi-bot <[email protected]>
What problem does this PR solve?
Issue Number: close #7713
Problem Summary:
When there are many DeltaMergeStore in one tiflash instance, each
DeltaMergeStore::getStoreStats
will try to get the snapshot stats from PSV3/UniPS. But the PSV3/UniPS is a global instance that brings much CPU waste and locks contention. So it causes slow queries.What is changed and how it works?
PageStorageRunMode::ONLY_V2
, because PSV2 have different PS instances for different tableread_write_mutex
inDeltaMergeStore::getStoreStats
Check List
Tests
Side effects
Documentation
Release note