-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
ddl: eliminate ingest step for add index with local engine #47982
ddl: eliminate ingest step for add index with local engine #47982
Conversation
Hi @tangenta. 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. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #47982 +/- ##
================================================
+ Coverage 71.5801% 72.7864% +1.2062%
================================================
Files 1401 1420 +19
Lines 405938 411589 +5651
================================================
+ Hits 290571 299581 +9010
+ Misses 95569 93144 -2425
+ Partials 19798 18864 -934
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Maybe do some refinement of backfilling_dispatcher_test
/retest |
@tangenta: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes/test-infra repository. |
|
@zimulala I've updated the PR description. PTAL |
@@ -20,7 +20,7 @@ import "github.com/pingcap/tidb/pkg/disttask/framework/proto" | |||
// the initial step is StepInit(-1) | |||
// steps are processed in the following order: | |||
// - local sort: | |||
// StepInit -> StepReadIndex -> StepWriteAndIngest -> StepDone | |||
// StepInit -> StepReadIndex -> StepDone |
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.
// StepInit -> StepReadIndex -> StepDone | |
// StepInit -> StepReadIndexAndIngest -> StepDone |
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.
The name is not suitable for global sort:
// - global sort:
// StepInit -> StepReadIndexAndIngest -> StepMergeSort -> StepWriteAndIngest -> StepDone
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wjhuang2016, ywqzzy 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:
|
/retest |
@tangenta: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes/test-infra repository. |
/retest |
@tangenta: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes/test-infra repository. |
/retest |
I add P0 label: prepare to speedup the merging. |
/retest |
1 similar comment
/retest |
@ywqzzy: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes/test-infra repository. |
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 #47981
Problem Summary:
Previously, when
tidb_enable_dist_task
is enabled, the ingest step(step 3) is separated from read-index step(step 1). This cause the problem that if a TiDB crashes in ingest step, index data in local disk is lost. Because the disttask framework does not support changing step backward(like changing step 3 to step 1), it doesn't re-scan the lost index data. Finally, data inconsistency occurs.What is changed and how it works?
Merge the ingest step to read-index step by
Flush
every time a subtask is finished.Thus, the subtask will not be marked as
succeed
if ingest failed.replaceDeadNodesIfAny
will re-distribute these running subtask to another TiDB instance when the lease is expired.Check List
Tests
Before
After:
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.