-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
backup: advacned prepare implementation #48439
Conversation
Signed-off-by: hillium <[email protected]>
Signed-off-by: hillium <[email protected]>
Hi @YuJuncen. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. 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 kubernetes/test-infra repository. |
Signed-off-by: hillium <[email protected]>
…d-prepare Signed-off-by: hillium <[email protected]>
Signed-off-by: hillium <[email protected]>
…nto advacned-prepare
Signed-off-by: hillium <[email protected]>
Signed-off-by: hillium <[email protected]>
/build |
Signed-off-by: hillium <[email protected]>
…nto advacned-prepare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #48439 +/- ##
=================================================
- Coverage 70.0608% 55.5471% -14.5137%
=================================================
Files 1445 1563 +118
Lines 420102 587661 +167559
=================================================
+ Hits 294327 326429 +32102
- Misses 105477 238413 +132936
- Partials 20298 22819 +2521
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: hillium <[email protected]>
Signed-off-by: hillium <[email protected]>
…nto advacned-prepare
Signed-off-by: hillium <[email protected]>
Signed-off-by: hillium <[email protected]>
Signed-off-by: hillium <[email protected]>
bo := tikv.NewBackoffer(ctx, regionCacheMaxBackoffMs) | ||
if len(endKey) == 0 { | ||
// This is encoded [0xff; 8]. | ||
// Workaround for https://github.com/tikv/client-go/issues/1051. |
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 issue has been fixed, can we remove the workaround and upgrade client-go?
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 may not be picked to release version and upgrading client-go
may have other side effects. I think we'd better keep this unchanged for the consistency between all versions.
} | ||
|
||
func (p *prepareStream) convertToEvent(resp *brpb.PrepareSnapshotBackupResponse) (event, bool) { | ||
switch resp.Ty { |
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.
What's the response type of PrepareSnapshotBackupRequestType_Finish
?
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.
Update lease result.
p.nextRetry = time.NewTimer(p.RetryBackoff) | ||
return nil | ||
} | ||
if item, ok := p.waitApplyDoneRegions.ReplaceOrInsert(r); ok { |
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.
when overlapped happened. Do we need set overlapped range to fail?
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 that range is larger, it may be retry after we checking the holes in AdvanceStep
, if it is smaller, I think it can be ignored.
br/pkg/backup/prepare_snap/env.go
Outdated
|
||
func (s SplitRequestClient) Send(req *brpb.PrepareSnapshotBackupRequest) error { | ||
// Try best to keeping the request untouched. | ||
rs := req.Regions |
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.
seems it canbe moved into if req.Ty == xxxxx
, :)
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.
rest LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 3pointer, BornChanger The full list of commands accepted by this bot can be found here. The pull request process is described here |
[LGTM Timeline notifier]Timeline:
|
@YuJuncen: The following test failed, say
Full PR test history. Your PR dashboard. 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 kubernetes/test-infra repository. I understand the commands that are listed here. |
Signed-off-by: hillium <[email protected]>
/label needs-cherry-pick-release-6.5 |
/label needs-cherry-pick-release-7.1 |
needs-cherry-pick-release-7.5 |
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
… (pingcap#39) close pingcap#50359 Co-authored-by: Ti Chi Robot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <[email protected]>
What problem does this PR solve?
Issue Number: close #50359
Problem Summary:
This PR implemented the client side of the enhanced prepare stage of snapshot backup.
What is changed and how it works?
Generally this is a state machine that tries to collect the whole range. If a region has applied to the last index, the region's range will be collected. When the whole key space has been collected, we are done.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.