-
Notifications
You must be signed in to change notification settings - Fork 287
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
tracker(dm): add task name to unistore folder name #5341
Conversation
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. |
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. @@ Coverage Diff @@
## master #5341 +/- ##
================================================
- Coverage 56.1240% 56.0923% -0.0317%
================================================
Files 522 527 +5
Lines 65325 69193 +3868
================================================
+ Hits 36663 38812 +2149
- Misses 25094 26666 +1572
- Partials 3568 3715 +147 |
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/pkg/schema/tracker.go
Outdated
@@ -149,7 +149,7 @@ func NewTracker(ctx context.Context, task string, sessionCfg map[string]string, | |||
} | |||
} | |||
|
|||
storePath, err = ioutil.TempDir("./", "schema-tracker") | |||
storePath, err = ioutil.TempDir("./", task+"-schema-tracker") |
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 about using a sub-directory?
BTW, I think we should add a data-dir configuration for dm-worker. We have relay-dir,dump-dir, and schema-tracker file directories now, but all the default values of them are the dm-worker binary's dir. For TiUP data-dir and deploy-dir are separated which looks a bit weird.
Maybe we can do this in the 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.
Will do it later, if we can't find the root cause we will change the implementation, so that configuration will be deprecated soon.
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
/merge |
This pull request has been accepted and is ready to merge. Commit hash: f95886d
|
/run-dm-integration-test |
/hold failed to create schema tracker" RawCause:"mkdirtemp ab?c/b%c\303\213d-schema-tracker: pattern contains path separator\ |
/unhold |
PTAL for b3afb8c |
Will this cause different tasks to have the same schema-tracker file name? What about using dumpling's template https://github.com/pingcap/tidb/blob/master/dumpling/export/prepare.go#L68 |
ioutil.TempDir will append different suffix for them, so we can only roughly tell them apart. https://github.com/pingcap/tidb/blob/master/dumpling/export/prepare.go#L68 it's too complicated, I can't understand what it's doing 😢 Can you give an example how to use it for a string input? |
pingcap/dumpling#131 (comment) |
Signed-off-by: lance6716 <lance6716@gmail.com>
@lichunzhu PTAL |
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
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 531cbbd
|
@lance6716: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests 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. |
'>': {}, ',': {}, '.': {}, '?': {}, '/': {}, ' ': {}, | ||
} | ||
|
||
func newTmpFolderForTracker(task string) (string, error) { |
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 not use url.PathEscape
/hold |
Signed-off-by: lance6716 <lance6716@gmail.com>
b116a46
to
e5715e0
Compare
/merge |
This pull request has been accepted and is ready to merge. Commit hash: e5715e0
|
/unhold |
/run-verify |
1 similar comment
/run-verify |
Signed-off-by: lance6716 lance6716@gmail.com
What problem does this PR solve?
Issue Number: ref #5334
What is changed and how it works?
sometimes unistore folder is abnormally big, we add task name to the folder name to know which task it belongs.
Also, clean that folder for unit tests by
Close()
Check List
Tests
Code changes
Side effects
Related changes
Release note