-
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
Handle snapshot in parallel if there is only one big region in raftstore v2 #8108
Handle snapshot in parallel if there is only one big region in raftstore v2 #8108
Conversation
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
/hold address todo(split), merge proxy's pr, performance test |
|
||
void SSTFilesToBlockInputStream::readPrefix() | ||
{ | ||
// We have to initialize sst readers at an earlier stage, |
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.
that is before readPrefix
@@ -100,7 +103,8 @@ void SSTFilesToBlockInputStream::readPrefix() | |||
make_inner_func, | |||
ssts_write, | |||
log, | |||
region->getRange()); | |||
region->getRange(), | |||
soft_limit.has_value() ? soft_limit.value().split_id : DM::SSTScanSoftLimit::HEAD_SPLIT); |
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.
If soft_limit is not set, then it is the only split, which is the legacy case
Signed-off-by: CalvinNeo <[email protected]>
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JaySon-Huang, JinheLin 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 |
[LGTM Timeline notifier]Timeline:
|
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
…/tics into try-parallel-single-snapshot-2
/unhold |
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
/run-all-tests |
1 similar comment
/run-all-tests |
/unhold |
What problem does this PR solve?
Issue Number: close #8081
Problem Summary:
In this PR, we also reorganized some codes in KVStore.cpp and Region.cpp.
What is changed and how it works?
Interface changes:
fn_get_config_json
to get final config on Proxy's side.fn_approx_size
to get approximate size of different cf only for tablet sst reader.fn_get_split_keys
to try to split a raft snapshot intosplits_count
parts, according to write cf. It may result in less or even zero parts if the size of the snapshot is small. The returned keys are not evenly distributed.The feature only works when in raftstore v2 and there is few concurrent prehandling.
The whole process:
count
split parts, we will create anothercount - 1
to handle in parallel.How to split tasks by split keys?
Given a
split_key[i]
, a subtask who runssplit_id=i
will handle range in(pk(split_key[i]), pk(split_key[i+1])]
. Which means it will skip all versions of pk ofsplit_key[i]
, and accepts all versions of pk ofsplit_key[i+1]
.The order
Performance
Most of the time are spent on pd scheduling and ddl. If we only count the prehandle time, then we have
Check List
Tests
use sysbench to generate data for 300s, then add tiflash replica
Side effects
Documentation
Release note