-
Notifications
You must be signed in to change notification settings - Fork 283
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
checker(dm): port free space lightning precheck #7733
Conversation
Signed-off-by: lance6716 <lance6716@gmail.com>
Signed-off-by: lance6716 <lance6716@gmail.com>
Codecov Report
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. @@ Coverage Diff @@
## master #7733 +/- ##
================================================
- Coverage 59.9034% 59.8921% -0.0114%
================================================
Files 810 811 +1
Lines 93255 93675 +420
================================================
+ Hits 55863 56104 +241
- Misses 32535 32696 +161
- Partials 4857 4875 +18 |
/run-dm-integration-test |
Signed-off-by: lance6716 <lance6716@gmail.com>
if _, ok := c.checkingItems[config.LightningFreeSpaceChecking]; ok && | ||
c.stCfgs[0].LoaderConfig.ImportMode == config.LoadModePhysical && | ||
c.stCfgs[0].Mode != config.ModeIncrement { | ||
// TODO: concurrently read it intra-source later |
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 PR is a bit large, I prefer fix it in next PR
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
dm/checker/checker.go
Outdated
// members may have repeated meanings but have different data structure to satisfy different usages. | ||
type tablePairInfo struct { | ||
// downstream table -> sourceID -> upstream tables | ||
tablesPerDownstreamTable map[filter.Table]map[string][]filter.Table |
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.
i think PerXXX
naming is quite hard to know what's inside, maybe targetTable2SourceTableMap
, below too
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.
there's two name type: source/target and upstream/downstream. Do you prefer we always use source/target?
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.
prefer source/target, they have less chars 😅, upstream/downstream are ok too
Signed-off-by: lance6716 <lance6716@gmail.com>
} | ||
c.Assert(ValidateCheckingItem("xxx"), NotNil) | ||
// remember to update the number when add new checking items. | ||
require.Equal(t, 5, lightningCheck) |
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 doesn't check LightningPrechecks
⊆ AllCheckingItems
dm/checker/checker.go
Outdated
// members may have repeated meanings but have different data structure to satisfy different usages. | ||
type tablePairInfo struct { | ||
// downstream table -> sourceID -> upstream tables | ||
tablesPerDownstreamTable map[filter.Table]map[string][]filter.Table |
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.
prefer source/target, they have less chars 😅, upstream/downstream are ok too
Signed-off-by: lance6716 <lance6716@gmail.com>
[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. Reviewer can indicate their review by submitting an approval review. |
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
@@ -326,6 +329,10 @@ func (m *LoaderConfig) adjust() error { | |||
m.PoolSize = defaultPoolSize | |||
} | |||
|
|||
if m.Dir != "" && m.SortingDirPhysical == "" { | |||
m.SortingDirPhysical = m.Dir |
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.
Why put the sorting-dir
with source-dir
? Lightning will prefer they are in different disk. Maybe we can set another default sorting-dir
?
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.
I don't know how to do it in code 😂 and user may be unexpected to see another disk is occupied
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.
👌 Maybe just leave some comments to demonstrate the risk here?
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.
there will be a precheck as I port more lightning precheck in future
Co-authored-by: Obliviate <756541536@qq.com>
/hold I prefer we merge it after v6.5 branch is created |
/unhold /merge |
This pull request has been accepted and is ready to merge. Commit hash: 5b157b9
|
@lance6716: Your PR was out of date, I have automatically updated it for you. If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. 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. |
/run-all-tests |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 0105ac4
|
/run-all-tests |
Signed-off-by: lance6716 lance6716@gmail.com
What problem does this PR solve?
Issue Number: ref #3510
What is changed and how it works?
get source table size by
SELECT data_length + index_length FROM information_schema.TABLES WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ?
and use it in lightning prechecksCheck List
Tests
Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note